USB: serial: fix ioctl hangup race
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f34d7a5b7010b82fe97da95496b9971435530062 · < 4597ddd6168ae2a4123404e5f0871f1070dc7773| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
USB: serial: fix ioctl hangup race
The tty ioctls can race with hangup and end up calling into a tty driver for a device that is already gone or powered down.
Serialise the callbacks using the tty port mutex and add the missing checks to make sure the port has not been hung up before accessing port driver data or hardware.
This specifically avoids dereferencing a NULL-pointer if a device is disconnected during lengthy break signalling.
Note that TIOCGICOUNT and TIOCMIWAIT do not access port driver data or hardware and are therefore not affected by the race.
From the CVE record · Linux
Linux kernel USB serial tty ioctls can race with device hangup and call a driver after the device is gone or powered down. A local process using the affected ioctls may trigger a NULL-pointer dereference if the device disconnects during lengthy break signalling; the description does not specify authentication requirements.
Engineers running the Linux kernel with USB serial devices should check their deployments; affected versions were not provided.