CVE-2025-40284 (GCVE-0-2025-40284)
Vulnerability from cvelistv5
Published
2025-12-06 21:51
Modified
2026-08-05 12:09
Summary
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 ------
Impacted products
Vendor Product Version
Linux Linux Version: b338d91703fae6f6afd67f3f75caa3b8f36ddef3
Version: b338d91703fae6f6afd67f3f75caa3b8f36ddef3
Version: b338d91703fae6f6afd67f3f75caa3b8f36ddef3
Version: b338d91703fae6f6afd67f3f75caa3b8f36ddef3
Version: b338d91703fae6f6afd67f3f75caa3b8f36ddef3
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "net/bluetooth/mgmt.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "990e6143b0ca0c66f099d67d00c112bf59b30d76",
              "status": "affected",
              "version": "b338d91703fae6f6afd67f3f75caa3b8f36ddef3",
              "versionType": "git"
            },
            {
              "lessThan": "2927ff643607eddf4f03d10ef80fe10d977154aa",
              "status": "affected",
              "version": "b338d91703fae6f6afd67f3f75caa3b8f36ddef3",
              "versionType": "git"
            },
            {
              "lessThan": "7b6b6c077cad0601d62c3c34ab7ce3fb25deda7b",
              "status": "affected",
              "version": "b338d91703fae6f6afd67f3f75caa3b8f36ddef3",
              "versionType": "git"
            },
            {
              "lessThan": "fd62ca5ad136dcf6f5aa308423b299a6be6f54ea",
              "status": "affected",
              "version": "b338d91703fae6f6afd67f3f75caa3b8f36ddef3",
              "versionType": "git"
            },
            {
              "lessThan": "55fb52ffdd62850d667ebed842815e072d3c9961",
              "status": "affected",
              "version": "b338d91703fae6f6afd67f3f75caa3b8f36ddef3",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "net/bluetooth/mgmt.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.1"
            },
            {
              "lessThan": "6.1",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.159",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.117",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.59",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.159",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.117",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.59",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.9",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.1",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "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 \u2014 enable the mesh experimental feature, issue Mesh Send, then remove the controller \u2014 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-\u003efunction 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."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:09:14.151Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40284",
    "datePublished": "2025-12-06T21:51:08.488Z",
    "dateReserved": "2025-04-16T07:20:57.184Z",
    "dateUpdated": "2026-08-05T12:09:14.151Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…