7.8
CWE
416
Advisory Published
Updated

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

First published: Tue Apr 01 2025(Updated: )

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.

Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Affected SoftwareAffected VersionHow to fix
Linux Kernel
Linux Kernel>=5.10<6.6.83
Linux Kernel>=6.7<6.12.19
Linux Kernel>=6.13<6.13.7
Linux Kernel=6.14-rc1
Linux Kernel=6.14-rc2
Linux Kernel=6.14-rc3
Linux Kernel=6.14-rc4
Linux Kernel=6.14-rc5

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2025-21915?

    CVE-2025-21915 is categorized as a medium-severity vulnerability in the Linux kernel.

  • How do I fix CVE-2025-21915?

    To fix CVE-2025-21915, update your Linux kernel to the latest patched version provided by your distribution.

  • What does CVE-2025-21915 affect?

    CVE-2025-21915 affects the Linux kernel specifically in the driver_override_show() function within the cdx driver.

  • What type of vulnerability is CVE-2025-21915?

    CVE-2025-21915 is a use-after-free (UAF) vulnerability in the Linux kernel.

  • When was CVE-2025-21915 disclosed?

    CVE-2025-21915 was disclosed on TBD, 2025, following the resolution of the identified vulnerability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203