tty: tty_port: restore TTY_IO_ERROR on activation failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a9a37ec33a1b3e66b260ac1c29bff0aec8b89ae4 · < 7021acc84c2e0add77a1a33152e3a1e428fdbfdb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tty: tty_port: restore TTY_IO_ERROR on activation failure
Make sure to restore the TTY_IO_ERROR flag if activation fails to prevent I/O attempts on a port that is gone or powered down.
This specifically avoids issues like kernel panic due to unclocked accesses or NULL-pointer dereferences when accessing powered down or deregistered ports when a TTY ioctl races with hangup and open.
Note that the flag is set again in tty_port_close() but not restoring it on activation failure leaves a window where drivers fail to handle the ioctl-hangup race.
From the CVE record · Linux
The Linux kernel may leave TTY_IO_ERROR unset when TTY port activation fails. A local TTY ioctl racing with hangup and open can then access a powered-down or deregistered port, potentially causing a kernel panic. The input does not specify authentication requirements.
Teams running the Linux kernel should check their affected versions; the input does not identify specific versions.