CVE-2024-50156: drm/msm: Avoid NULL dereference in msm_disp_state_print_regs()
In the Linux kernel, the following vulnerability has been resolved:
drm/msm: Avoid NULL dereference in msmdispstateprintregs()
If the allocation in msmdispstatedumpregs() failed then block->state can be NULL. The msmdispstateprintregs() function does have code to try to handle it with:
if (reg) dumpaddr = reg;
...but since "dumpaddr" is initialized to NULL the above is actually a noop. The code then goes on to dereference dumpaddr.
Make the function print "Registers not stored" when it sees a NULL to solve this. Since we're touching the code, fix msmdispstateprintregs() not to pointlessly take a double-pointer and properly mark the pointer as const.
Patchwork: https://patchwork.freedesktop.org/patch/619657/
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-50156?
CVE-2024-50156 has been classified with a severity that indicates a potential risk of a NULL dereference vulnerability.
How do I fix CVE-2024-50156?
To address CVE-2024-50156, ensure your Linux kernel is updated to a version that includes the patch resolving this vulnerability.
Which versions are affected by CVE-2024-50156?
CVE-2024-50156 affects various Linux kernel versions, specifically those between 5.14 and 5.15.170, 5.16 and 6.1.115, and 6.2 to 6.6.59, among others.
What systems are impacted by CVE-2024-50156?
CVE-2024-50156 impacts systems running the affected versions of the Linux kernel.
What is the nature of the vulnerability in CVE-2024-50156?
CVE-2024-50156 involves a NULL dereference in the msm_disp_state_print_regs() function, which can occur if allocation fails.