power: supply: cros_usbpd: Limit port counts to EC_USB_PD_MAX_PORTS
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3af15cfacd1eef7f223802d49a88cae23c509183 · < 4b1f2be1e1b74a50386ba718de3d62bfcf5ee701| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
power: supply: cros_usbpd: Limit port counts to EC_USB_PD_MAX_PORTS
Currently the cros_usbpd-charger driver probe iterates based on raw charger port count returned by the embedded controller. The only check is against the number of USB PD ports which the embedded controller also defines. A malicious embedded controller could return an inaccurate port count (up to 255) resulting in an out of bounds write and subsequent memory corruption.
Update helper functions in cros_usbpd-charger to limit port counts to EC_USB_PD_MAX_PORTS.
From the CVE record · Linux
The Linux kernel's cros_usbpd-charger driver does not adequately limit the charger port count reported by an embedded controller. A malicious embedded controller can report an inaccurate count, causing an out-of-bounds write and memory corruption during driver probe. No network, authentication, or user-interaction requirements are specified.
Engineers running Linux kernels with the cros_usbpd-charger driver should check their kernel versions; affected versions are not specified.