Description
In the Linux kernel, the following vulnerability has been resolved:

hwmon: (occ) Fix division by zero in occ_show_power_1()

In occ_show_power_1() case 1, the accumulator is divided by
update_tag 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 occ_get_powr_avg() used by
occ_show_power_2() and occ_show_power_a0(). This separate code
path in occ_show_power_1() was missed.

Fix this by reusing the existing occ_get_powr_avg() helper, which
already handles the zero-sample case and uses mul_u64_u32_div()
to multiply before dividing for better precision. Move the helper
above occ_show_power_1() so it is visible at the call site.

[groeck: Fix alignment problems reported by checkpatch]
Published: 2026-05-01
Score: n/a
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A division‑by‑zero bug exists in the occ_show_power_1 function of the Linux kernel hwmon subsystem. When the sensor has not yet collected any samples, a zero value is used as a divisor, which causes a kernel crash. This results in a denial‑of‑service by bringing the entire system down, rather than leaking sensitive data or providing code execution. The vulnerability is an instance of integer division by zero (CWE‑369).

Affected Systems

The issue affects all Linux kernels that include the hwmon occ driver, regardless of specific distribution, because the CPE string is generic for all Linux kernel versions. No particular vendor or patch level is listed in the CNA data.

Risk and Exploitability

Based on the description, it is inferred that the flaw is exploitable in a local context by any user who can read the /sys/class/hwmon power interface or cause the sensor to be queried before any data is collected. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. The severity is high due to the kernel crash, but the likelihood of exploitation is limited to users with sufficient local access and the ability to trigger the sensor read during early boot or no‑sample states.

Generated by OpenCVE AI on May 2, 2026 at 10:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to a kernel that incorporates the commit referenced in the advisory, which moves the helper function to avoid division by zero.
  • If an upgrade is not immediately possible, disable the occ hwmon module or block access to the /sys/class/hwmon path that triggers occ_show_power_1.
  • Continuously monitor kernel logs for oops or panic messages related to occ_show_power_1 and consider remediation if they appear.

Generated by OpenCVE AI on May 2, 2026 at 10:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4561-1 linux-6.1 security update
Debian DSA Debian DSA DSA-6243-1 linux security update
History

Sat, 02 May 2026 00:15:00 +0000


Fri, 01 May 2026 14:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: hwmon: (occ) Fix division by zero in occ_show_power_1() In occ_show_power_1() case 1, the accumulator is divided by update_tag 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 occ_get_powr_avg() used by occ_show_power_2() and occ_show_power_a0(). This separate code path in occ_show_power_1() was missed. Fix this by reusing the existing occ_get_powr_avg() helper, which already handles the zero-sample case and uses mul_u64_u32_div() to multiply before dividing for better precision. Move the helper above occ_show_power_1() so it is visible at the call site. [groeck: Fix alignment problems reported by checkpatch]
Title hwmon: (occ) Fix division by zero in occ_show_power_1()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-05-01T14:14:59.256Z

Reserved: 2026-03-09T15:48:24.140Z

Link: CVE-2026-31770

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-01T15:16:40.200

Modified: 2026-05-01T15:24:14.893

Link: CVE-2026-31770

cve-icon Redhat

Severity :

Publid Date: 2026-05-01T00:00:00Z

Links: CVE-2026-31770 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-05-02T10:30:40Z

Weaknesses