CVE-2026-98157: EDAC/device_sysfs: Use kstrtouint() for poll_msec to prevent truncation
In the Linux kernel, the following vulnerability has been resolved:
EDAC/devicesysfs: Use kstrtouint() for pollmsec to prevent truncation
The pollmsec sysfs store file uses simplestrtoul() which accepts an unsigned long, but the target field (pollmsec) is unsigned int. On 64-bit systems, a value > UINTMAX is silently truncated when stored.
Fix the mismatch by using kstrtouint() instead. This rejects values larger than UINTMAX at parse time, making truncation impossible. Also add a check for value < 1 to reject the 0-delay case, which would cause the poll work to spin without delay and consume 100% CPU.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Use kstrtouint() instead of simple_strtoul() for the poll_msec sysfs store file, and reject values less than 1 to prevent truncation and zero-delay spinning.
EDAC/device_sysfs poll_msec parsing = kstrtouint(); reject values < 1
Event History
Frequently Asked Questions
What access is needed to trigger the issue?
An attacker or user must be able to write a value to the EDAC device poll_msec sysfs store file. The issue is triggered by supplying either a value larger than UINT_MAX, which can be truncated on 64-bit systems, or zero, which creates a no-delay polling loop.
What is the practical impact of setting poll_msec to zero?
A zero value causes the poll work to run without delay. This can spin continuously and consume 100% CPU.
How does the fix change accepted poll_msec values?
The corrected code parses the value as an unsigned int and rejects values larger than UINT_MAX. It also rejects values below 1, preventing zero-delay polling.