CVE-2024-49901 drm/msm/adreno: Assign msm_gpu->pdev earlier to avoid nullptrs
A null pointer dereference in the Linux kernel Adreno GPU driver can cause a system crash during device initialization failures.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-49901?
CVE-2024-49901 is a medium-severity vulnerability in Linux kernel, published on 21 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
drm/msm/adreno: Assign msm_gpu->pdev earlier to avoid nullptrs
There are some cases, such as the one uncovered by Commit 46d4efcccc68 ("drm/msm/a6xx: Avoid a nullptr dereference when speedbin setting fails") where
msm_gpu_cleanup() : platform_set_drvdata(gpu->pdev, NULL);
is called on gpu->pdev == NULL, as the GPU device has not been fully initialized yet.
Turns out that there's more than just the aforementioned path that causes this to happen (e.g. the case when there's speedbin data in the catalog, but opp-supported-hw is missing in DT).
Assigning msm_gpu->pdev earlier seems like the least painful solution to this, therefore do so.
Patchwork: https://patchwork.freedesktop.org/patch/602742/
Weakness: CWE-476
Which versions are affected by CVE-2024-49901?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-49901?
Apply the vendor's patch.
Is CVE-2024-49901 being exploited?
There is no known exploitation of CVE-2024-49901 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-51420, BELL-CVE-2024-49901, DEBIAN-CVE-2024-49901, GHSA-5wgv-v8w4-hvpr, ROOT-OS-DEBIAN-11-CVE-2024-49901, ROOT-OS-DEBIAN-12-CVE-2024-49901 and 2 more.