CVE-2026-64339: usb: misc: usbio: bound bulk IN response length to the received transfer

Published Jul 25, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

usb: misc: usbio: bound bulk IN response length to the received transfer

usbiobulkmsg() copies bpktlen = le16tocpu(bpkt->len) bytes out of the bulk IN buffer (usbio->rxbuf, allocated with size usbio->rxbuflen) into the caller's buffer. bpktlen is fully controlled by the device and is only checked against ibuflen; ibuflen in turn is checked against usbio->txbuflen, not against rxbuflen:

if ((obuflen > (usbio->txbuflen - sizeof(bpkt))) || (ibuflen > (usbio->txbuflen - sizeof(bpkt)))) return -EMSGSIZE;

txbuflen and rxbuflen are taken independently from the bulk OUT and bulk IN endpoint wMaxPacketSize in usbioprobe(). A malicious or malfunctioning device that advertises a large bulk OUT endpoint and a small bulk IN endpoint (e.g. by claiming one of the quirk-free IDs such as the Lattice NX33U, 0x2ac1:0x20cb) therefore makes ibuflen, and hence the device-supplied bpktlen, exceed rxbuflen. memcpy() then reads up to txbuflen - rxbuflen bytes past the end of the rxbuf slab object. The over-read bytes are handed back to the i2c layer and on to user space through i2c-dev, disclosing adjacent slab memory; with KASAN this is reported as a slab-out-of-bounds read.

The number of bytes actually received is already known: act equals the URB actuallength and is bounded by rxbuflen. Reject any response that claims more payload than was received, mirroring the existing "act < sizeof(bpkt)" check just above.

The control path (usbioctrlmsg()) is not affected: it uses a single buffer (ctrlbuf) for both directions, so its analogous copy can never leave the allocation.

Found by code review. The out-of-bounds read was confirmed under AddressSanitizer with a faithful userspace model of usbiobulkmsg()'s receive path (an rxbuflen-sized buffer, the same act/ibuflen/bpktlen checks and the memcpy). A USB raw-gadget + dummyhcd reproducer is also available.

Affected Software

5 affected components
Linux Linux kernel
Linux Linux kernel>=6.18<6.18.39
Linux Linux kernel>=6.19<7.1.4
Linux Linux kernel=7.2-rc1
Linux Linux kernel=7.2-rc2

Event History

Jul 25, 2026
CVE Published
via MITRE·08:50 AM
Data Sourced
via MITRE·08:50 AM
Description
Data Sourced
via NVD·10:17 AM
RemedyDescriptionSeverityWeaknessAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203