CVE-2023-52492: dmaengine: fix NULL pointer in channel unregistration function
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: fix NULL pointer in channel unregistration function
dmaasyncdevicechannelregister() can fail. In case of failure, chan->local is freed (with freepercpu()), and chan->local is nullified. When dmaasyncdeviceunregister() 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] devicedel+0x40/0x394 [ 1.490314] deviceunregister+0x20/0x7c [ 1.494220] dmaasyncdevicechannelunregister+0x68/0xc0
Look at dmaasyncdeviceregister() function error path, channel device unregistration is done only if chan->local is not NULL.
Then add the same condition at the beginning of dmaasyncdevicechannelunregister() function, to avoid NULL pointer issue whatever the API used to reach this function.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: fix NULL pointer in channel unregistration function
The Linux kernel CVE team has assigned CVE-2023-52492 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/20240229155245.1571576-33-lee@kernel.org/T
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2023-52492?
CVE-2023-52492 has been categorized with high severity due to its potential impact on system stability and security.
How do I fix CVE-2023-52492?
To address CVE-2023-52492, upgrade to the recommended kernel versions that include the patch for this vulnerability.
Which kernel versions are affected by CVE-2023-52492?
CVE-2023-52492 affects various kernel versions prior to 5.10.210, 5.15.149, 6.1.76, 6.6.15, 6.7.3, and 6.8.
Is CVE-2023-52492 a remote exploit?
CVE-2023-52492 is not specifically classified as a remote exploit; it pertains to local interactions within the kernel.
What systems are vulnerable to CVE-2023-52492?
Systems running the affected versions of the Linux kernel, particularly distributions based on Red Hat and Debian, are vulnerable to CVE-2023-52492.