Skip to contentSkip to conversation

CVE-2026-99308: usb: xhci: Fix bounce buffer overflow

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 16

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

usb: xhci: Fix bounce buffer overflow

High-speed devices with out of spec 1024 byte bulk endpoints exist and are allowed by USB core, but xhci-hcd always sets packet size to 512. The exact nature of these devices isn't documented, commit fb5ee84ea72c ("USB: Accept bulk endpoints with 1024-byte maxpacket") only states that they "don't work with xHCI host controllers", whatever it means.

But somebody (or a malicious device) can try, and then the driver will allocate a 512 byte bounce buffer for this endpoint and may write up to 1024 bytes into it if particular scatter-gather URBs are used, because xhci_align_td() obtains packet size from the descriptor. Fix this.

As a side effect, TRBs will be aligned to the packet size chosen by the driver on all endpoints of all speeds. Alignment serves the xHC, not device, so this is fine. Only out of spec devices are affected anyway.

The Linux kernel CVE team has assigned CVE-2026-99308 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.8 with commit f9c589e142d04b8a19eb382162f804d17102b5ed and fixed in 6.18.63 with commit d0d15d7a11f2a45e5d29ab4780a094992d7a26a2
	Issue introduced in 4.8 with commit f9c589e142d04b8a19eb382162f804d17102b5ed and fixed in 7.3.4 with commit e95ace4abebd564b50b856513e24853d35be06cd
	Issue introduced in 4.8 with commit f9c589e142d04b8a19eb382162f804d17102b5ed and fixed in 7.4-rc1 with commit 68c5cb7574c567e83ba95258cb146db95e069a87

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99308

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/usb/host/xhci-ring.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/d0d15d7a11f2a45e5d29ab4780a094992d7a26a2
	https://git.kernel.org/stable/c/e95ace4abebd564b50b856513e24853d35be06cd
	https://git.kernel.org/stable/c/68c5cb7574c567e83ba95258cb146db95e069a87