usb: typec: ucsi: unregister debugfs entries on teardown
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: typec: ucsi: unregister debugfs entries on teardown
ucsi_register() creates per-instance debugfs entries, but ucsi_unregister() keeps them around until ucsi_destroy().
Drivers like ucsi_glink that unregister/register the same UCSI instance across remoteproc restart then try to create an already existing debugfs directory and log:
debugfs: 'pmic_glink.ucsi.0' already exists in 'ucsi'
Unregister debugfs entries as part of ucsi_unregister(), and clear ucsi->debugfs after freeing it so repeated unregister paths remain safe.
From the CVE record · Linux
The Linux kernel's UCSI teardown leaves per-instance debugfs entries in place after ucsi_unregister(). If a driver unregisters and re-registers the same UCSI instance, such as across a remoteproc restart, it can encounter an existing debugfs directory and log an error. The input does not describe an attacker capability or access requirements.
Engineers running Linux kernels with UCSI drivers that can unregister and re-register the same instance should check their kernel version against the vendor advisory; affected versions were not provided.