diff options
| author | Zhang Cen <rollkingzzc@gmail.com> | 2026-05-19 19:11:50 +0800 |
|---|---|---|
| committer | Johan Hovold <johan@kernel.org> | 2026-05-20 16:22:46 +0200 |
| commit | 4ce058df2ee02cc2a0f0fd5cd64ce6f1482a0b65 (patch) | |
| tree | 8cb5ca23267e5aaf7a297ddef7b3e3dd2a0791b4 /scripts | |
| parent | 5d6919055dec134de3c40167a490f33c74c12581 (diff) | |
USB: serial: belkin_sa: validate interrupt status length
The Belkin interrupt callback treats interrupt data as a four-byte
status report and reads LSR/MSR fields at offsets 2 and 3. The
interrupt-in buffer length is derived from endpoint wMaxPacketSize, and
short interrupt transfers may complete successfully with a smaller
actual_length.
Check the completed interrupt packet length before parsing status
fields so short interrupt endpoints and short successful packets are
ignored instead of causing out-of-bounds or stale status-byte reads.
KASAN report as below:
BUG: KASAN: slab-out-of-bounds in belkin_sa_read_int_callback()
Read of size 1
Call trace:
belkin_sa_read_int_callback() (drivers/usb/serial/belkin_sa.c:202)
__usb_hcd_giveback_urb() (drivers/usb/core/hcd.c:1630)
dummy_timer() (?:?)
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Assisted-by: Codex:gpt-5.5
Signed-off-by: Zhang Cen <rollkingzzc@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
