tty: fix saved termios reset race
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 93857edd9829e144acb6c7e72d593f6e01aead66 · < 08bf919f041af9de372428bb0c938157ea144164| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
tty: fix saved termios reset race
Resetting saved termios state on device registration is needed where a minor number can be reused for an entirely different device and where the old settings may prevent the port from even being opened (e.g. when CLOCAL is not set).
Not all TTY drivers guarantee that the minor number is no longer in use when registering devices however, something which can lead to a use-after-free when closing a TTY (and saving its termios) races with re-registration.
Add a new TTY_DRIVER_RESET_SAVED_TERMIOS flag to request that any saved termios state is reset on registration and only set it for drivers that make sure that the minor number is no longer in use.
From the CVE record · Linux
The Linux kernel can encounter a use-after-free when closing a TTY and saving its settings races with device re-registration. This can occur when a TTY driver reuses a minor number without ensuring it is no longer in use. The input does not specify an attacker path, authentication requirement, or user-interaction requirement.
Teams running the Linux kernel should check their installations; affected versions are not specified.