HIGH Introduced in 4.19
power PortCount Overflow
CVE-2026-89471
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
KernelScan AI6.8MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: power: supply: cros_usbpd-charger: bound the EC-reported port count cros_usbpd_charger_probe() reads two port counts from the EC and uses one of them, num_charger_ports, as the loop bound when populating a fixed-size array: struct port_data *ports[EC_USB_PD_MAX_PORTS]; /* 8 entries */ ... for (i = 0; i < charger->num_charger_ports; i++) charger->ports[charger->num_registered_psy++] = port; Both num_usbpd_ports (from EC_CMD_USB_PD_PORTS) and num_charger_ports (from EC_CMD_CHARGE_PORT_COUNT) are u8 values reported by the EC. The only validation is a sanity check that compares the two EC-reported values against each other: if (num_charger_ports < num_usbpd_ports || num_charger_ports > num_usbpd_ports + 1) return -EPROTO; It never checks either count against EC_USB_PD_MAX_PORTS, the size of the ports[] array. A malfunctioning, malicious or compromised EC that reports num_usbpd_ports == num_charger_ports == N for any N > 8 (for example both 255) passes this check, and the loop then writes N pointers into the 8-entry ports[] array embedded in the devm_kzalloc()'d charger_data, overflowing it by up to 255 - 8 = 247 entries (~1976 bytes): a slab out-of-bounds write. Reject a port count larger than the ports[] array can hold.
02KernelScan AI Analysis
Risk summary
A compromised or malfunctioning ChromeOS Embedded Controller can report an inflated USB-PD port count that the kernel driver uses without bounds-checking, causing a slab out-of-bounds write of up to ~2 KB during driver probe. Exploitation requires control of the EC firmware, which typically demands physical access to the device. The resulting kernel memory corruption can lead to code execution, information disclosure, or system crash.
Vulnerability analysis
The ChromeOS EC USB-PD charger driver reads a port count from the Embedded Controller during device probe and uses it as a loop bound to fill a fixed-size array, without ever comparing the count against the array's compile-time capacity. A compromised or malfunctioning EC that reports an inflated port count causes the kernel to write pointer values well past the end of the array, corrupting adjacent slab memory. The fix adds a simple upper-bound check that rejects any EC-reported port count exceeding the array size, refusing to proceed with probe if the value is too large. This vulnerability is specific to devices using the cros-ec platform (Chromebooks and similar hardware); triggering it requires control of the EC firmware, which normally demands physical access to the board or a prior compromise of the EC.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 4.19 | 5.10.270 | 0b5096f68041 |
| 5.15 | 4.19 | 5.15.221 | c46c9f447415 |
| 6.1 | 4.19 | 6.1.188 | a1905375dfc0 |
| 6.12 | 4.19 | 6.12.109 | fd29d08ee487 |
| 6.18 | 4.19 | 6.18.50 | 78be8b7403ff |
| 6.6 | 4.19 | 6.6.157 | 2746d502b12b |
| 7.2 | 4.19 | 7.2.4 | 3d1e01443b22 |
| mainline | 4.19 | 7.3 | 48355ce49359 |
| cip/5.10 | 4.19 | 5.10.271-cip78 | 0b5096f68041 |
| cip/6.1 | 4.19 | 6.1.189-cip61 | a1905375dfc0 |
| cip/6.1-rt | 4.19 | 6.1.189-cip61-rt32 | a1905375dfc0 |
| cip/6.12 | 4.19 | 6.12.111-cip32 | fd29d08ee487 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Fixed in 6.1.189-cip61 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.271-cip78 |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.268-cip77-rt34) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |