CVE-2023-52875: clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data
Add the check for the return value of mtk_alloc_clk_data() in order to avoid NULL pointer dereference.
The Linux kernel CVE team has assigned CVE-2023-52875 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.10 with commit e9862118272a and fixed in 4.14.330 with commit 6fccee2af400 Issue introduced in 4.10 with commit e9862118272a and fixed in 4.19.299 with commit 1953e62366da Issue introduced in 4.10 with commit e9862118272a and fixed in 5.4.261 with commit d1461f0c9ca0 Issue introduced in 4.10 with commit e9862118272a and fixed in 5.10.201 with commit 001e5def774f Issue introduced in 4.10 with commit e9862118272a and fixed in 5.15.139 with commit d1175cf4bd2b Issue introduced in 4.10 with commit e9862118272a and fixed in 6.1.63 with commit 2a18dd653284 Issue introduced in 4.10 with commit e9862118272a and fixed in 6.5.12 with commit e61934720af4 Issue introduced in 4.10 with commit e9862118272a and fixed in 6.6.2 with commit 1bf9c204aef4 Issue introduced in 4.10 with commit e9862118272a and fixed in 6.7 with commit 0d6e24b422a2
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2023-52875
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/clk/mediatek/clk-mt2701.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/6fccee2af400edaed9cf349d506c5971d4762739 https://git.kernel.org/stable/c/1953e62366da5460dc712e045f94fb0d8918999d https://git.kernel.org/stable/c/d1461f0c9ca0827c03730fe9652ebbf6316a2a95 https://git.kernel.org/stable/c/001e5def774fa1a8f2b29567c0b0cd3e3a859a96 https://git.kernel.org/stable/c/d1175cf4bd2b4c5f7c43f677ea1ce9ad2c18d055 https://git.kernel.org/stable/c/2a18dd653284550900b02107c3c7b3ac5e0eb802 https://git.kernel.org/stable/c/e61934720af4a58ffd43a63ffdd6f3a0bd7d7b47 https://git.kernel.org/stable/c/1bf9c204aef4cc55ce46a7ff2d4dc7e5f86551a7 https://git.kernel.org/stable/c/0d6e24b422a2166a9297a8286ff2e6ab9a5e8cd3