CVE-2024-46896 drm/amdgpu: don't access invalid sched
A null pointer dereference in the AMD GPU driver allows a local attacker to crash the system by submitting invalid command submissions.
- 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-46896?
CVE-2024-46896 is a medium-severity vulnerability in Linux kernel, published on 11 Jan 2025. 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/amdgpu: don't access invalid sched
Since 2320c9e6a768 ("drm/sched: memset() 'job' in drm_sched_job_init()") accessing job->base.sched can produce unexpected results as the initialisation of (*job)->base.sched done in amdgpu_job_alloc is overwritten by the memset.
This commit fixes an issue when a CS would fail validation and would be rejected after job->num_ibs is incremented. In this case, amdgpu_ib_free(ring->adev, ...) will be called, which would crash the machine because the ring value is bogus.
To fix this, pass a NULL pointer to amdgpu_ib_free(): we can do this because the device is actually not used in this function.
The next commit will remove the ring argument completely.
(cherry picked from commit 2ae520cb12831d264ceb97c61f72c59d33c0dbd7)
Weakness: CWE-476
Which versions are affected by CVE-2024-46896?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-46896?
Apply the vendor's patch.
Is CVE-2024-46896 being exploited?
There is no known exploitation of CVE-2024-46896 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-46896, DEBIAN-CVE-2024-46896, GHSA-vjgg-3f8r-g7rm, UBUNTU-CVE-2024-46896.