KernelScan.io

HIGH Introduced in 2.6.32

tty PortVhangup Race

CVE-2026-98752

CVSS 7.1 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

01

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().

02

Engine v0.9.0

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.

Affecteddrivers/tty/tty_port.c (tty subsystem)

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.

03

BranchIntroducedFixed inPatch commit
2.62.6.31.22.6.32a78910f6d78c
5.102.6.325.10.2732e16ae1464a4
5.152.6.325.15.224a776d603d1e1
6.12.6.326.1.191ce220b4cdf62
6.122.6.326.12.1136b7be3b9b857
6.182.6.326.18.56017b18addbe8
6.62.6.326.6.1606d1a984afc3c
7.22.6.327.2.10b48820de8c1a
mainline2.6.327.3—
cip/6.122.6.326.12.114-cip346d1a984afc3c

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.114-cip34
cip/6.1Affected — no CIP fix yet (latest 6.1.190-cip62)
cip/6.1-rtAffected — no CIP fix yet (latest 6.1.189-cip61-rt32)
cip/5.10Affected — no CIP fix yet (latest 5.10.272-cip79)
cip/5.10-rtAffected — no CIP fix yet (latest 5.10.272-cip79-rt35)
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip115)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)