Files
linux-stable-mirror/include/linux
RD Babiera 114a977e0f usb: typec: altmodes/displayport: do not index invalid pin_assignments
commit af4db5a35a upstream.

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.

Fixes: 0e3bb7d689 ("usb: typec: Add driver for DisplayPort alternate mode")
Cc: stable <stable@kernel.org>
Signed-off-by: RD Babiera <rdbabiera@google.com>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250618224943.3263103-2-rdbabiera@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-17 18:27:45 +02:00
..
2025-06-27 11:04:09 +01:00
2024-07-05 09:12:55 +02:00
2024-06-21 14:53:19 +02:00
2024-06-21 14:53:46 +02:00
2024-10-17 15:07:44 +02:00
2025-07-17 18:27:44 +02:00
2024-06-21 14:53:28 +02:00
2025-03-13 12:47:21 +01:00
2025-06-04 14:37:08 +02:00
2025-03-13 12:47:24 +01:00
2025-04-10 14:30:53 +02:00
2025-02-01 18:22:32 +01:00
2025-01-09 13:24:59 +01:00
2025-06-27 11:04:09 +01:00
2024-07-05 09:12:55 +02:00
2025-06-04 14:37:09 +02:00
2024-10-17 15:07:57 +02:00