mirror-linux/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 usb: chipidea: add CI_HDRC_HAS_SHORT_PKT_LIMIT flag 2024-10-04 15:13:58 +02:00
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 usb: gadget: function: move u_f.h to include/linux/usb/func_utils.h 2024-09-03 09:57:08 +02:00
functionfs.h
g_hid.h
gadget.h
gadget_configfs.h usb: gadget: configfs: Constify struct config_item_type 2024-08-13 10:38:34 +02:00
hcd.h
input.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
ljca.h
m66592.h
mctp-usb.h usb: Add base USB MCTP definitions 2025-02-21 16:45:21 -08:00
midi-v2.h
musb-ux500.h
musb.h usb: musb: Constify struct musb_fifo_cfg 2025-02-03 16:29:53 +01:00
net2280.h
of.h
ohci_pdriver.h
onboard_dev.h
otg-fsm.h
otg.h
pd.h usb: typec: tcpm: Add new AMS for Get_Revision response 2024-12-24 08:56:04 +01:00
pd_ado.h
pd_bdo.h
pd_ext_sdb.h
pd_vdo.h
phy.h usb: phy: Remove API devm_usb_put_phy() 2025-01-13 06:12:09 +01:00
phy_companion.h
quirks.h
r8a66597.h
r8152.h r8152: add vendor/device ID pair for Dell Alienware AW1022z 2025-02-10 17:57:35 -08:00
renesas_usbhs.h
rndis_host.h
role.h
rzv2m_usb3drd.h
serial.h USB: serial: set driver owner when registering drivers 2024-08-26 15:28:24 +02:00
sl811.h
storage.h usb: storage: add a macro for the upper limit of max LUN 2024-12-04 16:33:54 +01:00
tcpci.h usb: typec: tcpci: use GENMASK() for TCPC_TRANSMIT register fields 2024-08-07 12:49:30 +02:00
tcpm.h usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPS 2025-01-17 12:40:20 +01:00
tegra_usb_phy.h
typec.h usb: typec: Make active on port altmode writable 2024-12-24 08:56:05 +01:00
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 usb: typec: Add driver for Thunderbolt 3 Alternate Mode 2024-12-24 08:56:05 +01:00
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 usbnet: fix cyclical race on disconnect with work queue 2024-09-26 10:54:42 +02:00
uvc.h media: uvcvideo: Add support for the D3DFMT_R5G6B5 pixmap type 2024-10-08 16:04:44 +02:00
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