CVE-2023-52492 dmaengine: fix NULL pointer in channel unregistration function
A NULL pointer dereference in the Linux kernel DMA engine unregistration path can cause a system crash, requiring a kernel patch.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-52492?
CVE-2023-52492 is a medium-severity vulnerability in Debian Debian Linux, published on 29 Feb 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:
dmaengine: fix NULL pointer in channel unregistration function
__dma_async_device_channel_register() can fail. In case of failure, chan->local is freed (with free_percpu()), and chan->local is nullified. When dma_async_device_unregister() is called (because of managed API or intentionally by DMA controller driver), channels are unconditionally unregistered, leading to this NULL pointer: [ 1.318693] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000d0 [...] [ 1.484499] Call trace: [ 1.486930] device_del+0x40/0x394 [ 1.490314] device_unregister+0x20/0x7c [ 1.494220] __dma_async_device_channel_unregister+0x68/0xc0
Look at dma_async_device_register() function error path, channel device unregistration is done only if chan->local is not NULL.
Then add the same condition at the beginning of __dma_async_device_channel_unregister() function, to avoid NULL pointer issue whatever the API used to reach this function.
Weakness: CWE-476
Which versions are affected by CVE-2023-52492?
It affects 2 products.
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2023-52492?
Apply the vendor's patch.
Is CVE-2023-52492 being exploited?
There is no known exploitation of CVE-2023-52492 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as BELL-CVE-2023-52492, DEBIAN-CVE-2023-52492, GHSA-6hr8-534p-8986, UBUNTU-CVE-2023-52492.