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-2024-27398 Overview
CVE-2024-27398 is a use-after-free vulnerability [CWE-416] in the Linux kernel Bluetooth subsystem, specifically in the Synchronous Connection-Oriented (SCO) socket handling code. The flaw occurs when sco_sock_timeout dereferences a socket structure that has already been freed by sco_sock_release. A local attacker with low privileges can trigger the race condition by releasing an SCO socket while a delayed timeout work item is pending. Successful exploitation can result in kernel memory corruption, denial of service, or local privilege escalation. The vulnerability affects multiple Linux kernel versions including the 6.9 release candidates, and distributions such as Fedora 39, Fedora 40, and Debian Linux.
Critical Impact
A local, low-privileged user can trigger a kernel use-after-free in the Bluetooth SCO code path, potentially achieving arbitrary kernel memory writes and privilege escalation to root.
Affected Products
- Linux kernel (multiple versions up to and including 6.9-rc7)
- Fedora 39 and Fedora 40
- Debian Linux 10.0
Discovery Timeline
- 2024-05-14 - CVE-2024-27398 published to the National Vulnerability Database
- 2024-06-19 - Debian LTS security announcement published
- 2024-09-12 - NetApp security advisory NTAP-20240912-0012 released
- 2024-11-29 - OpenWall oss-security disclosure thread begins
- 2026-08-04 - Last updated in NVD database
Technical Details for CVE-2024-27398
Vulnerability Analysis
The vulnerability resides in the Linux kernel Bluetooth SCO socket implementation. When an SCO connection is established and the socket subsequently enters release, the kernel schedules timeout_work via sco_sock_set_timer to evaluate whether disconnection has timed out. The cleanup thread continues through sco_sock_kill, which calls sock_put(sk) and frees the socket memory. If the delayed worker fires after this free, sco_sock_timeout executes sock_hold(sk) on freed memory, producing a slab-use-after-free detected by KASAN.
The condition is confirmed in kernel sanitizer reports showing a write of size 4 at a freed kmalloc-1k region during execution of the events workqueue. The allocation path traces back to bt_sock_alloc through sco_sock_create, and the free path traces through sco_sock_release and __sk_destruct.
Root Cause
The root cause is missing synchronization between the socket release path and the pending delayed work item. The code does not cancel or wait for the scheduled timeout_work before deallocating the socket. This creates a window where the worker executes against freed memory. The upstream fix ensures the pending timer work is properly cancelled under the correct locking before the socket is torn down.
Attack Vector
Exploitation requires local access and the ability to create Bluetooth SCO sockets, which typically requires either root or membership in a privileged group depending on distribution policy. An attacker races SCO socket creation, connection establishment, and release against the scheduled sco_sock_timeout worker. Winning the race yields a write primitive into reclaimed slab memory, which can be shaped into kernel data corruption or control-flow hijack through standard heap-spraying techniques against kmalloc-1k objects.
No verified public exploit code is available at this time. Technical analysis is published in the referenced kernel commits and the OpenWall oss-security disclosure.
Detection Methods for CVE-2024-27398
Indicators of Compromise
- Kernel log entries containing KASAN: slab-use-after-free in sco_sock_timeout or oops traces referencing sco_sock_timeout+0x5e/0x1c0.
- Unexpected kernel panics or soft lockups on hosts with Bluetooth enabled, correlated with Bluetooth socket activity.
- Unprivileged processes rapidly opening and closing SCO sockets (AF_BLUETOOTH, BTPROTO_SCO).
Detection Strategies
- Monitor dmesg and /var/log/kern.log for KASAN reports, workqueue oopses, and references to the sco_sock_timeout symbol.
- Audit kernel versions across the fleet against the fixed commits listed in git.kernel.org and flag hosts running vulnerable builds.
- Use eBPF or auditd rules to track socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_SCO) system calls from non-system accounts.
Monitoring Recommendations
- Alert on kernel crashes and kernel BUG events from endpoints with Bluetooth hardware exposed.
- Correlate Bluetooth daemon restarts (bluetoothd) with crash telemetry to identify repeated exploitation attempts.
- Track package inventory for kernel, linux-image, and distribution kernel builds to confirm patch deployment status.
How to Mitigate CVE-2024-27398
Immediate Actions Required
- Apply vendor kernel updates from Debian, Fedora, and upstream stable trees that incorporate the SCO timer fix.
- Reboot affected systems after kernel package installation to activate the patched image.
- Where Bluetooth is not required, disable the bluetooth service and blacklist the bluetooth and bnep kernel modules.
Patch Information
The fix is distributed across multiple stable branches via the following kernel commits: 012363cb, 1b33d55f, 3212afd0, 33a6e921, 483bc081, 50c2037f, 6a18eeb1, and bfab2c1f. Distribution-specific updates are available in the Debian LTS announcement, the Fedora package announcement, and the NetApp security advisory NTAP-20240912-0012.
Workarounds
- Blacklist the Bluetooth kernel modules on servers and hosts that do not use Bluetooth to remove the attack surface entirely.
- Restrict CAP_NET_RAW and CAP_NET_ADMIN capabilities and limit local user access on systems that cannot be patched immediately.
- Use kernel lockdown or seccomp policies to deny AF_BLUETOOTH socket creation from untrusted workloads and containers.
# Disable and blacklist the Bluetooth stack on hosts that do not require it
sudo systemctl disable --now bluetooth.service
echo -e "blacklist bluetooth\nblacklist bnep\nblacklist btusb" | \
sudo tee /etc/modprobe.d/disable-bluetooth.conf
sudo modprobe -r btusb bnep 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

