hwmon: (adt7470) Fix busy-loop and I2C flooding in update thread
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 89fac11cb3e7c5860c425dba14845c09ccede39d · < 82d65f7ef11edcea0228745440b8b4b1f222c34c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (adt7470) Fix busy-loop and I2C flooding in update thread
When userspace configures 'auto_update_interval' to 0 via sysfs, the background kthread executes schedule_timeout_interruptible(0), which returns immediately.
If 'num_temp_sensors' is concurrently or previously set to 0, the msleep_interruptible() delay inside adt7470_read_temperatures() also becomes 0. This combination forces the background thread into a tight, unbounded busy-loop, hogging the CPU and flooding the I2C bus with a continuous stream of transactions.
Fix this vulnerability by raising the lower limit of the clamp_val in auto_update_interval_store() from 0 to 500 milliseconds. This guarantees a reasonable minimum sleep window between sensor updates, protecting the system from intentional or accidental I2C bus denial of service.
From the CVE record · Linux
The Linux kernel's adt7470 update thread can enter a busy-loop when userspace sets auto_update_interval to 0 via sysfs and num_temp_sensors is also 0. This local configuration can hog the CPU and flood the I2C bus, causing denial of service.
Anyone running a Linux kernel with the adt7470 hwmon driver should check; affected versions were not specified.