usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on stop
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
usb: typec: qcom-pmic-typec: disable cc_debounce_dwork on stop
cc_debounce_dwork is queued from the set_cc() and start_toggling() callbacks, which run from TCPM's kthread worker. port_stop() returns before tcpm_unregister_port() destroys that worker. Flushing the worker during unregister may therefore run a callback which queues the delayed work after port_stop() has returned.
The delayed work can then run after devres has freed pmic_typec_port.
Use disable_delayed_work_sync() in port_stop() to cancel a pending instance and prevent the TCPM callbacks from queueing another one.
This issue was found by an in-house static analysis tool.
From the CVE record · Linux
In the Linux kernel’s qcom-pmic-typec driver, delayed work can run after the associated port has been freed during shutdown. This creates a potential use-after-free. The input does not describe how an attacker could trigger it, or whether access or user interaction is required.
Engineers running Linux kernels with the qcom-pmic-typec driver should check their builds; affected versions are not specified.