linux-yocto/drivers/usb
Amit Sunil Dhamne 6ffa219f90 usb: typec: tcpm/tcpci_maxim: Fix bounds check in process_rx()
commit 0736299d09 upstream.

Register read of TCPC_RX_BYTE_CNT returns the total size consisting of:

  PD message (pending read) size + 1 Byte for Frame Type (SOP*)

This is validated against the max PD message (`struct pd_message`) size
without accounting for the extra byte for the frame type. Note that the
struct pd_message does not contain a field for the frame_type. This
results in false negatives when the "PD message (pending read)" is equal
to the max PD message size.

Fixes: 6f413b559f ("usb: typec: tcpci_maxim: Chip level TCPC driver")
Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Reviewed-by: Kyle Tso <kyletso@google.com>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/stable/20250502-b4-new-fix-pd-rx-count-v1-1-e5711ed09b3d%40google.com
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250502-b4-new-fix-pd-rx-count-v1-1-e5711ed09b3d@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-27 11:07:25 +01:00
..
atm usb: atm: cxacru: fix a flaw in existing endpoint checks 2025-03-13 12:53:20 +01:00
c67x00
cdns3 usb: cdnsp: Fix issue with detecting USB 3.2 speed 2025-06-27 11:07:25 +01:00
chipidea usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handling 2025-05-02 07:46:59 +02:00
class usb: usbtmc: Fix read_stb function and get_stb ioctl 2025-06-27 11:07:24 +01:00
common
core usb: Flush altsetting 0 endpoints before reinitializating them after reset. 2025-06-27 11:07:25 +01:00
dwc2 usb: dwc2: gadget: remove of_node reference upon udc_stop 2025-02-21 13:50:02 +01:00
dwc3 usb: dwc3: gadget: Avoid using reserved endpoints on Intel Merrifield 2025-05-02 07:47:02 +02:00
early
gadget HID: usbhid: Eliminate recurrent out-of-bounds bug in usbhid_parse() 2025-06-27 11:07:24 +01:00
host usb: host: tegra: Prevent host controller crash when OTG port is used 2025-05-18 08:21:24 +02:00
image
isp1760
misc USB: chaoskey: Fix possible deadlock chaoskey_list_lock 2024-12-14 19:53:53 +01:00
mon
mtu3
musb usb: musb: Fix hardware lockup on first Rx endpoint request 2024-12-14 19:54:05 +01:00
phy usb: phy: Fix API devm_usb_put_phy() can not release the phy 2024-11-08 16:26:44 +01:00
renesas_usbhs usb: renesas_usbhs: Reorder clock handling and power management in probe 2025-06-27 11:07:16 +01:00
roles usb: roles: set switch registered flag early on 2025-02-21 13:50:01 +01:00
serial USB: serial: pl2303: add new chip PL2303GC-Q20 and PL2303GT-2AB 2025-06-27 11:07:05 +01:00
storage usb: storage: Ignore UAS driver for SanDisk 3.2 Gen2 storage device 2025-06-27 11:07:05 +01:00
typec usb: typec: tcpm/tcpci_maxim: Fix bounds check in process_rx() 2025-06-27 11:07:25 +01:00
usbip
Kconfig
Makefile
usb-skeleton.c