CVE-2026-64339

Source
https://cve.org/CVERecord?id=CVE-2026-64339
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64339.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-64339
Downstream
Published
2026-07-25T08:50:03.272Z
Modified
2026-07-27T04:03:19.853798732Z
Summary
usb: misc: usbio: bound bulk IN response length to the received transfer
Details

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 rxbuf_len:

if ((obuf_len > (usbio->txbuf_len - sizeof(*bpkt))) ||
    (ibuf_len > (usbio->txbuf_len - 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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64339.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
121a0f839dbb397af5fabb701cea3e9983223e50
Fixed
48394f94211cf8fe0ea8604fc441633abf90fc94
Fixed
fc1b546973c1442d5b947fcdd03581f20ecc5bd2
Fixed
8c6314489550fa81d41723a0ff33f655b5b6c7b6

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64339.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.18.0
Fixed
6.18.39
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.1.4

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-64339.json"