CVE-2026-99455: serial: core: shut down initialized port on removal
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
serial: core: shut down initialized port on removal
When a serial port configured as a console is opened and subsequently closed, tty_port_shutdown() skips invoking port->ops->shutdown() because port->console is true. As a result, tty_port_initialized() remains true and the port's interrupt handler stays registered in the irq subsystem.
If the underlying device is later unbound or removed (e.g. via sysfs driver unbind or device hot-unplug), serial_core_remove_one_port() unregisters the console, frees uport->name via kfree(), and tears down the port without shutting it down or freeing its IRQ. Consequently, the irqaction descriptor remains registered in genirq with action->name pointing to freed memory.
This triggers a use-after-free read whenever genirq accesses action->name, such as when reading /proc/interrupts:
BUG: KASAN: slab-use-after-free in string+0x476/0x570 Call Trace: string+0x476/0x570 vsnprintf+0x422/0x1300 seq_printf+0x... show_interrupts+...
Fix this by acquiring port->mutex in serial_core_remove_one_port() after console unregistration, clearing port->console under the mutex to prevent data races with concurrent tty_port_shutdown(), and invoking uart_shutdown(NULL, state) if the port remains initialized. This ensures that port->ops->shutdown() is called and the IRQ is freed before kfree(uport->name).
The Linux kernel CVE team has assigned CVE-2026-99455 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.9 with commit 761ed4a94582ab291aa24dcbea4e01e8936488c8 and fixed in 6.12.117 with commit b05d5ed61e84ad15536e4e51db79a1d1c221c6f1 Issue introduced in 4.9 with commit 761ed4a94582ab291aa24dcbea4e01e8936488c8 and fixed in 6.18.61 with commit 0f332cce4d592d751aad89b404f68463099167c8 Issue introduced in 4.9 with commit 761ed4a94582ab291aa24dcbea4e01e8936488c8 and fixed in 7.3.2 with commit 928335263daf58e8c0e14d860091e57791693ea0 Issue introduced in 4.9 with commit 761ed4a94582ab291aa24dcbea4e01e8936488c8 and fixed in 7.4-rc1 with commit 810d467c11f0c85107874d08dfdd11acba6aa0c0
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-99455
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/tty/serial/serial_core.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/b05d5ed61e84ad15536e4e51db79a1d1c221c6f1 https://git.kernel.org/stable/c/0f332cce4d592d751aad89b404f68463099167c8 https://git.kernel.org/stable/c/928335263daf58e8c0e14d860091e57791693ea0 https://git.kernel.org/stable/c/810d467c11f0c85107874d08dfdd11acba6aa0c0