USB: serial: fix port tear down use-after-free
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2d93148ab6988cad872e65d694c95e8944e1b626 · < 5e8980a81af195c49084be5b4c031085b56c7443| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
USB: serial: fix port tear down use-after-free
Some drivers for multiport devices access port driver data from completion handlers of shared URBs submitted at attach() or first open() and stopped at disconnect() or last close(), respectively.
A simple NULL check before accessing the driver data makes sure that a port state container has at least been allocated, but a completion handler can still race with port tear down.
Reorder the disconnect handling so that ports are not deregistered (and their driver data freed) until after all ports have been hung up and the driver disconnect() callback has run so that all I/O has been stopped.
From the CVE record · Linux
The Linux kernel's USB serial port teardown can race with a completion handler, causing a use-after-free during disconnect. The issue affects some multiport drivers that access port data from shared USB request completion handlers; the input does not specify authentication requirements or whether user interaction is needed.
Engineers running the Linux kernel with USB serial multiport devices should check their installations; affected versions are not specified.