{"id":"CVE-2025-40224","state":"PUBLISHED","title":"hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nhwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc()\n\nThe driver allocates memory for sensor data using devm_kzalloc(), but\ndid not check if the allocation succeeded. In case of memory allocation\nfailure, dereferencing the NULL pointer would lead to a kernel crash.\n\nAdd a NULL pointer check and return -ENOMEM to handle allocation failure\nproperly.","publishedAt":"2025-12-04T15:31:16.193Z","updatedAt":"2026-05-11T21:45:11.677Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"08ebc9def79fc0c4dbb6ecc39263006e3f98b750","status":"affected","lessThan":"240b82b86a091c1aa49d951d4467425420a081a0","versionType":"git"},{"version":"08ebc9def79fc0c4dbb6ecc39263006e3f98b750","status":"affected","lessThan":"a09a5aa8bf258ddc99a22c30f17fe304b96b5350","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hwmon/cgbc-hwmon.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.17.6","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hwmon/cgbc-hwmon.c"]}],"references":["https://git.kernel.org/stable/c/240b82b86a091c1aa49d951d4467425420a081a0","https://git.kernel.org/stable/c/a09a5aa8bf258ddc99a22c30f17fe304b96b5350"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40224.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40224","state":"PUBLISHED","datePublished":"2025-12-04T15:31:16.193Z","dateUpdated":"2026-05-11T21:45:11.677Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.180Z"},"containers":{"cna":{"title":"hwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nhwmon: (cgbc-hwmon) Add missing NULL check after devm_kzalloc()\n\nThe driver allocates memory for sensor data using devm_kzalloc(), but\ndid not check if the allocation succeeded. In case of memory allocation\nfailure, dereferencing the NULL pointer would lead to a kernel crash.\n\nAdd a NULL pointer check and return -ENOMEM to handle allocation failure\nproperly."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"08ebc9def79fc0c4dbb6ecc39263006e3f98b750","status":"affected","lessThan":"240b82b86a091c1aa49d951d4467425420a081a0","versionType":"git"},{"version":"08ebc9def79fc0c4dbb6ecc39263006e3f98b750","status":"affected","lessThan":"a09a5aa8bf258ddc99a22c30f17fe304b96b5350","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hwmon/cgbc-hwmon.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.15","versionType":"semver"},{"version":"6.17.6","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hwmon/cgbc-hwmon.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/240b82b86a091c1aa49d951d4467425420a081a0"},{"url":"https://git.kernel.org/stable/c/a09a5aa8bf258ddc99a22c30f17fe304b96b5350"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T21:45:11.677Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.17.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.15","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}