Skip to contentSkip to conversation

CVE-2026-98772: USB: serial: fix port tear down use-after-free

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

USB: serial: fix port tear down use-after-free

Some drivers for multiport devices access port driver data from completion handlers of shared URBs submitted at attach() or first open() and stopped at disconnect() or last close(), respectively.

A simple NULL check before accessing the driver data makes sure that a port state container has at least been allocated, but a completion handler can still race with port tear down.

Reorder the disconnect handling so that ports are not deregistered (and their driver data freed) until after all ports have been hung up and the driver disconnect() callback has run so that all I/O has been stopped.

The Linux kernel CVE team has assigned CVE-2026-98772 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.30 with commit 2d93148ab6988cad872e65d694c95e8944e1b626 and fixed in 6.12.113 with commit 60cc9379c3e650d1ebfba4de63f1242537a62a32
	Issue introduced in 2.6.30 with commit 2d93148ab6988cad872e65d694c95e8944e1b626 and fixed in 6.18.56 with commit 5e8980a81af195c49084be5b4c031085b56c7443
	Issue introduced in 2.6.30 with commit 2d93148ab6988cad872e65d694c95e8944e1b626 and fixed in 7.2.10 with commit e80ee74206f260eb1282e7d1339ff146a4a410d0
	Issue introduced in 2.6.30 with commit 2d93148ab6988cad872e65d694c95e8944e1b626 and fixed in 7.3-rc6 with commit 33c920f7c5952dfc42d1b8ea6efe16b1f0bb0c5b

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-98772

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/usb/serial/usb-serial.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/60cc9379c3e650d1ebfba4de63f1242537a62a32
	https://git.kernel.org/stable/c/5e8980a81af195c49084be5b4c031085b56c7443
	https://git.kernel.org/stable/c/e80ee74206f260eb1282e7d1339ff146a4a410d0
	https://git.kernel.org/stable/c/33c920f7c5952dfc42d1b8ea6efe16b1f0bb0c5b