Junglewise Threat Intelligence

CVE-2025-38593: Linux Kernel double free in Bluetooth hci_discovery_filter_clear

CVE-2025-38593 · Severity: high · CVSS 7.8 · Published 2025-08-19

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's Bluetooth subsystem could allow a local user to crash the system or potentially execute unauthorized code. The issue occurs during Bluetooth service discovery, where a specific internal data structure can be deleted twice due to a timing conflict. This could lead to a complete system failure (kernel panic) or be used as a stepping stone for further attacks on the operating system.

Technical details

A race condition exists in the 'hci_discovery_filter_clear()' function within the Bluetooth HCI implementation of the Linux kernel. The function frees the 'uuids' array and subsequently sets the pointer to NULL; however, if the process is preempted between these two operations, a concurrent call to 'start_service_discovery()' can trigger a second 'kfree()' on the same memory address. This double free occurs because of a lack of proper synchronization/locking around the deallocation logic. A local attacker with access to Bluetooth sockets could exploit this race to trigger a kernel BUG at mm/slub.c, leading to a Denial of Service (DoS) or potentially arbitrary code execution in kernel context. The fix introduces a spinlock to ensure the kfree and NULL assignment are performed atomically.

Affected products

  • Linux Linux Kernel 5.17 to 6.1.159, 6.6.117, 6.12.42, 6.15.10

Timeline

  • 2025-08-19: disclosed: CVE published
  • 2025-07-23: patched: Initial patch committed to mainline

References

Related threats