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-98739 Overview
CVE-2026-98739 is a race condition in the Linux kernel's Bluetooth RFCOMM subsystem that leads to a use-after-free on the tty_port structure. The flaw affects RFCOMM_RELEASE_ONHUP devices, where both rfcomm_tty_install() and __rfcomm_release_dev() use the RFCOMM_TTY_OWNED flag to determine which path drops the initial tty_port reference. Because the release path tests the bit separately from the install path setting it, both paths can drop the same reference. KASAN reproduced the condition with a slab-use-after-free write in tty_port_put() from rfcomm_dev_ioctl.
Critical Impact
A local attacker able to issue RFCOMM ioctls can trigger a use-after-free on a freed tty_port, enabling kernel memory corruption and potential local privilege escalation.
Affected Products
- Linux kernel versions containing the RFCOMM RFCOMM_RELEASE_ONHUP logic prior to the fix
- Distributions shipping affected stable kernel branches referenced in the upstream commits
- Systems with the Bluetooth RFCOMM module (rfcomm) loaded and accessible to local users
Discovery Timeline
- 2026-10-18 - CVE-2026-98739 published to NVD
- 2026-10-21 - Last updated in NVD database
Technical Details for CVE-2026-98739
Vulnerability Analysis
The vulnerability is a race condition [CWE-362] leading to a use-after-free [CWE-416] in the RFCOMM TTY teardown logic. For devices created with RFCOMM_RELEASE_ONHUP, ownership of the initial tty_port reference is tracked by the RFCOMM_TTY_OWNED bit. The install path (rfcomm_tty_install()) and the release path (__rfcomm_release_dev()) both consult this bit non-atomically, so each path can conclude it is responsible for dropping the initial reference.
The synchronous hangup does not close the window because port->tty is not assigned until tty_port_open(), which runs after installation. KASAN captured the resulting slab-use-after-free in tty_port_put() invoked from rfcomm_dev_ioctl, with the backing allocation freed by rfcomm_dev_destruct() through release_one_tty().
Root Cause
The root cause is non-atomic coordination of the RFCOMM_TTY_OWNED ownership bit. The release path reads the bit, then the install path sets it and drops the initial reference, and finally the release path drops the same reference again based on its stale read. TTY cleanup then releases its reference and frees the device, after which the release path performs a final tty_port_put() on freed memory.
Attack Vector
Exploitation requires local access and the ability to perform RFCOMM socket ioctls, typically through the Bluetooth stack. An attacker interleaves device creation and release operations on RFCOMM_RELEASE_ONHUP devices to drive the race between rfcomm_tty_install() and __rfcomm_release_dev(). Successful exploitation corrupts freed slab memory and can be shaped toward kernel code execution or privilege escalation. No synthetic exploit code is reproduced here; the upstream commit messages and KASAN report in the Linux Kernel Commit a03ccf1 describe the race in detail.
Detection Methods for CVE-2026-98739
Indicators of Compromise
- KASAN reports showing slab-use-after-free in tty_port_put with call paths through rfcomm_dev_ioctl, sock_do_ioctl, and __x64_sys_ioctl.
- Kernel oops or panic traces referencing rfcomm_dev_destruct and release_one_tty shortly after RFCOMM ioctl activity.
- Unexpected processes invoking RFCOMM ioctls on hosts that do not normally use Bluetooth serial profiles.
Detection Strategies
- Enable KASAN on test and canary systems to surface use-after-free writes in the rfcomm module during fuzzing or triage.
- Audit auditd or eBPF telemetry for ioctl syscalls targeting RFCOMM sockets from non-Bluetooth service accounts.
- Alert on repeated creation and release cycles of RFCOMM TTY devices in short time windows, which is characteristic of race-condition exploitation attempts.
Monitoring Recommendations
- Monitor kernel ring buffer messages for rfcomm-related warnings, BUG traces, and KASAN diagnostics.
- Track loading of the rfcomm kernel module on systems where Bluetooth is not required.
- Correlate local privilege escalation indicators with Bluetooth subsystem activity using centralized log analytics.
How to Mitigate CVE-2026-98739
Immediate Actions Required
- Apply the stable kernel updates that include the upstream fix converting the ownership check to test_and_set_bit() so only the caller that flips RFCOMM_TTY_OWNED from clear to set drops the initial reference.
- On systems that do not require Bluetooth serial services, unload and blacklist the rfcomm module to remove the attack surface.
- Restrict local access and enforce least privilege on accounts that can open Bluetooth sockets.
Patch Information
The fix is applied across multiple stable branches. Review and apply the following upstream commits:
- Linux Kernel Commit 0a55490
- Linux Kernel Commit 2d696c1
- Linux Kernel Commit 55d162a
- Linux Kernel Commit a03ccf1
- Linux Kernel Commit e5aa7fb
The patch replaces the separate test and set of RFCOMM_TTY_OWNED with test_and_set_bit() in both the install and release paths, ensuring only one caller drops the initial tty_port reference while each path retains its own lookup reference until cleanup.
Workarounds
- Blacklist the rfcomm module on hosts that do not require RFCOMM functionality to prevent loading.
- Disable the Bluetooth service on servers and workstations with no Bluetooth requirement.
- Limit which users and services can open AF_BLUETOOTH sockets through seccomp or Linux Security Module policies.
# Configuration example
# Prevent the rfcomm module from loading
echo "install rfcomm /bin/true" | sudo tee /etc/modprobe.d/blacklist-rfcomm.conf
sudo rmmod rfcomm 2>/dev/null || true
# Optional: disable Bluetooth entirely where not required
sudo systemctl disable --now bluetooth.service
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

