linux-kernelorg-stable/include/linux/usb
RD Babiera af4db5a35a 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.

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>
2025-06-24 15:42:55 +01:00
..
audio-v2.h
audio-v3.h
audio.h
c67x00.h
ccid.h
cdc-wdm.h
cdc.h
cdc_ncm.h
ch9.h
chipidea.h
composite.h USB: gadget: fix up const issue with struct usb_function_instance 2025-05-23 12:31:34 +02:00
ehci-dbgp.h
ehci_def.h
ehci_pdriver.h
ezusb.h
func_utils.h
functionfs.h
g_hid.h
gadget.h
gadget_configfs.h
hcd.h
input.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
ljca.h
m66592.h
mctp-usb.h
midi-v2.h
musb-ux500.h
musb.h
net2280.h
of.h
ohci_pdriver.h
onboard_dev.h
otg-fsm.h
otg.h
pd.h
pd_ado.h
pd_bdo.h
pd_ext_sdb.h
pd_vdo.h
phy.h
phy_companion.h
quirks.h
r8a66597.h
r8152.h
renesas_usbhs.h
rndis_host.h
role.h
rzv2m_usb3drd.h
serial.h
sl811.h
storage.h
tcpci.h
tcpm.h
tegra_usb_phy.h
typec.h
typec_altmode.h
typec_dp.h usb: typec: altmodes/displayport: do not index invalid pin_assignments 2025-06-24 15:42:55 +01:00
typec_mux.h
typec_retimer.h
typec_tbt.h
uas.h
ulpi.h usb: ulpi: Remove unused otg_ulpi_create 2025-03-03 10:23:35 +01:00
usb338x.h
usb_phy_generic.h
usbnet.h
uvc.h
webusb.h
xhci-dbgp.h
xhci-sideband.h usb: host: xhci: Notify xHCI sideband on transfer ring free 2025-04-11 13:02:30 +02:00