usb: ucsi: Fix NULL pointer deref in ucsi_connector_change()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: ucsi: Fix NULL pointer deref in ucsi_connector_change()
When ucsi_init() fails, ucsi->connector is NULL, yet in case of ucsi_acpi we may still get events which cause the ucs_acpi code to call ucsi_connector_change(), which then derefs the NULL ucsi->connector pointer.
Fix this by not setting ucsi->ntfy inside ucsi_init() until ucsi_init() has succeeded, so that ucsi_connector_change() ignores the events because UCSI_ENABLE_NTFY_CONNECTOR_CHANGE is not set in the ntfy mask.
From the CVE record · Linux
If UCSI initialization fails, connector-change events may still reach ucsi_connector_change(), which dereferences a NULL connector pointer. The input does not specify how an attacker could trigger this condition or whether access or user interaction is required.
Engineers running Linux kernels with USB UCSI support should check their versions against the vendor advisory; affected versions are not specified in the input.