Skip to contentSkip to conversation

CVE-2026-98748: serial: 8250_bcm7271: fix use-after-free in brcmuart_remove()

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:

serial: 8250_bcm7271: fix use-after-free in brcmuart_remove()

brcmuart_handle_irq() starts priv->hrt to work around a receive-timeout quirk of the 8250 core when hardware flow control is enabled; the timer callback brcmuart_hrtimer_func() dereferences priv.

brcmuart_remove() cancels the hrtimer before it unregisters the port, so a receive-timeout interrupt that arrives in between re-arms the timer. After devm frees priv, the callback runs on freed memory.

Unregister the port before cancelling the hrtimer. serial8250_unregister_port() shuts the port down and frees its IRQ, so brcmuart_handle_irq() can no longer restart the timer, and the final hrtimer_cancel() drains any timer that was armed before or during the unregister.

This issue was found by an in-house static analysis tool.

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

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

	Issue introduced in 5.13 with commit 41a469482de257ea8db43cf74b6311bd055de030 and fixed in 6.12.113 with commit f5ce06e648d775cc1ccf66f4f594bb8b559a7d8e
	Issue introduced in 5.13 with commit 41a469482de257ea8db43cf74b6311bd055de030 and fixed in 6.18.56 with commit e32440fa536af96bdbc61d933a7c3a920b965edc
	Issue introduced in 5.13 with commit 41a469482de257ea8db43cf74b6311bd055de030 and fixed in 7.2.10 with commit 0794ba5332754866b2f1c0cca668775be3ffcf0a
	Issue introduced in 5.13 with commit 41a469482de257ea8db43cf74b6311bd055de030 and fixed in 7.3-rc6 with commit 189b9dc8c96ec9486482f27c1372b04a7152175e

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

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/8250/8250_bcm7271.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/f5ce06e648d775cc1ccf66f4f594bb8b559a7d8e
	https://git.kernel.org/stable/c/e32440fa536af96bdbc61d933a7c3a920b965edc
	https://git.kernel.org/stable/c/0794ba5332754866b2f1c0cca668775be3ffcf0a
	https://git.kernel.org/stable/c/189b9dc8c96ec9486482f27c1372b04a7152175e