CVE-2025-21915: cdx: Fix possible UAF error in driver_override_show()
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.
Security readout for executives and security teams
Plain-English summary
A race condition in the Linux CDX driver could let a local user trigger access to freed memory while a sysfs value is being changed. The documented consequence is possible disclosure of a kernel address. The CVSS score is 7.8, but the supplied sources do not establish active exploitation.
Executive priority
Schedule accelerated remediation for affected multi-user or shared Linux systems using CDX. This is high severity but not an emergency based solely on the supplied evidence: exploitation is local, environmental prerequisites apply, and active abuse is not documented. Confirm exposure before broad operational disruption.
Technical view
CVE-2025-21915 is a CWE-416 use-after-free in drivers/cdx/cdx.c. driver_override_show() could read cdx_dev->driver_override without the device lock while driver_override_store() concurrently replaces and frees that string. Stable-kernel commits add synchronization to the read path.
Likely exposure
Exposure requires an affected Linux kernel, the CDX driver path, access to the relevant sysfs attribute, and local low-privileged access. The supplied version list is ambiguous, including an unexplained “0” entry, so distribution-specific kernel advisories and backport records should determine actual exposure.
Exploitation context
The supplied record marks this CVE as absent from KEV and provides no evidence of exploitation in the wild or a public proof of concept. Detection came from experimental static analysis. Treat active exploitation as unconfirmed.
Researcher notes
The vulnerable read and concurrent update lack matching device locking, creating a potential stale-pointer dereference. The stated observable risk is kernel-address disclosure through a world-readable DEVICE_ATTR. Although CVSS assigns high confidentiality, integrity, and availability impacts, the supplied narrative does not demonstrate those broader outcomes.
Mitigation direction
Update to a vendor-supported kernel containing the referenced fix or an equivalent backport.
Prioritize multi-user systems where CDX devices and the affected sysfs interface are available.
If immediate updating is impossible, check vendor guidance for supported temporary mitigations.
Restrict unnecessary local accounts and sysfs write access while remediation is pending.
Validation and detection
Inventory deployed kernel versions and distribution package revisions.
Confirm whether the CDX subsystem and relevant driver_override sysfs attribute are present.
Verify the installed kernel contains a referenced stable commit or documented vendor backport.
Review vendor changelogs because the supplied affected-version data is ambiguous.
Perform any concurrency testing only in an isolated, non-production environment.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-416: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
1ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-416 · source CWE mapping
Use After Free
Use After Free represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.