spi: ch341: fix devres lifetime
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:
spi: ch341: fix devres lifetime
USB drivers bind to USB interfaces and any device managed resources should have their lifetime tied to the interface rather than parent USB device. This avoids issues like memory leaks when drivers are unbound without their devices being physically disconnected (e.g. on probe deferral or configuration changes).
Fix the controller and driver data lifetime so that they are released on driver unbind.
Note that this also makes sure that the SPI controller is placed correctly under the USB interface in the device tree.
From the CVE record · Linux
The Linux kernel’s ch341 SPI driver can retain device-managed resources when the driver is unbound without the USB device being physically disconnected, such as during probe deferral or configuration changes. The input does not describe an attacker action, access requirement, or user interaction.
Engineers running Linux kernels with the ch341 SPI driver should check their kernel versions; affected versions were not provided.