public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [SECURITY] usbip: vhci: heap buffer overflow via crafted number_of_packets in RET_SUBMIT
@ 2026-03-29 12:53 Sebastian Josue Alba Vives
  2026-03-29 12:53 ` [PATCH] usbip: vhci: validate number_of_packets in RET_SUBMIT response Sebastian Josue Alba Vives
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Sebastian Josue Alba Vives @ 2026-03-29 12:53 UTC (permalink / raw)
  To: security; +Cc: gregkh, shuah, stable, Sebastián Alba Vives

A malicious USB/IP server can send a RET_SUBMIT response with
number_of_packets larger than the original URB allocation, causing
usbip_recv_iso() and usbip_pad_iso() to write beyond
urb->iso_frame_desc[], overflowing the kernel heap.

Attack chain:
1. Client sends isochronous URB with number_of_packets = N
2. usbip_pack_pdu() overwrites urb->number_of_packets with N'
3. usbip_recv_iso() loops N' times over iso_frame_desc[N] -> OOB
4. usbip_pad_iso() also loops with N' -> second OOB

CVE-2016-3955 fixed the same pattern in usbip_recv_xbuff() for
actual_length but missed number_of_packets in usbip_recv_iso().
stub_rx.c validates for CMD_SUBMIT but vhci_rx.c has no validation
for RET_SUBMIT.

Impact: Remote heap buffer overflow WRITE, no auth, attacker
controlled data, potential kernel code execution. Affects all
kernels with CONFIG_USBIP_VHCI_HCD since USB/IP integration.

Found through manual source code auditing.

Reported-by: Sebastián Alba Vives <sebasjosue84@gmail.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-29 13:53 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-29 12:53 [SECURITY] usbip: vhci: heap buffer overflow via crafted number_of_packets in RET_SUBMIT Sebastian Josue Alba Vives
2026-03-29 12:53 ` [PATCH] usbip: vhci: validate number_of_packets in RET_SUBMIT response Sebastian Josue Alba Vives
2026-03-29 13:25   ` Greg KH
2026-03-29 13:17 ` [SECURITY] usbip: iso_frame_desc OOB memmove via crafted offset/length Sebastian Josue Alba Vives
2026-03-29 13:17   ` [PATCH] usbip: validate iso_frame_desc offset and length in usbip_recv_iso() Sebastian Josue Alba Vives
2026-03-29 13:24 ` [SECURITY] usbip: vhci: heap buffer overflow via crafted number_of_packets in RET_SUBMIT Greg KH
2026-03-29 13:34   ` Sebastián Alba
2026-03-29 13:50     ` Greg KH
2026-03-29 13:53       ` Sebastián Alba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox