usb: typec: altmodes/displayport: do not index invalid pin_assignments
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0e3bb7d6894d9b6e67d6382bb03a46a1dc989588 · < 5581e694d3a1c2f32c5a51d745c55b107644e1f8| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: altmodes/displayport: do not index invalid pin_assignments
A poorly implemented DisplayPort Alt Mode port partner can indicate that its pin assignment capabilities are greater than the maximum value, DP_PIN_ASSIGN_F. In this case, calls to pin_assignment_show will cause a BRK exception due to an out of bounds array access.
Prevent for loop in pin_assignment_show from accessing invalid values in pin_assignments by adding DP_PIN_ASSIGN_MAX value in typec_dp.h and using i < DP_PIN_ASSIGN_MAX as a loop condition.
From the CVE record · Linux
The Linux kernel's USB Type-C DisplayPort Alt Mode code can read beyond an array when a port partner reports pin assignment capabilities above the supported maximum. This can cause a BRK exception when pin_assignment_show is called. The input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with the affected USB Type-C DisplayPort Alt Mode code should check their kernel versions; affected versions are not specified.