Skip to contentSkip to conversation

CVE-2026-98157: EDAC/device_sysfs: Use kstrtouint() for poll_msec to prevent truncation

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-98157 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.23 with commit e27e3dac651771fe3250f6305dee277bce29fc5d and fixed in 6.12.111 with commit ea01c061d839b520f385f112908de1c6e3391327
	Issue introduced in 2.6.23 with commit e27e3dac651771fe3250f6305dee277bce29fc5d and fixed in 6.18.53 with commit 528052af901d6e6bbfa0e52362a70a58a5dd1e43
	Issue introduced in 2.6.23 with commit e27e3dac651771fe3250f6305dee277bce29fc5d and fixed in 7.2.7 with commit 0e022ee4f8e0dc843ba4c80bb75408a7704279af
	Issue introduced in 2.6.23 with commit e27e3dac651771fe3250f6305dee277bce29fc5d and fixed in 7.3-rc2 with commit 66cc9dec919dd63d8e4b3d386f7aed3ae684e645

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98157

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/edac/edac_device_sysfs.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/ea01c061d839b520f385f112908de1c6e3391327
	https://git.kernel.org/stable/c/528052af901d6e6bbfa0e52362a70a58a5dd1e43
	https://git.kernel.org/stable/c/0e022ee4f8e0dc843ba4c80bb75408a7704279af
	https://git.kernel.org/stable/c/66cc9dec919dd63d8e4b3d386f7aed3ae684e645