CVE-2024-53075
JSON

5.5medium

riscv: Prevent a bad reference count on CPU nodes

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.22% (higher than 12% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: riscv: Prevent a bad reference count on CPU nodes When populating cache leaves we previously fetched the CPU device node at the very beginning. But when ACPI is enabled we go through a specific branch which returns early and does not call 'of_node_put' for the node that was acquired. Since we are not using a CPU device node for the ACPI code anyways, we can simply move the initialization of it just passed the ACPI block, and we are guaranteed to have an 'of_node_put' call for the acquired node. This prevents a bad reference count of the CPU device node. Moreover, the previous function did not check for errors when acquiring the device node, so a return -ENOENT has been added for that case.

Affected

Product or packageVersionsReported by
Linux Linuxfrom ebccacb0b599fa788a16eff35a7de14621f56804 before 80aec5a855106c668b5978c48e789f010198b832, from 604f32ea6909b0ebb8ab0bf1ab7dc66ee3dc8955 before 303846a3dc275e35fbb556d72f1e356ba669e4f8, from 604f32ea6909b0ebb8ab0bf1ab7dc66ee3dc8955 before 37233169a6ea912020c572f870075a63293b786a, 6.11
Not affected: before 6.11, from 6.11.7 up to 6.11.*, from 6.12 up to *
CVE List
linux linux_kernelfrom 6.11 before 6.11.7, 6.12NVD

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: riscv: Prevent a bad reference count on CPU nodes When populating cache leaves we previously fetched the CPU device node at the very beginning. But when ACPI is enabled we go through a specific branch which returns early and does not call 'of_node_put' for the node that was acquired. Since we are not using a CPU device node for the ACPI code anyways, we can simply move the initialization of it just passed the ACPI block, and we are guaranteed to have an 'of_node_put' call for the acquired node. This prevents a bad reference count of the CPU device node. Moreover, the previous function did not check for errors when acquiring the device node, so a return -ENOENT has been added for that case.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: riscv: Evitar un recuento de referencia incorrecto en los nodos de CPU Al rellenar las hojas de caché, anteriormente obteníamos el nodo del dispositivo de CPU al principio. Pero cuando ACPI está habilitado, pasamos por una rama específica que regresa temprano y no llama a 'of_node_put' para el nodo que se adquirió. Dado que de todos modos no estamos usando un nodo de dispositivo de CPU para el código ACPI, simplemente podemos mover la inicialización del mismo justo después del bloque ACPI, y tenemos la garantía de tener una llamada 'of_node_put' para el nodo adquirido. Esto evita un recuento de referencia incorrecto del nodo del dispositivo de CPU. Además, la función anterior no verificaba si había errores al adquirir el nodo del dispositivo, por lo que se agregó un retorno -ENOENT para ese caso.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-53075 changed 2026-05-11CVE Terms of Use
NVDCVE-2024-53075 changed 2026-06-17Public domain