usb: typec: ucsi: validate connector number in ucsi_connector_change()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c1b0bc2dabfa884dea49c02adaf3cd6b52b33d2f · < 288a81a8507052bcfbf884d39a463c44c42c5fd9| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: ucsi: validate connector number in ucsi_connector_change()
The connector number in a UCSI CCI notification is a 7-bit field supplied by the PPM. ucsi_connector_change() uses it to index the ucsi->connector[] array without checking it against the number of connectors the PPM reported at init time, so a buggy or malicious PPM (EC firmware, or an I2C-attached UCSI controller on the ccg / stm32g0 / glink transports) can drive schedule_work() on memory past the end of the array.
Reject connector numbers that are zero or exceed cap.num_connectors before dereferencing the array.
From the CVE record · Linux
The Linux kernel's UCSI connector change handler does not validate a connector number before using it to index an array. A buggy or malicious PPM, such as EC firmware or an attached UCSI controller, can supply an invalid number and cause work to be scheduled on memory past the array. The input does not describe a network attack, authentication requirement, or user interaction.
Engineers running Linux kernels with UCSI support should check whether their kernel includes the connector-number validation fix; affected versions are not specified.