CVE-2024-43856 dma: fix call order in dmam_free_coherent
A race condition in the Linux kernel DMA subsystem can cause a kernel warning and potential denial of service due to incorrect resource cleanup order.
- 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-43856?
CVE-2024-43856 is a high-severity vulnerability in Linux kernel, published on 17 Aug 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:
dma: fix call order in dmam_free_coherent
dmam_free_coherent() frees a DMA allocation, which makes the freed vaddr available for reuse, then calls devres_destroy() to remove and free the data structure used to track the DMA allocation. Between the two calls, it is possible for a concurrent task to make an allocation with the same vaddr and add it to the devres list.
If this happens, there will be two entries in the devres list with the same vaddr and devres_destroy() can free the wrong entry, triggering the WARN_ON() in dmam_match.
Fix by destroying the devres entry before freeing the DMA allocation.
kokonut //net/encryption http://sponge2/b9145fe6-0f72-4325-ac2f-a84d81075b03
Weakness: CWE-770
Which versions are affected by CVE-2024-43856?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-43856?
Apply the vendor's patch.
Is CVE-2024-43856 being exploited?
There is no known exploitation of CVE-2024-43856 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-47937, AZL-48027, BELL-CVE-2024-43856, DEBIAN-CVE-2024-43856, GHSA-g877-jjjq-5fjc, UBUNTU-CVE-2024-43856.