CVE-2025-40224

hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc()

State
Published
Severity
Not scored
Published
Dec 4, 2025
Updated
May 11, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 08ebc9def79fc0c4dbb6ecc39263006e3f98b750 to before 240b82b86a091c1aa49d951d4467425420a081a0Affected
  • 08ebc9def79fc0c4dbb6ecc39263006e3f98b750 to before a09a5aa8bf258ddc99a22c30f17fe304b96b5350Affected
LinuxLinux
  • 6.15Affected
  • before 6.15Not affected
  • 6.17.6 through 6.17.*Not affected
  • 6.18 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.