Skip to content

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

HighCVSS 7.8 EPSS 0.29%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: total
Technology
Linux KernelUbuntuDebian

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.

Upgrade path

10 packages: 6 fixed, 4 with no fix yet.

PackageAffectedFixed inStatus
cbl-mariner kernel(CBL-Mariner 2.0) All versions No fix listed No fix yet
ubuntu/linux(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/linux-kvm(Ubuntu 22.04) All versions No fix listed No fix yet
ubuntu/linux-raspi(Ubuntu 22.04) All versions No fix listed No fix yet
azure linux kernel(Azure Linux 3.0) < 6.6.85.1-2 6.6.85.1-2 Fixed
debian/linux(Debian 13) < 6.12.19-1 6.12.19-1 Fixed
debian/linux(Debian 14) < 6.12.19-1 6.12.19-1 Fixed
Linux kernel < 6.6.83; < 6.12.19; < 6.13.7; < 6.14 +13 more 6.6.83, 6.12.19, 6.13.7, 6.14, 91d44c1afc61a2fec37a9c7a3485368309391e0b, 0439d541aa8d3444ad41c39e39eb71acb57acde3, 8473135f89c0949436a22adb05b8cece2fb3da91, d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf Fixed
ubuntu/linux(Ubuntu 24.04) < 6.8.0-84.84 6.8.0-84.84 Fixed
ubuntu/linux-raspi(Ubuntu 24.04) < 6.8.0-1039.43 6.8.0-1039.43 Fixed

Affected products

ProductAffected versionsFixed in
azure linux kernel(Azure Linux:3.0) < 6.6.85.1-2 6.6.85.1-2
cbl-mariner kernel(CBL-Mariner:2.0) All versions No fix listed
debian/linux(Debian:13) < 6.12.19-1 6.12.19-1
debian/linux(Debian:14) < 6.12.19-1 6.12.19-1
Linux kernel >= 2959ab247061e67485d83b6af8feb3761ec08cb9, < d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf
Linux kernel >= 2959ab247061e67485d83b6af8feb3761ec08cb9, < 8473135f89c0949436a22adb05b8cece2fb3da91 8473135f89c0949436a22adb05b8cece2fb3da91
Linux kernel >= 2959ab247061e67485d83b6af8feb3761ec08cb9, < 0439d541aa8d3444ad41c39e39eb71acb57acde3 0439d541aa8d3444ad41c39e39eb71acb57acde3
Linux kernel >= 2959ab247061e67485d83b6af8feb3761ec08cb9, < 91d44c1afc61a2fec37a9c7a3485368309391e0b 91d44c1afc61a2fec37a9c7a3485368309391e0b
Linux kernel = 6.4 No fix listed
Linux kernel < 6.6.83 6.6.83
Linux kernel < 6.12.19 6.12.19
Linux kernel < 6.13.7 6.13.7
Linux kernel < 6.14 6.14
ubuntu/linux(Ubuntu:22.04) All versions No fix listed
ubuntu/linux-kvm(Ubuntu:22.04) All versions No fix listed
ubuntu/linux-raspi(Ubuntu:22.04) All versions No fix listed
ubuntu/linux(Ubuntu:24.04) < 6.8.0-84.84 6.8.0-84.84
ubuntu/linux-raspi(Ubuntu:24.04) < 6.8.0-1039.43 6.8.0-1039.43
Linux kernel >= 6.4, < 6.6.83 6.6.83
Linux kernel >= 6.7, < 6.12.19 6.12.19
Linux kernel >= 6.13, < 6.13.7 6.13.7
Linux kernel = 6.14-rc1 No fix listed
Linux kernel = 6.14-rc2 No fix listed
Linux kernel = 6.14-rc3 No fix listed
Linux kernel = 6.14-rc4 No fix listed
Show 1 more
ProductAffected versionsFixed in
Linux kernel = 6.14-rc5 No fix listed

References