{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40284","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-04-16T07:20:57.184Z","datePublished":"2025-12-06T21:51:08.488Z","dateUpdated":"2026-08-05T12:09:14.151Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:09:14.151Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: MGMT: cancel mesh send timer when hdev removed\n\nmesh_send_done timer is not canceled when hdev is removed, which causes\ncrash if the timer triggers after hdev is gone.\n\nCancel the timer when MGMT removes the hdev, like other MGMT timers.\n\nShould fix the BUG: sporadically seen by BlueZ test bot\n(in \"Mesh - Send cancel - 1\" test).\n\nLog:\n------\nBUG: KASAN: slab-use-after-free in run_timer_softirq+0x76b/0x7d0\n...\nFreed by task 36:\n kasan_save_stack+0x24/0x50\n kasan_save_track+0x14/0x30\n __kasan_save_free_info+0x3a/0x60\n __kasan_slab_free+0x43/0x70\n kfree+0x103/0x500\n device_release+0x9a/0x210\n kobject_put+0x100/0x1e0\n vhci_release+0x18b/0x240\n------"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The timer is armed by MGMT_OP_MESH_SEND issued over a local AF_BLUETOOTH/SOCK_RAW HCI management socket bound to HCI_CHANNEL_CONTROL, and the free is triggered by local HCI device teardown; no over-the-air Bluetooth traffic is involved in reaching the vulnerable code.\nAC:L - The attacker sets the firing deadline themselves via the attacker-controlled cnt field (25 ms to ~6.4 s) and independently chooses when to tear down the hdev, so both sides of the timing window and the intervening heap-spray opportunity are fully under their control.\nPR:L - MGMT_OP_MESH_SEND and MGMT_OP_SET_EXP_FEATURE require a trusted mgmt socket (CAP_NET_ADMIN), which in kernel CNA practice for the Bluetooth mgmt interface is treated as a low-privileged local capability rather than full root, consistent with prior Bluetooth MGMT UAF scorings.\nUI:N - The full sequence — enable the mesh experimental feature, issue Mesh Send, then remove the controller — is performed entirely by the attacker with no victim action required.\nS:U - The use-after-free corrupts kernel heap memory and is exploited within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - run_timer_softirq() dereferences a timer_list inside the freed struct hci_dev, and reclaiming that slab with attacker-chosen data yields a use-after-free read primitive that can be leveraged to disclose arbitrary kernel memory.\nI:H - The stale timer causes an indirect call through timer->function read from freed memory plus timer list-unlink writes in softirq context, giving control-flow hijack and arbitrary-write potential after heap grooming.\nA:H - Even unexploited, the timer fires against freed hdev memory and a destroyed req_workqueue, producing a KASAN slab-use-after-free splat and a kernel oops/panic in softirq context, as observed by the BlueZ test bot."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bluetooth/mgmt.c"],"versions":[{"version":"b338d91703fae6f6afd67f3f75caa3b8f36ddef3","lessThan":"990e6143b0ca0c66f099d67d00c112bf59b30d76","status":"affected","versionType":"git"},{"version":"b338d91703fae6f6afd67f3f75caa3b8f36ddef3","lessThan":"2927ff643607eddf4f03d10ef80fe10d977154aa","status":"affected","versionType":"git"},{"version":"b338d91703fae6f6afd67f3f75caa3b8f36ddef3","lessThan":"7b6b6c077cad0601d62c3c34ab7ce3fb25deda7b","status":"affected","versionType":"git"},{"version":"b338d91703fae6f6afd67f3f75caa3b8f36ddef3","lessThan":"fd62ca5ad136dcf6f5aa308423b299a6be6f54ea","status":"affected","versionType":"git"},{"version":"b338d91703fae6f6afd67f3f75caa3b8f36ddef3","lessThan":"55fb52ffdd62850d667ebed842815e072d3c9961","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/bluetooth/mgmt.c"],"versions":[{"version":"6.1","status":"affected"},{"version":"0","lessThan":"6.1","status":"unaffected","versionType":"semver"},{"version":"6.1.159","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.117","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.59","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.17.9","lessThanOrEqual":"6.17.*","status":"unaffected","versionType":"semver"},{"version":"6.18","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.1.159"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.6.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.12.59"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.17.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.18"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/990e6143b0ca0c66f099d67d00c112bf59b30d76"},{"url":"https://git.kernel.org/stable/c/2927ff643607eddf4f03d10ef80fe10d977154aa"},{"url":"https://git.kernel.org/stable/c/7b6b6c077cad0601d62c3c34ab7ce3fb25deda7b"},{"url":"https://git.kernel.org/stable/c/fd62ca5ad136dcf6f5aa308423b299a6be6f54ea"},{"url":"https://git.kernel.org/stable/c/55fb52ffdd62850d667ebed842815e072d3c9961"}],"title":"Bluetooth: MGMT: cancel mesh send timer when hdev removed","x_generator":{"engine":"bippy-1.2.0"}}}}