linux-stable/drivers/usb
Heikki Krogerus 3f345e907a usb: typec: ucsi: Only check the contract if there is a connection
The driver must make sure there is an actual connection
before checking details about the USB Power Delivery
contract. Those details are not valid unless there is a
connection.

This fixes NULL pointer dereference that is caused by an
attempt to register bogus partner alternate mode that the
firmware on some platform may report before the actual
connection.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=215117
Fixes: 6cbe4b2d5a ("usb: typec: ucsi: Check the partner alt modes always if there is PD contract")
Reported-by: Chris Hixon <linux-kernel-bugs@hixontech.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/eb34f98f-00ef-3238-2daa-80481116035d@leemhuis.info/
Link: https://lore.kernel.org/r/20211221140352.45501-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-21 16:30:53 +01:00
..
atm usb: atm: Use struct_size() helper 2021-10-05 12:50:22 +02:00
c67x00
cdns3 usb: cdnsp: Fix lack of spin_lock_irqsave/spin_lock_restore 2021-12-15 23:44:31 +01:00
chipidea usb: chipidea: ci_hdrc_imx: fix potential error pointer dereference in probe 2021-11-17 15:05:18 +01:00
class Merge 5.15-rc5 into usb-next 2021-10-11 07:39:38 +02:00
common Partially revert "usb: Kconfig: using select for USB_COMMON dependency" 2021-10-05 13:45:16 +02:00
core USB: NO_LPM quirk Lenovo USB-C to Ethernet Adapher(RTL8153-04) 2021-12-15 23:42:33 +01:00
dwc2 usb: dwc2: fix STM ID/VBUS detection startup delay in dwc2_driver_probe 2021-12-15 18:43:24 +01:00
dwc3 Revert "usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by default" 2021-12-09 20:03:09 +01:00
early Revert "usb: early: convert to readl_poll_timeout_atomic()" 2021-12-17 16:29:11 +01:00
gadget usb: gadget: f_fs: Clear ffs_eventfd in ffs_data_clear. 2021-12-21 09:05:21 +01:00
host xhci: Fresco FL1100 controller should not have BROKEN_MSI quirk set. 2021-12-21 12:38:33 +01:00
image scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions 2021-10-16 21:32:16 -04:00
isp1760 usb: isp1760: otg control register access 2021-08-27 16:11:39 +02:00
misc USB: iowarrior: fix control-message timeouts 2021-10-26 19:12:28 +02:00
mon
mtu3 usb: mtu3: set interval of FS intr and isoc endpoint 2021-12-21 09:05:45 +01:00
musb usb: musb: Balance list entry in musb_gadget_queue 2021-10-22 11:12:45 +02:00
phy USB: phy: tahvo:remove unnecessary debug log 2021-10-05 12:51:07 +02:00
renesas_usbhs usb: renesas_usbhs: Fix spelling mistake "faile" -> "failed" 2021-08-27 10:29:32 +02:00
roles usb: roles: add helper usb_role_string() 2021-05-27 09:17:18 +02:00
serial USB: serial: option: add Telit FN990 compositions 2021-12-14 09:22:06 +01:00
storage SCSI misc on 20211105 2021-11-05 08:42:02 -07:00
typec usb: typec: ucsi: Only check the contract if there is a connection 2021-12-21 16:30:53 +01:00
usbip usbip:vhci_hcd USB port can get stuck in the disabled state 2021-08-26 13:29:27 +02:00
Kconfig usb: remove reference to deleted config STB03xxx 2021-08-18 15:32:19 +02:00
Makefile usb: host: remove line for obsolete config USB_HWA_HCD 2021-08-18 15:32:19 +02:00
usb-skeleton.c usb: usb-skeleton: Update min() to min_t() 2021-10-05 12:56:48 +02:00