Not scored
hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc()
- Severity
- Not scored
- Exploit likelihood
- 0.20% (higher than 10% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc() The driver allocates memory for sensor data using devm_kzalloc(), but did not check if the allocation succeeded. In case of memory allocation failure, dereferencing the NULL pointer would lead to a kernel crash. Add a NULL pointer check and return -ENOMEM to handle allocation failure properly.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 08ebc9def79fc0c4dbb6ecc39263006e3f98b750 before 240b82b86a091c1aa49d951d4467425420a081a0, from 08ebc9def79fc0c4dbb6ecc39263006e3f98b750 before a09a5aa8bf258ddc99a22c30f17fe304b96b5350, 6.15 Not affected: before 6.15, from 6.17.6 up to 6.17.*, from 6.18 up to * | CVE List |
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc() The driver allocates memory for sensor data using devm_kzalloc(), but did not check if the allocation succeeded. In case of memory allocation failure, dereferencing the NULL pointer would lead to a kernel crash. Add a NULL pointer check and return -ENOMEM to handle allocation failure properly.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: hwmon: (cgbc-hwmon) Añadir la comprobación de NULL faltante después de devm_kzalloc() El controlador asigna memoria para datos de sensor usando devm_kzalloc(), pero no comprobó si la asignación tuvo éxito. En caso de fallo en la asignación de memoria, desreferenciar el puntero NULL llevaría a una caída del kernel. Añadir una comprobación de puntero NULL y devolver -ENOMEM para manejar el fallo de asignación correctamente.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-40224 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2025-40224 changed 2026-10-19 | Public domain |