# CVE-2025-21915: cdx: Fix possible UAF error in driver\_override\_show()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.0
- **CVSS:** 7.0 (v3.1, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.29% (percentile 14, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2025-04-01T15:40:52.019Z
- **Modified:** 2026-08-05T11:55:19.720Z

## Who should check

- Anyone running Linux \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf; \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< 8473135f89c0949436a22adb05b8cece2fb3da91; \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< 0439d541aa8d3444ad41c39e39eb71acb57acde3; \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< 91d44c1afc61a2fec37a9c7a3485368309391e0b
- Anyone running Linux 6.4

## 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.

## Affected and fixed versions

- Linux: \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf; \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< 8473135f89c0949436a22adb05b8cece2fb3da91; \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< 0439d541aa8d3444ad41c39e39eb71acb57acde3; \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< 91d44c1afc61a2fec37a9c7a3485368309391e0b (cvelist)
- Linux: 6.4 (cvelist)

## Mitigation

- Upgrade Linux to 91d44c1afc61a2fec37a9c7a3485368309391e0b or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21915. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21915.md
Affected: Linux >= 2959ab247061e67485d83b6af8feb3761ec08cb9, < d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf; >= 2959ab247061e67485d83b6af8feb3761ec08cb9, < 8473135f89c0949436a22adb05b8cece2fb3da91; >= 2959ab247061e67485d83b6af8feb3761ec08cb9, < 0439d541aa8d3444ad41c39e39eb71acb57acde3; >= 2959ab247061e67485d83b6…
Fixed in: Linux 8473135f89c0949436a22adb05b8cece2fb3da91, Linux 0439d541aa8d3444ad41c39e39eb71acb57acde3, Linux 91d44c1afc61a2fec37a9c7a3485368309391e0b

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21915 being exploited?

There is no confirmed exploitation: CVE-2025-21915 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21915?

High: CVSS 7.0 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2025-21915?

Linux \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf; \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< 8473135f89c0949436a22adb05b8cece2fb3da91; \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< 0439d541aa8d3444ad41c39e39eb71acb57acde3; \>= 2959ab247061e67485d83b6af8feb3761ec08cb9, \< 91d44c1afc61a2fec37a9c7a3485368309391e0b; Linux 6.4.

### Is there a fix for CVE-2025-21915?

Yes. Fixed in Linux 8473135f89c0949436a22adb05b8cece2fb3da91, Linux 0439d541aa8d3444ad41c39e39eb71acb57acde3, Linux 91d44c1afc61a2fec37a9c7a3485368309391e0b. Upgrade Linux to 91d44c1afc61a2fec37a9c7a3485368309391e0b or later.

### How do I check if I'm affected by CVE-2025-21915?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf>
- patch: <https://git.kernel.org/stable/c/8473135f89c0949436a22adb05b8cece2fb3da91>
- patch: <https://git.kernel.org/stable/c/0439d541aa8d3444ad41c39e39eb71acb57acde3>
- patch: <https://git.kernel.org/stable/c/91d44c1afc61a2fec37a9c7a3485368309391e0b>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21915>

HTML: <https://flawdb.com/CVE-2025-21915> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21915>
