tty: port: fix tty_port_tty_vhangup() race
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 2.6.32, 6.6.160, 6.12.113, 6.18.56, 7.2.10
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: tty: port: fix tty_port_tty_vhangup() race Drivers rely on tty_port_tty_vhangup() to synchronously hang up their ports before tearing down resources as part of deregistration (e.g. on physical disconnect). If tty_port_tty_vhangup() races with another hangup it may however return before the port has been shut down. This is in turn can lead to use-after-free and NULL-pointer dereferences in racing ioctls (including a synchronous hangup) and in processing of racing asynchronous hangups (carrier loss). Add the missing serialisation to tty_port_tty_vhangup() and tty_port_hangup() so that the former does not return until the port has been shut down also when there is a racing hangup. Note that serial core does not use tty_port_hangup(), but it already holds the port mutex when clearing port->tty and shutting down the port in uart_hangup().
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 7ca0ff9ab3218ec443a7a9ad247e4650373ed41e · fixed in ce220b4cdf62f73db0c1940f968eb33b9899fdd0; From 7ca0ff9ab3218ec443a7a9ad247e4650373ed41e · fixed in 6d1a984afc3ca477dab3e51ec806671d443ad524; From 7ca0ff9ab3218ec443a7a9ad247e4650373ed41e · fixed in 6b7be3b9b857947e9c1338d4919d4ebd3b75e907; From 7ca0ff9ab3218ec443a7a9ad247e4650373ed41e · fixed in 017b18addbe8dcace1a569a00d40ed1ba1e03f4c; From 7ca0ff9ab3218ec443a7a9ad247e4650373ed41e · fixed in b48820de8c1a596c5b99775524dfce73c6576c5d; From 2.6.31.2 · fixed in 2.6.32
- Linux Linux
2.6.32
- KernelLinux
From 2.6.32 · fixed in 6.6.160; From 6.7.0 · fixed in 6.12.113; From 6.13.0 · fixed in 6.18.56; From 6.19.0 · fixed in 7.2.10