hwmon: (tps53679) Fix array access with zero-length block read
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.226.19.127.0In the Linux kernel, the following vulnerability has been resolved:
hwmon: (tps53679) Fix array access with zero-length block read
i2c_smbus_read_block_data() can return 0, indicating a zero-length read. When this happens, tps53679_identify_chip() accesses buf[ret - 1] which is buf[-1], reading one byte before the buffer on the stack.
Fix by changing the check from "ret < 0" to "ret <= 0", treating a zero-length read as an error (-EIO), which prevents the out-of-bounds array access.
Also fix a typo in the adjacent comment: "if present" instead of duplicate "if".
From the CVE record · Linux
The Linux kernel’s tps53679 hwmon driver reads one byte before a stack buffer when an SMBus block read returns zero bytes. The input does not establish whether an attacker can trigger this condition or specify network, authentication, or user-interaction requirements.
Engineers running Linux kernels with the tps53679 hwmon driver should check their kernel; affected versions were not provided.