HIGH Introduced in 2.6.32
tty PortVhangup Race
CVE-2026-98752
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
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().
02KernelScan AI Analysis
Risk summary
A race condition in the tty port hangup path allows a local attacker to trigger use-after-free and NULL-pointer dereference by racing a synchronous vhangup (via ioctl or close) against an asynchronous hangup (carrier loss or concurrent hangup). This can lead to kernel memory corruption, privilege escalation, or denial of service. Any local user with access to a tty device (serial port, PTY, USB serial) can exploit this.
Vulnerability analysis
The tty port layer provides helpers for drivers to synchronously hang up ports during device teardown. The original code allowed tty_port_tty_vhangup() (synchronous hangup) and tty_port_hangup() (asynchronous hangup, used for carrier loss) to race: the synchronous path could return while the asynchronous path was still shutting down the port, leaving the port's resources freed but still accessible. This creates a use-after-free window exploitable via racing ioctls or hangup processing. The fix serializes both paths under the port mutex so that tty_port_tty_vhangup() does not return until the port is fully shut down, even when a concurrent hangup is in progress. The bug is reachable by any local process that can open a tty device — including container workloads using PTYs — and requires no special privileges.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 2.6 | 2.6.31.2 | 2.6.32 | a78910f6d78c |
| 5.10 | 2.6.32 | 5.10.273 | 2e16ae1464a4 |
| 5.15 | 2.6.32 | 5.15.224 | a776d603d1e1 |
| 6.1 | 2.6.32 | 6.1.191 | ce220b4cdf62 |
| 6.12 | 2.6.32 | 6.12.113 | 6b7be3b9b857 |
| 6.18 | 2.6.32 | 6.18.56 | 017b18addbe8 |
| 6.6 | 2.6.32 | 6.6.160 | 6d1a984afc3c |
| 7.2 | 2.6.32 | 7.2.10 | b48820de8c1a |
| mainline | 2.6.32 | 7.3 | — |
| cip/6.12 | 2.6.32 | 6.12.114-cip34 | 6d1a984afc3c |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.114-cip34 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip137) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip137-rt51) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip116) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |