hwmon: (pmbus/adm1266) reject implausible blackbox record_count
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 15609d1893020436e1e8ccfd9ded774a96dd17a2 · < 75c862adf3d3caab4f49bb3530723c215376e37c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
hwmon: (pmbus/adm1266) reject implausible blackbox record_count
adm1266_nvmem_read_blackbox() loops over a record_count that comes straight from byte 3 of the BLACKBOX_INFO response. The destination buffer is data->dev_mem, sized for the nvmem cell's declared 2048 bytes (ADM1266_BLACKBOX_MAX_RECORDS * ADM1266_BLACKBOX_SIZE = 32 * 64). A device that reports a record_count greater than 32 -- whether due to firmware bugs, bus corruption, or a non-responsive slave returning 0xff -- would walk read_buff past the end of the dev_mem allocation on the trailing iterations.
Cap record_count at ADM1266_BLACKBOX_MAX_RECORDS (introduced here) before entering the loop and return -EIO on any larger value, so a malformed BLACKBOX_INFO response cannot drive the loop out of bounds.
From the CVE record · Linux
The Linux kernel’s adm1266 blackbox reader trusts a record count reported by the device. If the count exceeds 32, the read can run past its allocated buffer. The input does not establish an attacker-controlled path or specify network access, authentication, or user interaction requirements.
Engineers running Linux systems that use the adm1266 hwmon driver should check their kernel version; affected versions are not specified.