usb: typec: ucsi: Fix null pointer dereference in trace
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ af8622f6a585d8d82b11cd7987e082861fd0edd3 · < 99331fe68a8eaa4097143a33fb0c12d5e5e8e830| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: ucsi: Fix null pointer dereference in trace
ucsi_register_altmode checks IS_ERR for the alt pointer and treats NULL as valid. When CONFIG_TYPEC_DP_ALTMODE is not enabled, ucsi_register_displayport returns NULL which causes a NULL pointer dereference in trace. Rather than return NULL, call typec_port_register_altmode to register DisplayPort alternate mode as a non-controllable mode when CONFIG_TYPEC_DP_ALTMODE is not enabled.
From the CVE record · Linux
The Linux kernel's UCSI alternate-mode registration can dereference a NULL pointer during tracing when CONFIG_TYPEC_DP_ALTMODE is disabled. This can cause a kernel crash; the input does not specify an attack path, authentication requirement, or user interaction.
Engineers running Linux kernels with CONFIG_TYPEC_DP_ALTMODE disabled should check whether their kernel includes the fix; affected versions are not specified.