CVE-2025-21915 Details
Description
In the Linux kernel, the following vulnerability has been resolved: cdx: Fix possible UAF error in driver_override_show() Fixed a possible UAF problem in driver_override_show() in drivers/cdx/cdx.c This function driver_override_show() is part of DEVICE_ATTR_RW, which includes both driver_override_show() and driver_override_store(). These functions can be executed concurrently in sysfs. The driver_override_store() function uses driver_set_override() to update the driver_override value, and driver_set_override() internally locks the device (device_lock(dev)). If driver_override_show() reads cdx_dev->driver_override without locking, it could potentially access a freed pointer if driver_override_store() frees the string concurrently. This could lead to printing a kernel address, which is a security risk since DEVICE_ATTR can be read by all users. Additionally, a similar pattern is used in drivers/amba/bus.c, as well as many other bus drivers, where device_lock() is taken in the show function, and it has been working without issues. This potential bug was detected by our experimental static analysis tool, which analyzes locking APIs and paired functions to identify data races and atomicity violations.
A use-after-free vulnerability has been identified in the Linux kernel within the CDX driver, specifically in the 'driver_override_show()' function of 'drivers/cdx/cdx.c'. This function, part of the DEVICE_ATTR_RW macro, can be executed concurrently with 'driver_override_store()', leading to a potential use-after-free scenario. The 'driver_override_store()' function updates the 'driver_override' value while locking the device, but 'driver_override_show()' may read the 'driver_override' value without proper synchronization, risking access to a freed pointer. This vulnerability could allow the function to print a kernel address, posing a security risk since DEVICE_ATTR can be accessed by all users.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 21, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/0439d541aa8d3444ad41c39e39eb71acb57acde3 | kernel.org | Patch |
| https://git.kernel.org/stable/c/8473135f89c0949436a22adb05b8cece2fb3da91 | kernel.org | Patch |
| https://git.kernel.org/stable/c/91d44c1afc61a2fec37a9c7a3485368309391e0b | kernel.org | Patch |
| https://git.kernel.org/stable/c/d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-416 | Use After Free | [email protected] |
| CWE-416 | Use After Free | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.4, < 6.6.83 >= 6.7, < 6.12.19 >= 6.13, < 6.13.7 6.14 rc1 6.14 rc2 6.14 rc3 6.14 rc4 6.14 rc5 |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 30, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 19, 2025 | Modified Analysis | [email protected] |
| Apr 21, 2025 | CVE Modified | CISA-ADP |
| Apr 15, 2025 | Initial Analysis | [email protected] |
| Apr 1, 2025 | New CVE Received | kernel.org |