bus: mhi: ep: Fix device refcount leak in the error path of MHI device creation
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 297c77a0f27312b9a04696018c4cbd47926ca92b · < 6f12862600bb70e599a614d706a095ea5f8f9858| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
bus: mhi: ep: Fix device refcount leak in the error path of MHI device creation
mhi_ep_create_device() takes one device reference for the UL channel and another for the DL channel after allocating the transfer device. These references are normally released by mhi_ep_destroy_device() before the device itself is removed.
If dev_set_name() or device_add() fails, the error path currently drops only one reference. The remaining channel references keep the device from being released and leave the channels associated with a device that was never registered.
Route both failures through a common unwind path that drops the DL channel reference, the UL channel reference, and the initial reference from device_initialize().
From the CVE record · Linux
The Linux kernel’s MHI endpoint device creation path leaks device references if dev_set_name() or device_add() fails. The leaked references prevent the device from being released and leave channels associated with a device that was never registered. The input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel should check whether their version includes the MHI endpoint fix; affected versions are not specified.