In the Linux kernel, the following vulnerability has been resolved:
hwmon: (occ) Fix division by zero in occshowpower_1()
In occshowpower1() case 1, the accumulator is divided by updatetag without checking for zero. If no samples have been collected yet (e.g. during early boot when the sensor block is included but hasn't been updated), update_tag is zero, causing a kernel divide-by-zero crash.
The 2019 fix in commit 211186cae14d ("hwmon: (occ) Fix division by zero issue") only addressed occgetpowravg() used by occshowpower2() and occshowpowera0(). This separate code path in occshowpower1() was missed.
Fix this by reusing the existing occgetpowravg() helper, which already handles the zero-sample case and uses mulu64u32div() to multiply before dividing for better precision. Move the helper above occshowpower_1() so it is visible at the call site.
[groeck: Fix alignment problems reported by checkpatch]
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31770.json",
"cna_assigner": "Linux"
}