linux-yocto/include/linux/usb
RD Babiera 45e9444b3b 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-10 16:03:05 +02:00
..
audio-v2.h
audio-v3.h
audio.h
c67x00.h
ccid.h
cdc_ncm.h
cdc-wdm.h
cdc.h
ch9.h
chipidea.h usb: chipidea: add CI_HDRC_HAS_SHORT_PKT_LIMIT flag 2025-01-09 13:31:46 +01:00
composite.h
ehci_def.h
ehci_pdriver.h
ehci-dbgp.h
ezusb.h
functionfs.h
g_hid.h
gadget_configfs.h
gadget.h
hcd.h usb: xhci: Add timeout argument in address_device USB HCD callback 2024-04-27 17:11:36 +02:00
input.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
m66592.h
midi-v2.h
musb-ux500.h
musb.h
net2280.h
of.h
ohci_pdriver.h
onboard_hub.h
otg-fsm.h
otg.h
pd_ado.h
pd_bdo.h
pd_ext_sdb.h
pd_vdo.h
pd.h
phy_companion.h
phy.h Revert "usb: phy: add usb phy notify port status API" 2023-12-03 07:33:08 +01:00
quirks.h usb: new quirk to reduce the SET_ADDRESS request timeout 2024-04-27 17:11:36 +02:00
r8a66597.h
r8152.h r8152: add vendor/device ID pair for Dell Alienware AW1022z 2025-06-04 14:42:11 +02:00
renesas_usbhs.h
rndis_host.h
role.h
rzv2m_usb3drd.h
serial.h
sl811.h
storage.h
tcpci.h
tcpm.h usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPS 2025-02-08 09:52:37 +01:00
tegra_usb_phy.h
typec_altmode.h
typec_dp.h usb: typec: altmodes/displayport: do not index invalid pin_assignments 2025-07-10 16:03:05 +02:00
typec_mux.h
typec_retimer.h
typec_tbt.h
typec.h
uas.h
ulpi.h
usb_phy_generic.h
usb338x.h
usbnet.h usbnet: fix cyclical race on disconnect with work queue 2024-10-04 16:29:50 +02:00
uvc.h
webusb.h
xhci-dbgp.h