KernelScan.io

HIGH Introduced in 2.6.12

usb/core ControlEndpoint UAF

CVE-2026-98763

CVSS 7.8 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: usb: core: clear both ep_in and ep_out for non-ep0 control endpoints In usb_enable_endpoint(), non-zero control endpoints (where usb_endpoint_xfer_control(&ep->desc) is true) populate both dev->ep_in[epnum] and dev->ep_out[epnum] with the same struct usb_host_endpoint pointer. However, usb_disable_endpoint() only clears either dev->ep_out[epnum] or dev->ep_in[epnum] depending on the direction bit of epaddr when reset_hardware is set, leaving the opposite direction's array slot pointing to the disabled/freed endpoint. Clear both dev->ep_out[epnum] and dev->ep_in[epnum] when disabling a non-ep0 control endpoint with reset_hardware set, and update the function kerneldoc accordingly. Tested in QEMU against Linux 7.3.0-rc3 using dummy_hcd and raw-gadget to enumerate a USB device with a non-zero control endpoint (bEndpointAddress 0x01, bmAttributes USB_ENDPOINT_XFER_CONTROL), verifying that both dev->ep_in[1] and dev->ep_out[1] are cleared when the interface is disabled.

02

Engine v0.9.0

Risk summary

A use-after-free in the USB core leaves a dangling pointer when a non-zero control endpoint is disabled. A local attacker with access to the USB gadget subsystem (e.g., via /dev/raw-gadget) or physical USB access can trigger this to achieve kernel code execution or denial of service.

Affecteddrivers/usb/core/message.c (usb core)

Vulnerability analysis

When a non-zero control endpoint is enabled, the USB core stores the same endpoint pointer in both the ep_in and ep_out arrays for that endpoint number. However, when the endpoint is disabled with hardware reset, only the array slot matching the endpoint's direction bit was cleared, leaving the opposite slot pointing to the now-freed endpoint structure. The fix ensures both array slots are cleared for non-ep0 control endpoints during hardware reset. This vulnerability is reachable by any local user who can interact with the USB gadget subsystem (such as through raw-gadget or dummy_hcd) or by plugging in a malicious USB device, requiring no special privileges beyond local system access.

03

BranchIntroducedFixed inPatch commit
5.102.6.125.10.27359d2c9d70fa4
5.152.6.125.15.224a7928ad4bbb3
6.12.6.126.1.191b521fe45e06b
6.122.6.126.12.1137a9f61476b0e
6.182.6.126.18.561da16c46b8d7
6.62.6.126.6.160198d74dcfa12
7.22.6.127.2.10c50413ecb662
mainline2.6.127.30e8baa78d872
cip/6.122.6.126.12.114-cip347a9f61476b0e

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.114-cip34
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip115)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)