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

CVE-2025-40284

CVE-2025-40284

Description

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

Bluetooth: MGMT: cancel mesh send timer when hdev removed

mesh_send_done timer is not canceled when hdev is removed, which causes crash if the timer triggers after hdev is gone.

Cancel the timer when MGMT removes the hdev, like other MGMT timers.

Should fix the BUG: sporadically seen by BlueZ test bot (in "Mesh - Send cancel - 1" test).

Log: ------ BUG: KASAN: slab-use-after-free in run_timer_softirq+0x76b/0x7d0 ... Freed by task 36: kasan_save_stack+0x24/0x50 kasan_save_track+0x14/0x30 __kasan_save_free_info+0x3a/0x60 __kasan_slab_free+0x43/0x70 kfree+0x103/0x500 device_release+0x9a/0x210 kobject_put+0x100/0x1e0 vhci_release+0x18b/0x240 ------

AI Insight

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

The Linux kernel Bluetooth MGMT subsystem fails to cancel the mesh_send_done timer when an HCI device is removed, leading to a use-after-free crash.

Vulnerability

Overview

In the Linux kernel's Bluetooth MGMT subsystem, the mesh_send_done timer is not properly cancelled when an HCI device (hdev) is removed. When the device is released and its resources are freed, the timer can still fire, causing a use-after-free condition. The kernel heap sanitizer (KASAN) detects this as a slab-use-after-free bug, as shown in the kernel log where the freed memory is accessed in run_timer_softirq after the device memory has been freed by device_release and kfree [1][2].

Exploitation

Scenario

An attacker with the ability to trigger Bluetooth device removal (for example, by unplugging a USB Bluetooth adapter or through a virtual HCI device removal) can cause the race condition. The vulnerability requires no special privileges beyond local access to the system; the crash occurs in softIRQ context when the timer fires after the hdev structure has been freed. The attack surface is limited to scenarios where a Bluetooth device is removed while a mesh send timer is still pending.

Impact

A successful exploit leads to a kernel crash (denial of service) due to accessing freed memory. The use-after-free can corrupt kernel memory, potentially allowing further exploitation, though the KASAN report indicates a slab-use-after-free, making privilege escalation possible in principle.

Mitigation

The fix is to cancel the mesh_send_done timer when the MGMT subsystem removes the HCI device, similar to other MGMT timers. The commit referenced in the kernel tree applies this correction. Users should apply the latest stable kernel update containing this fix (e.g., commit id fd62ca5ad136 or 55fb52ffdd62). No workaround is available; updating the kernel is the recommended course of action.

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
  • Linux/Kernelinferred2 versions
    (expand)+ 1 more
    • (no CPE)
    • (no CPE)

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.