Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98748 Overview
CVE-2026-98748 is a use-after-free vulnerability in the Linux kernel's 8250_bcm7271 serial driver. The flaw resides in brcmuart_remove(), which cancels an hrtimer before unregistering the serial port. A receive-timeout interrupt arriving between those operations can re-arm the timer through brcmuart_handle_irq(). After devm frees the priv structure, the timer callback brcmuart_hrtimer_func() dereferences freed memory. The issue was identified by an in-house static analysis tool and resolved by reordering the shutdown sequence so that the port unregisters before the final hrtimer_cancel().
Critical Impact
A race condition during driver removal can trigger a kernel use-after-free, leading to memory corruption, kernel panic, or potential privilege escalation on systems using Broadcom 7271 UART hardware.
Affected Products
- Linux kernel versions containing the drivers/tty/serial/8250/8250_bcm7271.c driver prior to the fix
- Broadcom BCM7271-based platforms using the 8250 serial driver with hardware flow control
- Downstream distributions shipping the affected kernel versions
Discovery Timeline
- 2026-10-18 - CVE-2026-98748 published to NVD
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-98748
Vulnerability Analysis
The vulnerability is a use-after-free [CWE-416] in the Broadcom 7271 UART driver. The brcmuart_handle_irq() routine starts a high-resolution timer (priv->hrt) to work around a receive-timeout quirk in the 8250 core when hardware flow control is enabled. The timer callback brcmuart_hrtimer_func() then dereferences the private driver context priv.
During teardown, brcmuart_remove() cancels the hrtimer first and unregisters the serial port afterward. This ordering leaves a narrow window where the port and its interrupt handler remain active after the timer has been cancelled. A pending receive-timeout interrupt arriving in that window re-arms the timer. The devm subsystem then frees priv after remove() returns, and the previously re-armed timer fires against freed memory.
Root Cause
The root cause is an incorrect teardown ordering between an interrupt source and a timer that depends on driver-private data. Because the IRQ handler can re-arm the timer, cancelling the timer before shutting down the IRQ source creates a time-of-check to time-of-use condition against the driver's lifetime.
Attack Vector
Triggering the flaw requires driver removal to race with an incoming receive-timeout interrupt on BCM7271 UART hardware with hardware flow control enabled. Exploitation requires local access and the ability to unload or rebind the driver, typically limited to privileged users. Successful exploitation causes kernel memory corruption that may result in denial of service or, depending on heap layout, memory disclosure or code execution in kernel context.
The fix reorders the operations: serial8250_unregister_port() is called first to shut the port down and free its IRQ, ensuring brcmuart_handle_irq() can no longer restart the timer. A final hrtimer_cancel() then drains any timer armed before or during unregister. See the upstream patches referenced below for implementation details.
Detection Methods for CVE-2026-98748
Indicators of Compromise
- Kernel oops or panic messages referencing brcmuart_hrtimer_func or 8250_bcm7271 in dmesg or /var/log/kern.log
- KASAN use-after-free reports naming the priv allocation freed by devm during module unload
- Unexpected serial subsystem crashes correlated with driver unload or device unbind events on BCM7271 hardware
Detection Strategies
- Enable Kernel Address Sanitizer (KASAN) in test environments to catch the use-after-free deterministically during driver removal
- Audit running kernel versions against the fixed commits listed in the upstream references to identify unpatched hosts
- Monitor kernel ring buffer telemetry for stack traces referencing brcmuart_remove, hrtimer_cancel, or serial8250_unregister_port
Monitoring Recommendations
- Centralize dmesg and kern.log collection from BCM7271-based appliances and set alerts for serial-driver backtraces
- Track module load/unload events for 8250_bcm7271 via auditd to correlate crashes with teardown activity
- Maintain a kernel version inventory and flag hosts running pre-patch builds of the affected driver
How to Mitigate CVE-2026-98748
Immediate Actions Required
- Apply the upstream patches referenced in the kernel.org commits as soon as vendor kernels incorporate them
- Inventory systems using Broadcom 7271 UART hardware with hardware flow control enabled and prioritize those for patching
- Restrict permissions that allow unprivileged users to unload or rebind kernel modules
Patch Information
The fix reorders brcmuart_remove() to call serial8250_unregister_port() before hrtimer_cancel(). Patches are available in the following upstream commits: Kernel Code Change 1, Kernel Code Change 2, Kernel Code Change 3, Kernel Code Change 4, and Kernel Code Change 5. Update to a distribution kernel that incorporates these commits.
Workarounds
- Avoid unloading or rebinding the 8250_bcm7271 driver on production systems until the patched kernel is deployed
- Where feasible, disable hardware flow control on affected UART ports to reduce the likelihood of the receive-timeout quirk triggering the timer path
- Limit CAP_SYS_MODULE and physical access to systems with the affected driver loaded
# Verify whether the 8250_bcm7271 driver is loaded
lsmod | grep 8250_bcm7271
# Check the running kernel version against patched builds
uname -r
# Restrict module unload capability for non-root users (example sysctl)
sysctl -w kernel.modules_disabled=1
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

