diff options
| author | Heikki Krogerus <[email protected]> | 2021-12-21 14:03:52 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2021-12-21 15:30:53 +0000 |
| commit | 3f345e907a8e7c56fdebf7231cd67afc85d02aaa (patch) | |
| tree | 231b9cba0f3c6b43b78d814fd0c43da97ec53851 /net/unix/af_unix.c | |
| parent | xhci: Fresco FL1100 controller should not have BROKEN_MSI quirk set. (diff) | |
| download | kernel-3f345e907a8e7c56fdebf7231cd67afc85d02aaa.tar.gz kernel-3f345e907a8e7c56fdebf7231cd67afc85d02aaa.zip | |
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: 6cbe4b2d5a3f ("usb: typec: ucsi: Check the partner alt modes always if there is PD contract")
Reported-by: Chris Hixon <[email protected]>
Signed-off-by: Heikki Krogerus <[email protected]>
Link: https://lore.kernel.org/r/[email protected]/
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
