VYPR
Unrated severityNVD Advisory· Published Dec 8, 2025· Updated Apr 15, 2026

CVE-2025-40318

CVE-2025-40318

Description

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: hci_sync: fix race in hci_cmd_sync_dequeue_once

hci_cmd_sync_dequeue_once() does lookup and then cancel the entry under two separate lock sections. Meanwhile, hci_cmd_sync_work() can also delete the same entry, leading to double list_del() and "UAF".

Fix this by holding cmd_sync_work_lock across both lookup and cancel, so that the entry cannot be removed concurrently.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A race condition in Linux Bluetooth's hci_cmd_sync_dequeue_once() can cause a use-after-free due to improper locking between lookup and cancel operations.

Vulnerability

Overview

CVE-2025-40318 is a race condition vulnerability in the Linux kernel's Bluetooth subsystem, specifically within hci_sync. The function hci_cmd_sync_dequeue_once() performs a lookup and then cancels an entry under two separate lock sections. This allows a concurrent execution of hci_cmd_sync_work(), which can delete the same entry, leading to a double list_del() and a use-after-free (UAF) condition [1].

Exploitation

Path

An attacker may exploit this race by causing the Bluetooth subsystem to process commands concurrently, triggering the window between the lookup and cancel operations. No special privileges are required beyond the ability to interact with the Bluetooth stack, which may be accessible to unprivileged users in certain configurations. The vulnerability is local and requires timing to win the race.

Impact

Successful exploitation could allow an attacker to corrupt kernel memory, leading to a denial of service (system crash) or potentially arbitrary code execution in the kernel context, depending on the attacker's ability to control the freed memory [2]. The issue affects the stability and security of systems using Bluetooth.

Mitigation

The fix ensures that cmd_sync_work_lock is held across both the lookup and cancel operations, preventing concurrent removal. Patches have been committed to the Linux kernel stable tree and are available as updates. Users should apply the latest kernel updates to mitigate this vulnerability [1].

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

5

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.