CVE-2025-21915

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

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc5:*:*:*:*:*:*

History

15 Apr 2025, 17:05

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: cdx: Se corrige un posible error de UAF en driver_override_show() Se corrigió un posible problema de UAF en driver_override_show() en drivers/cdx/cdx.c Esta función driver_override_show() es parte de DEVICE_ATTR_RW, que incluye tanto driver_override_show() como driver_override_store(). Estas funciones se pueden ejecutar simultáneamente en sysfs. La función driver_override_store() usa driver_set_override() para actualizar el valor de driver_override, y driver_set_override() bloquea internamente el dispositivo (device_lock(dev)). Si driver_override_show() lee cdx_dev->driver_override sin bloquear, podría acceder potencialmente a un puntero liberado si driver_override_store() libera la cadena simultáneamente. Esto podría llevar a imprimir una dirección del kernel, lo cual es un riesgo de seguridad ya que DEVICE_ATTR puede ser leído por todos los usuarios. Además, se utiliza un patrón similar en drivers/amba/bus.c, así como en muchos otros controladores de bus, donde device_lock() se utiliza en la función show y ha funcionado sin problemas. Este posible error fue detectado por nuestra herramienta experimental de análisis estático, que analiza las API de bloqueo y las funciones emparejadas para identificar carreras de datos y violaciones de atomicidad.
First Time Linux linux Kernel
Linux
References () https://git.kernel.org/stable/c/0439d541aa8d3444ad41c39e39eb71acb57acde3 - () https://git.kernel.org/stable/c/0439d541aa8d3444ad41c39e39eb71acb57acde3 - Patch
References () https://git.kernel.org/stable/c/8473135f89c0949436a22adb05b8cece2fb3da91 - () https://git.kernel.org/stable/c/8473135f89c0949436a22adb05b8cece2fb3da91 - Patch
References () https://git.kernel.org/stable/c/91d44c1afc61a2fec37a9c7a3485368309391e0b - () https://git.kernel.org/stable/c/91d44c1afc61a2fec37a9c7a3485368309391e0b - Patch
References () https://git.kernel.org/stable/c/d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf - () https://git.kernel.org/stable/c/d7b339bbc887bcfc1a5b620bfc70c6fbb8f733bf - Patch
CWE CWE-416
CPE cpe:2.3:o:linux:linux_kernel:6.14:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.14:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

01 Apr 2025, 16:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-04-01 16:15

Updated : 2025-04-21 15:15


NVD link : CVE-2025-21915

Mitre link : CVE-2025-21915

CVE.ORG link : CVE-2025-21915


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-416

Use After Free