CVE-2023-53534: drm/mediatek: mtk_drm_crtc: Add checks for devm_kcalloc
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/mediatek: mtk_drm_crtc: Add checks for devm_kcalloc
As the devm_kcalloc may return NULL, the return value needs to be checked to avoid NULL poineter dereference.
The Linux kernel CVE team has assigned CVE-2023-53534 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.5 with commit 31c5558dae0513bd2bae33ea37543f584c6c35a5 and fixed in 5.10.173 with commit b64b6dff15a38468b8cd33fc7864fa4e02b0933a Issue introduced in 5.5 with commit 31c5558dae0513bd2bae33ea37543f584c6c35a5 and fixed in 5.15.99 with commit 62952905e195f7350bc230cf0960a74ddbceed5d Issue introduced in 5.5 with commit 31c5558dae0513bd2bae33ea37543f584c6c35a5 and fixed in 6.1.16 with commit 67ea657c7891c2f86a7750395640d9bdf2555926 Issue introduced in 5.5 with commit 31c5558dae0513bd2bae33ea37543f584c6c35a5 and fixed in 6.2.3 with commit 7d569ae98ee5490585929be69fea68047679b7b2 Issue introduced in 5.5 with commit 31c5558dae0513bd2bae33ea37543f584c6c35a5 and fixed in 6.3 with commit 5bf1e3bd7da625ccf9a22c8cb7d65271e6e47f4c
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-53534
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/gpu/drm/mediatek/mtk_drm_crtc.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/b64b6dff15a38468b8cd33fc7864fa4e02b0933a https://git.kernel.org/stable/c/62952905e195f7350bc230cf0960a74ddbceed5d https://git.kernel.org/stable/c/67ea657c7891c2f86a7750395640d9bdf2555926 https://git.kernel.org/stable/c/7d569ae98ee5490585929be69fea68047679b7b2 https://git.kernel.org/stable/c/5bf1e3bd7da625ccf9a22c8cb7d65271e6e47f4c