diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-08-04 22:08:54 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-08-30 14:42:00 -0700 |
| commit | 51cfe54f815ae175c7d1126b983d4d7c89715004 (patch) | |
| tree | 56a6bcedccec4e7dda635017430434501d479064 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | aefbda23eeba234c3ff0f135dc5be6e294bd25a6 (diff) | |
| download | linux-next-51cfe54f815ae175c7d1126b983d4d7c89715004.tar.gz linux-next-51cfe54f815ae175c7d1126b983d4d7c89715004.zip | |
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.
Fixes: 82264d0cf7ae ("Input: synaptics-rmi4 - add SMBus support")
Cc: stable@vger.kernel.org
Reported-by: sashiko-bot@kernel.org
Assisted-by: LLM
Link: https://patch.msgid.link/anLFSMKSoKyyZ272@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
