CVE-2023-53284: drm/msm/dpu: check for null return of devm_kzalloc() in dpu_writeback_init()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/msm/dpu: check for null return of devm_kzalloc() in dpu_writeback_init()
Because of the possilble failure of devm_kzalloc(), dpu_wb_conn might be NULL and will cause null pointer dereference later.
Therefore, it might be better to check it and directly return -ENOMEM.
Patchwork: https://patchwork.freedesktop.org/patch/512277/
[DB: fixed typo in commit message]
The Linux kernel CVE team has assigned CVE-2023-53284 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.19 with commit 77b001acdcfeb892842caac49fb7f0d286b29c43 and fixed in 6.1.16 with commit 3723c4dbcd14cc96771000ce0b0540801e6ba059 Issue introduced in 5.19 with commit 77b001acdcfeb892842caac49fb7f0d286b29c43 and fixed in 6.2.3 with commit 5ee51b19855c5dd72aca57b8014f3b70d7798733 Issue introduced in 5.19 with commit 77b001acdcfeb892842caac49fb7f0d286b29c43 and fixed in 6.3 with commit 21e9a838f505178e109ccb3bf19d7808eb0326f4
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-53284
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/msm/disp/dpu1/dpu_writeback.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/3723c4dbcd14cc96771000ce0b0540801e6ba059 https://git.kernel.org/stable/c/5ee51b19855c5dd72aca57b8014f3b70d7798733 https://git.kernel.org/stable/c/21e9a838f505178e109ccb3bf19d7808eb0326f4