CVE-2026-142989: usb: typec: ucsi: Set ucsi->connector before enabling notifications
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: ucsi: Set ucsi->connector before enabling notifications
In ucsiinit(), ucsi->connector is assigned only after the UCSISETNOTIFICATIONENABLE command completes. But once that command is sent, the PPM is free to raise a connector change notification at any time, which is handled through:
ucsinotifycommon() -> ucsiconnectorchange()
ucsiconnectorchange() indexes into ucsi->connector to get the connector and schedule its work item. If this notification arrives before ucsiinit() reaches the "ucsi->connector = connector;" line, ucsi->connector is still NULL and the driver crashes dereferencing it.
Fix this by setting ucsi->connector right after the connectors are registered, before notifications are enabled, so it is always valid by the time a connector change event can be delivered. Also clear ucsi->connector in the errunregister path so it isn't left pointing at freed memory if a later step in ucsiinit() fails.
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the crash?
A UCSI Platform Policy Manager must deliver a connector-change notification after the driver sends UCSI_SET_NOTIFICATION_ENABLE but before initialization assigns ucsi->connector. The notification causes the driver to dereference the still-NULL connector pointer.
What is the impact if the race occurs?
The UCSI driver crashes while processing the connector-change notification. This is a kernel-side failure affecting Type-C/UCSI initialization.
How does the fix prevent the issue?
The fix assigns ucsi->connector immediately after connector registration and before notifications are enabled. It also clears the pointer on the initialization error-unregister path to avoid retaining a pointer to freed memory.