HIGH
usb UCSI Connector OOB
CVE-2026-31729
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.8MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: usb: typec: ucsi: validate connector number in ucsi_notify_common() The connector number extracted from CCI via UCSI_CCI_CONNECTOR() is a 7-bit field (0-127) that is used to index into the connector array in ucsi_connector_change(). However, the array is only allocated for the number of connectors reported by the device (typically 2-4 entries). A malicious or malfunctioning device could report an out-of-range connector number in the CCI, causing an out-of-bounds array access in ucsi_connector_change(). Add a bounds check in ucsi_notify_common(), the central point where CCI is parsed after arriving from hardware, so that bogus connector numbers are rejected before they propagate further.
02KernelScan AI Analysis
Risk summary
A malicious or malfunctioning USB Type-C device can trigger an out-of-bounds array access by reporting invalid connector numbers in the Command Completion and Indication (CCI) field. This affects systems with USB Type-C ports where untrusted devices can be connected, potentially leading to information disclosure or system crashes.
Vulnerability analysis
The vulnerability occurs in the UCSI (USB Type-C Connector System Software Interface) driver where connector numbers from hardware are used as array indices without bounds checking. The UCSI_CCI_CONNECTOR() macro extracts a 7-bit connector number (0-127) from the CCI field, but the connector array is only allocated for the actual number of connectors reported by the device (typically 2-4). A malicious device can send a CCI with an out-of-range connector number, causing ucsi_connector_change() to access memory beyond the allocated array bounds. The fix adds validation in ucsi_notify_common() to ensure the connector number does not exceed ucsi->cap.num_connectors before passing it to ucsi_connector_change().
03Fix Versions
| Branch | Fixed in | Patch commit |
|---|---|---|
| 6.12 | 6.12.81 | f6dcbf2b024d |
| 6.18 | 6.18.22 | f4e608fe12b7 |
| 6.19 | 6.19.12 | 98429e9ec89a |
| mainline | 7.0 | d2d8c17ac01a |