Junglewise Threat Intelligence

CVE-2025-40318: Linux Kernel Bluetooth use-after-free in hci_sync

CVE-2025-40318 · Severity: high · CVSS 8.8 · Published 2025-12-08

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability was identified in the Linux kernel's Bluetooth subsystem that could lead to system instability or unauthorized memory access. The issue occurs when the system attempts to manage Bluetooth command queues, potentially allowing a race condition that crashes the system or allows for a use-after-free exploit. This could impact any device using affected versions of the Linux kernel with Bluetooth enabled, potentially allowing an attacker within Bluetooth range to compromise the system.

Technical details

A race condition exists in the Bluetooth hci_sync component of the Linux kernel, specifically within the hci_cmd_sync_dequeue_once() function. The function performed a lookup and a subsequent cancellation of a queue entry under two separate lock sections, allowing hci_cmd_sync_work() to delete the same entry in between these operations. This results in a double list_del() and a use-after-free (UAF) condition. An attacker within Bluetooth range (adjacent) could potentially exploit this to cause a kernel panic or execute arbitrary code. The fix involves extending the cmd_sync_work_lock to cover both the lookup and cancellation operations atomically.

Affected products

  • Linux Linux Kernel 6.1.120 to 6.1.159, 6.6.51 to 6.6.117, 6.8.9 to 6.9, and 6.9 to 6.12.58

Timeline

  • 2025-12-08: advisory: CVE-2025-40318 published by NVD
  • 2025-12-07: patched: Fixes merged into various stable kernel branches

References

Related threats