#1148831 usbredir: CVE-2026-92382

Package:
src:usbredir
Source:
src:usbredir
Submitter:
Salvatore Bonaccorso
Date:
2026-11-08 16:39:02 UTC
Severity:
normal
Tags:
#1148831#5
Date:
2026-09-24 07:08:46 UTC
From:
To:
Hi,

The following vulnerability was published for usbredir.

CVE-2026-92382[0]:
| An out-of-bounds write flaw was found in usbredir. Starting an
| isochronous OUT stream with a transfer count of 1 leaves the
| stream's single transfer buffer permanently unsubmitted, defeating
| the bounds check in usbredirhost_iso_packet() and allowing a
| usbredir peer to write past the end of the packet descriptor array
| on every subsequent isochronous packet.

Unfortunately there is only the reference to the Red Hat bugzilla,
which though is not public. SUSE has as well not more information in
their tracker and searching for information. It might be worth filling
an upstream issue to ask.

If you fix the vulnerability please also make sure to include the
CVE (Common Vulnerabilities & Exposures) id in your changelog entry.

For further information see:

[0] https://security-tracker.debian.org/tracker/CVE-2026-92382
https://www.cve.org/CVERecord?id=CVE-2026-92382
[1] https://bugzilla.redhat.com/show_bug.cgi?id=2535972
[2] https://bugzilla.suse.com/show_bug.cgi?id=1282260

Regards,
Salvatore

#1148831#10
Date:
2026-11-08 16:37:34 UTC
From:
To:
Hi,

The Red Hat entry is still not public, but the CVE description is specific
enough to find this in the source. Upstream's main branch has no fix:
usbredirhost.c there is identical to 0.15.0, and its last commit is from
March 2026. A patch is attached.

From reading usbredirhost/usbredirhost.c:

For an out stream, usbredirhost_start_stream_unlocked() does count /= 2 and
submits that many transfers, then sets stream_started. With transfer_count
1 that submits nothing.

usbredirhost_iso_packet() starts the stream when available == needed, where
needed is pkts_per_transfer * transfer_count / 2. With pkts_per_transfer 1
and transfer_count 1, needed is 0, and available is 0 right after the first
packet because i and j wrapped. So the stream is marked started while its
only transfer is full and unsubmitted. Later packets see stream_started,
but packet_idx has moved past pkts_per_transfer, so the equality check that
submits a full transfer never matches. j keeps growing, and both the memcpy
to libusb_get_iso_packet_buffer() and the write to
iso_packet_desc[j].length go out of bounds, under the control of the
usbredir peer.

So by my reading the trigger is narrower than the CVE text: it also needs
pkts_per_transfer 1. With transfer_count 1 and pkts_per_transfer 2 or more,
the stream starts halfway through the transfer and the transfer is still
submitted when full. usbredirhost_alloc_stream_unlocked() accepts both
values of 1. Out endpoints only.

The patch does two things. It moves the check that submits a full transfer
so it also runs right after the stream is started, and it treats an
out-of-range packet_idx as a queue overflow. A failed start clears
stream_started, so the new check does not touch a freed transfer.

The patch applies to 0.15.0-1 (trixie/forky/sid), 0.13.0-2 (bookworm) and
0.8.0-1 (bullseye); on 0.8.0-1 one hunk has an offset. None of these has a
patch in debian/patches.

What I checked: the patched file compiles without warnings on all three
versions, against libusb 1.0.30 headers and an empty config. I then ran the
real usbredirhost_iso_packet() before and after the patch, under ASan and
UBSan, in a harness with a stubbed libusb_submit_transfer() and modelled
transfer completion. Ten valid configurations gave identical transfer
submission order on all three versions, with no sanitizer reports:
packets-per-transfer/transfer-count of 8/4, 8/2, 1/2, 1/4, 3/3, 2/1, 4/1,
16/10, 32/5 and 5/1.

What I did not test: I deliberately did not run the 1/1 configuration, so
the out-of-bounds write is not reproduced and the fix is not demonstrated
on it. I did not build the full package, run its tests, or use a real
device or guest. The harness models completion, so it says nothing about
real USB timing.

I have not sent this upstream.

Regards,
Sumit Verma