# CVE-2025-40224: hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc()

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-01)
- Published: 2025-12-04T15:31:16.193Z
- Modified: 2026-10-19T19:10:00.130Z
- 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.

(As written by CVE List.)

## Affected

- 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 *)

## References

- <https://git.kernel.org/stable/c/240b82b86a091c1aa49d951d4467425420a081a0>
- <https://git.kernel.org/stable/c/a09a5aa8bf258ddc99a22c30f17fe304b96b5350>

## Sources

- CVE List: [CVE-2025-40224](https://www.cve.org/CVERecord?id=CVE-2025-40224), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-40224](https://nvd.nist.gov/vuln/detail/CVE-2025-40224), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-40224 · Whole record: https://cve.day/CVE-2025-40224.json · Rebuilt by cve.day 2026-11-25T22:59:08.263Z
