GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2025-40213 (GCVE-0-2025-40213)

Vulnerability from cvelistv5 – Published: 2025-11-24 15:59 – Updated: 2026-08-05 12:08
VLAI
Title
Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete
Summary
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete There is a BUG: KASAN: stack-out-of-bounds in set_mesh_sync due to memcpy from badly declared on-stack flexible array. Another crash is in set_mesh_complete() due to double list_del via mgmt_pending_valid + mgmt_pending_remove. Use DEFINE_FLEX to declare the flexible array right, and don't memcpy outside bounds. As mgmt_pending_valid removes the cmd from list, use mgmt_pending_free, and also report status on error.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: d71b98f253b079cbadc83266383f26fe7e9e103b , < 5c19daa93d9af29f1f46251b47e1ea66bcc8d679 (git)
Affected: 302a1f674c00dd5581ab8e493ef44767c5101aab , < 1c9aca1787e8395a2c59fef20e914467958969c5 (git)
Affected: 302a1f674c00dd5581ab8e493ef44767c5101aab , < e8785404de06a69d89dcdd1e9a0b6ea42dc6d327 (git)
Affected: 0b60eb04b8524e1b4b3f07fea0d16fda9a677d9a (git)
Affected: 87a1f16f07c6c43771754075e08f45b41d237421 (git)
Affected: 6.6.140 , < 6.7 (semver)
Affected: 6.16.10 , < 6.17 (semver)
guessed Create a notification for this product.
Linux Linux Affected: 6.17
Unaffected: 0 , < 6.17 (semver)
Unaffected: 6.17.8 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "include/net/bluetooth/mgmt.h",
            "net/bluetooth/mgmt.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "5c19daa93d9af29f1f46251b47e1ea66bcc8d679",
              "status": "affected",
              "version": "d71b98f253b079cbadc83266383f26fe7e9e103b",
              "versionType": "git"
            },
            {
              "lessThan": "1c9aca1787e8395a2c59fef20e914467958969c5",
              "status": "affected",
              "version": "302a1f674c00dd5581ab8e493ef44767c5101aab",
              "versionType": "git"
            },
            {
              "lessThan": "e8785404de06a69d89dcdd1e9a0b6ea42dc6d327",
              "status": "affected",
              "version": "302a1f674c00dd5581ab8e493ef44767c5101aab",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "0b60eb04b8524e1b4b3f07fea0d16fda9a677d9a",
              "versionType": "git"
            },
            {
              "status": "affected",
              "version": "87a1f16f07c6c43771754075e08f45b41d237421",
              "versionType": "git"
            },
            {
              "lessThan": "6.7",
              "status": "affected",
              "version": "6.6.140",
              "versionType": "semver"
            },
            {
              "lessThan": "6.17",
              "status": "affected",
              "version": "6.16.10",
              "versionType": "semver"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "include/net/bluetooth/mgmt.h",
            "net/bluetooth/mgmt.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.17"
            },
            {
              "lessThan": "6.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.8",
              "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.17.8",
                  "versionStartIncluding": "6.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.6.140",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionStartIncluding": "6.16.10",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete\n\nThere is a BUG: KASAN: stack-out-of-bounds in set_mesh_sync due to\nmemcpy from badly declared on-stack flexible array.\n\nAnother crash is in set_mesh_complete() due to double list_del via\nmgmt_pending_valid + mgmt_pending_remove.\n\nUse DEFINE_FLEX to declare the flexible array right, and don\u0027t memcpy\noutside bounds.\n\nAs mgmt_pending_valid removes the cmd from list, use mgmt_pending_free,\nand also report status on error."
        }
      ],
      "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 vulnerability is triggered entirely through a local AF_BLUETOOTH HCI control (mgmt) socket by sending a MGMT_OP_SET_MESH_RECEIVER command via sendmsg(); no over-the-air interaction is needed to reach or corrupt memory.\nAC:L - Both defects fire deterministically \u2014 any SET_MESH_RECEIVER with param_len \u003e 6 causes the stack out-of-bounds read, and every successful completion hits the double list_del; the optional sock use-after-free variant is a race whose both sides (issuing the command and closing the mgmt fd) are fully attacker-controlled.\nPR:L - Requires a trusted mgmt socket (CAP_NET_ADMIN), the privilege level held by the ordinary non-root Bluetooth daemon on Linux desktops and by Android\u0027s sandboxed bluetooth process, so a compromised Bluetooth stack \u2014 itself remotely attackable \u2014 reaches this with low effective privilege.\nUI:N - The attacker issues the management command directly and no victim action, configuration change, or interaction is required.\nS:U - The out-of-bounds access, list corruption and freed-socket reuse all occur within the kernel\u0027s own security authority with no crossing of a VM, IOMMU or sandbox boundary.\nC:H - Up to 16 bytes of adjacent kernel stack are copied into the persistent hdev-\u003emesh_ad_types filter and can be read back byte-by-byte through the mesh_device_found() advertisement-forwarding oracle, and the use-after-free on the released sock additionally exposes reclaimed slab contents.\nI:H - The second list_del writes through LIST_POISON pointers, and the premature sock_put lets mgmt_cmd_complete() write into a freed, sprayable hci_pinfo/sock object (sk_receive_queue, sk_data_ready), which is a control-flow hijack primitive rather than a bounded modification.\nA:H - The double list_del reliably oopses on poison-pointer dereference (or WARNs under CONFIG_DEBUG_LIST), the stack out-of-bounds read is a hard KASAN BUG, and the error path leaks the cmd, its parameters and a socket reference on every failure."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:08:38.482Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/5c19daa93d9af29f1f46251b47e1ea66bcc8d679"
        },
        {
          "url": "https://git.kernel.org/stable/c/1c9aca1787e8395a2c59fef20e914467958969c5"
        },
        {
          "url": "https://git.kernel.org/stable/c/e8785404de06a69d89dcdd1e9a0b6ea42dc6d327"
        }
      ],
      "title": "Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-40213",
    "datePublished": "2025-11-24T15:59:44.000Z",
    "dateReserved": "2025-04-16T07:20:57.179Z",
    "dateUpdated": "2026-08-05T12:08:38.482Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-40213",
      "date": "2026-09-18",
      "epss": "0.00142",
      "percentile": "0.03885"
    },
    "microsoft_vex": {
      "current_release_date": "2026-06-28T01:58:16.000Z",
      "cve": "CVE-2025-40213",
      "id": "msrc_CVE-2025-40213",
      "initial_release_date": "2025-11-02T00:00:00.000Z",
      "product_status:known_affected": "2",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-40213.json",
      "version": "2"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "include/net/bluetooth/mgmt.h",
                  "net/bluetooth/mgmt.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "5c19daa93d9af29f1f46251b47e1ea66bcc8d679",
                    "status": "affected",
                    "version": "d71b98f253b079cbadc83266383f26fe7e9e103b",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "1c9aca1787e8395a2c59fef20e914467958969c5",
                    "status": "affected",
                    "version": "302a1f674c00dd5581ab8e493ef44767c5101aab",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "e8785404de06a69d89dcdd1e9a0b6ea42dc6d327",
                    "status": "affected",
                    "version": "302a1f674c00dd5581ab8e493ef44767c5101aab",
                    "versionType": "git"
                  },
                  {
                    "status": "affected",
                    "version": "0b60eb04b8524e1b4b3f07fea0d16fda9a677d9a",
                    "versionType": "git"
                  },
                  {
                    "status": "affected",
                    "version": "87a1f16f07c6c43771754075e08f45b41d237421",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "6.7",
                    "status": "affected",
                    "version": "6.6.140",
                    "versionType": "semver"
                  },
                  {
                    "lessThan": "6.17",
                    "status": "affected",
                    "version": "6.16.10",
                    "versionType": "semver"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "include/net/bluetooth/mgmt.h",
                  "net/bluetooth/mgmt.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.17"
                  },
                  {
                    "lessThan": "6.17",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.17.*",
                    "status": "unaffected",
                    "version": "6.17.8",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.18",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nBluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete\n\nThere is a BUG: KASAN: stack-out-of-bounds in set_mesh_sync due to\nmemcpy from badly declared on-stack flexible array.\n\nAnother crash is in set_mesh_complete() due to double list_del via\nmgmt_pending_valid + mgmt_pending_remove.\n\nUse DEFINE_FLEX to declare the flexible array right, and don\u0027t memcpy\noutside bounds.\n\nAs mgmt_pending_valid removes the cmd from list, use mgmt_pending_free,\nand also report status on error."
          }
        ],
        "id": "CVE-2025-40213",
        "lastModified": "2026-07-30T06:24:18.247",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2025-11-24T16:15:49.150",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/1c9aca1787e8395a2c59fef20e914467958969c5"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/5c19daa93d9af29f1f46251b47e1ea66bcc8d679"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/e8785404de06a69d89dcdd1e9a0b6ea42dc6d327"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Deferred"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:34:26+00:00",
      "cve": "CVE-2025-40213",
      "id": "CVE-2025-40213",
      "initial_release_date": "2025-11-24T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-40213.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-09-11T01:54:51Z",
      "cve": "CVE-2025-40213",
      "id": "CVE-2025-40213",
      "initial_release_date": "2025-11-25T00:25:24Z",
      "product_status:first_fixed": "2",
      "product_status:known_affected": "549",
      "product_status:known_not_affected": "321",
      "product_status:recommended": "287",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-40213",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-40213.json",
      "version": "41"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…