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-98246 Overview
CVE-2026-98246 is a use-after-free vulnerability in the Linux kernel's Bluetooth subsystem. The flaw resides in the hci_sync code path, where hci_dev_close_sync() clears hdev->local_codecs after releasing hdev->lock. Concurrent readers in sco_sock_getsockopt() that hold the lock and traverse the codec list can access entries freed by the close path. KASAN reports a slab-use-after-free during sco_sock_getsockopt() reads of freed codec entries.
Critical Impact
A local attacker able to issue BT_CODEC socket option queries during Bluetooth device teardown can trigger a kernel use-after-free, resulting in memory corruption, information disclosure, or denial of service.
Affected Products
- Linux kernel Bluetooth subsystem (net/bluetooth/hci_sync.c)
- Kernel builds exposing sco_sock_getsockopt() with BT_CODEC support
- Stable kernel branches referenced in the upstream fix commits
Discovery Timeline
- 2026-10-06 - CVE-2026-98246 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-98246
Vulnerability Analysis
The defect is a classic locking asymmetry between a teardown path and a reader path. Codec list additions and both traversals in sco_sock_getsockopt() acquire hdev->lock. The close path in hci_dev_close_sync(), however, calls hci_codec_list_clear() after releasing that lock. A reader that has already fetched a codec entry under the lock can race with the close path freeing the same entry. The reader then dereferences freed memory, as shown in the KASAN report where sco_sock_getsockopt+0xfa0/0xfe0 reads one byte at an address freed by hci_codec_list_clear via hci_dev_close_sync.
Root Cause
The root cause is inconsistent lock coverage. hci_codec_list_add and SCO socket option readers synchronize on hdev->lock, but the cleanup path does not hold that lock when freeing list entries. This permits an interleaving where kfree(entry) executes between the reader's lookup and its field access, producing a use-after-free [CWE-416].
Attack Vector
Exploitation requires local access and the ability to open an SCO socket and invoke getsockopt(BT_CODEC) while another task closes the HCI device. The resulting race window is small but reproducible under load. The upstream fix wraps the hci_codec_list_clear() call in hdev->lock, forcing the clear operation to wait for active readers and preventing new traversals until the list is empty. Teardown ordering is preserved. Technical details and the applied patches are available in the kernel.org stable commit log.
Detection Methods for CVE-2026-98246
Indicators of Compromise
- KASAN reports showing slab-use-after-free in sco_sock_getsockopt with allocation stacks in hci_codec_list_add and free stacks in hci_codec_list_clear.
- Unexpected kernel oops or panic traces referencing hci_dev_close_sync concurrent with Bluetooth socket activity.
- dmesg entries containing BUG: KASAN lines tied to the Bluetooth HCI subsystem.
Detection Strategies
- Enable KASAN on test and canary systems to surface use-after-free conditions in the Bluetooth stack during fuzzing or stress runs.
- Monitor kernel logs for Bluetooth-related oops signatures and correlate with process activity invoking getsockopt on SCO sockets.
- Audit running kernel versions against the fixed commits listed in the upstream references to identify unpatched hosts.
Monitoring Recommendations
- Forward kernel logs to a centralized logging pipeline and alert on KASAN, use-after-free, and hci_ substrings.
- Track Bluetooth adapter up/down transitions on fleet endpoints, especially on servers where Bluetooth is unnecessary.
- Inventory kernel versions across Linux endpoints to prioritize patch rollout.
How to Mitigate CVE-2026-98246
Immediate Actions Required
- Apply the upstream kernel patches referenced in the stable commit log as soon as distribution builds are available.
- Disable the Bluetooth subsystem on systems that do not require it by unloading btusb and bluetooth modules or blacklisting them.
- Restrict local user access on multi-user Linux hosts to reduce the pool of actors able to open SCO sockets.
Patch Information
The fix moves the hci_codec_list_clear() call inside the hdev->lock critical section in hci_dev_close_sync(). Patch commits are published at the kernel.org stable tree, with additional backports at commit 1ee0c542, commit 4dc1ae5f, commit 560ed437, commit 9a10987a, and commit 1276c2fa. Rebuild and reboot after applying.
Workarounds
- Blacklist Bluetooth kernel modules on servers and workstations without Bluetooth requirements using /etc/modprobe.d/.
- Remove CAP_NET_RAW or restrict access to the Bluetooth socket family where feasible via seccomp or LSM policy.
- Avoid repeated adapter power cycles on unpatched systems to reduce the window for the race condition.
# Configuration example: disable Bluetooth modules on unpatched hosts
echo 'install bluetooth /bin/true' | sudo tee /etc/modprobe.d/disable-bluetooth.conf
echo 'install btusb /bin/true' | sudo tee -a /etc/modprobe.d/disable-bluetooth.conf
sudo systemctl disable --now bluetooth.service
sudo rmmod btusb bluetooth 2>/dev/null || true
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

