Input: rmi_smbus - fix out-of-bounds read in rmi_smb_write_block()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 82264d0cf7aef2247563c031ff2ab96579d5d0cc · < dc05ec97b8299e48e31367a9bc412c7e9c0e2b42| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Input: rmi_smbus - fix out-of-bounds read in rmi_smb_write_block()
When chunking writes into SMBus blocks in rmi_smb_write_block(), the loop calculates block_len using the original total length (len) instead of the remaining length (cur_len).
If len is greater than 32 bytes (SMB_MAX_COUNT), block_len remains 32 for every iteration, even on the final partial chunk where fewer than 32 bytes remain. This causes smb_block_write() to read 32 bytes from the advanced data buffer pointer, reading past the end of the input buffer.
Fix this by calculating block_len using cur_len and advancing the buffer and address pointers by block_len.
From the CVE record · Linux
The Linux kernel’s rmi_smb_write_block() can read past the input buffer when an SMBus write exceeds 32 bytes and its final chunk is shorter than 32 bytes. An attacker who can cause such a write may trigger the read; the input does not specify whether access is local or network-based, or whether authentication or user interaction is required.
Engineers running Linux kernels with the rmi_smbus driver should check their versions; affected versions are not specified.