EDAC/device_sysfs: Use kstrtouint() for poll_msec to prevent truncation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e27e3dac651771fe3250f6305dee277bce29fc5d · < 528052af901d6e6bbfa0e52362a70a58a5dd1e43| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
EDAC/device_sysfs: Use kstrtouint() for poll_msec to prevent truncation
The poll_msec sysfs store file uses simple_strtoul() which accepts an unsigned long, but the target field (poll_msec) is unsigned int. On 64-bit systems, a value > UINT_MAX is silently truncated when stored.
Fix the mismatch by using kstrtouint() instead. This rejects values larger than UINT_MAX 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.
From the CVE record · Linux
The EDAC poll_msec sysfs setting in the Linux kernel can silently truncate values larger than UINT_MAX on 64-bit systems. A locally supplied value that results in a zero delay can cause polling to spin and consume 100% CPU. The input does not specify authentication requirements.
Engineers running the Linux kernel should check whether their systems include the affected EDAC/device_sysfs code; affected versions are not specified.