CVE-2023-54321
Null Pointer Dereference in Linux Kernel driver core device_add
Publication date: 2025-12-30
Last updated on: 2026-02-26
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 5.11 (inc) to 5.15.99 (exc) |
| linux | linux_kernel | From 5.16 (inc) to 6.1.16 (exc) |
| linux | linux_kernel | From 6.2 (inc) to 6.2.3 (exc) |
| linux | linux_kernel | From 2.6.26 (inc) to 5.10.249 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-476 | The product dereferences a pointer that it expects to be valid but is NULL. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a potential null pointer dereference in the Linux kernel's device_add() function. It occurs in an error path where a device's driver pointer is set but the driver is not yet bound. When device_add() fails during bus_add_device(), it calls bus_remove_device(), which tries to release the driver by accessing a linked list node (knode_driver). Since device_bind_driver() has not been called yet, this linked list node is not properly initialized, leading to a null pointer dereference and a kernel crash. The fix involves setting the device's driver pointer to null in the error path before calling bus_remove_device() to prevent this dereference.
How can this vulnerability impact me? :
This vulnerability can cause a kernel crash due to a null pointer dereference when adding devices in the Linux kernel. Such crashes can lead to system instability, denial of service, or unexpected reboots, potentially disrupting normal operations on affected systems.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring kernel logs for null pointer dereference errors related to device_add() and driver binding failures. Specifically, look for kernel BUG messages indicating NULL pointer dereference at klist_remove or device_release_driver_internal. Commands such as 'dmesg | grep -i "NULL pointer dereference"' or 'journalctl -k | grep device_add' can help identify these issues.
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation is to update the Linux kernel to a version where this issue is fixed. The fix involves setting dev->driver to null in the error path before calling bus_remove_device() to prevent null pointer dereference. Until the update is applied, avoid fault injection tests or operations that trigger device_add() error paths that lead to this issue.