# CVE-2025-21915: cdx: Fix possible UAF error in driver_override_show()

- Severity: High 7.0 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 15% of CVEs (2026-12-01)
- Published: 2025-04-01T15:40:52.019Z
- Modified: 2026-08-05T11:55:19.720Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 2959ab247061e67485d83b6af8feb3761ec08cb9 before d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf; from 2959ab247061e67485d83b6af8feb3761ec08cb9 before 8473135f89c0949436a22adb05b8cece2fb3da91; from 2959ab247061e67485d83b6af8feb3761ec08cb9 before 0439d541aa8d3444ad41c39e39eb71acb57acde3; from 2959ab247061e67485d83b6af8feb3761ec08cb9 before 91d44c1afc61a2fec37a9c7a3485368309391e0b; 6.4 (not affected: before 6.4; from 6.6.83 up to 6.6.*; from 6.12.19 up to 6.12.*; from 6.13.7 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 6.4 before 6.6.83; from 6.7 before 6.12.19; from 6.13 before 6.13.7; 6.14

## Every score

- Linux: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <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> (patch)

## Sources

- CVE List: [CVE-2025-21915](https://www.cve.org/CVERecord?id=CVE-2025-21915), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-21915](https://nvd.nist.gov/vuln/detail/CVE-2025-21915), Public domain, modified 2026-07-30

---

Page: https://cve.day/CVE-2025-21915 · Whole record: https://cve.day/CVE-2025-21915.json · Rebuilt by cve.day 2026-11-25T22:58:55.884Z
