# CVE-2025-40213: Bluetooth: MGMT: fix crash in set\_mesh\_sync and set\_mesh\_complete

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-26)
- **Published:** 2025-11-24T15:59:44.000Z
- **Modified:** 2026-10-21T13:18:19.787Z

## Who should check

- Anyone running Linux \>= 0b60eb04b8524e1b4b3f07fea0d16fda9a677d9a, \< 31d6c9216aa1be18ba317239738f73b0b0c7b691; \>= d71b98f253b079cbadc83266383f26fe7e9e103b, \< 5c19daa93d9af29f1f46251b47e1ea66bcc8d679; \>= 302a1f674c00dd5581ab8e493ef44767c5101aab, \< 1c9aca1787e8395a2c59fef20e914467958969c5; \>= 302a1f674c00dd5581ab8e493ef44767c5101aab, \< e8785404de06a69d89dcdd1e9a0b6ea42dc6d327; 87a1f16f07c6c43771754075e08f45b41d237421; \>= 6.6.140, \< 6.6.160; \>= 6.16.10, \< 6.17
- Anyone running Linux 6.17

## Description

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.

## Affected and fixed versions

- Linux: \>= 0b60eb04b8524e1b4b3f07fea0d16fda9a677d9a, \< 31d6c9216aa1be18ba317239738f73b0b0c7b691; \>= d71b98f253b079cbadc83266383f26fe7e9e103b, \< 5c19daa93d9af29f1f46251b47e1ea66bcc8d679; \>= 302a1f674c00dd5581ab8e493ef44767c5101aab, \< 1c9aca1787e8395a2c59fef20e914467958969c5; \>= 302a1f674c00dd5581ab8e493ef44767c5101aab, \< e8785404de06a69d89dcdd1e9a0b6ea42dc6d327; 87a1f16f07c6c43771754075e08f45b41d237421; \>= 6.6.140, \< 6.6.160; \>= 6.16.10, \< 6.17 (cvelist)
- Linux: 6.17 (cvelist)

## Mitigation

- Upgrade Linux to 6.17 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-40213. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40213.md
Affected: Linux >= 0b60eb04b8524e1b4b3f07fea0d16fda9a677d9a, < 31d6c9216aa1be18ba317239738f73b0b0c7b691; >= d71b98f253b079cbadc83266383f26fe7e9e103b, < 5c19daa93d9af29f1f46251b47e1ea66bcc8d679; >= 302a1f674c00dd5581ab8e493ef44767c5101aab, < 1c9aca1787e8395a2c59fef20e914467958969c5; >= 302a1f674c00dd5581ab8e4…
Fixed in: Linux 31d6c9216aa1be18ba317239738f73b0b0c7b691, Linux 5c19daa93d9af29f1f46251b47e1ea66bcc8d679, Linux 1c9aca1787e8395a2c59fef20e914467958969c5, Linux 6.6.160, Linux 6.17

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-40213 being exploited?

There is no confirmed exploitation: CVE-2025-40213 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-40213?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-40213?

Linux \>= 0b60eb04b8524e1b4b3f07fea0d16fda9a677d9a, \< 31d6c9216aa1be18ba317239738f73b0b0c7b691; \>= d71b98f253b079cbadc83266383f26fe7e9e103b, \< 5c19daa93d9af29f1f46251b47e1ea66bcc8d679; \>= 302a1f674c00dd5581ab8e493ef44767c5101aab, \< 1c9aca1787e8395a2c59fef20e914467958969c5; \>= 302a1f674c00dd5581ab8e493ef44767c5101aab, \< e8785404de06a69d89dcdd1e9a0b6ea42dc6d327; 87a1f16f07c6c43771754075e08f45b41d237421; \>= 6.6.140, \< 6.6.160; \>= 6.16.10, \< 6.17; Linux 6.17.

### Is there a fix for CVE-2025-40213?

Yes. Fixed in Linux 31d6c9216aa1be18ba317239738f73b0b0c7b691, Linux 5c19daa93d9af29f1f46251b47e1ea66bcc8d679, Linux 1c9aca1787e8395a2c59fef20e914467958969c5, Linux 6.6.160, Linux 6.17. Upgrade Linux to 6.17 or later.

### How do I check if I'm affected by CVE-2025-40213?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/31d6c9216aa1be18ba317239738f73b0b0c7b691>
- other: <https://git.kernel.org/stable/c/5c19daa93d9af29f1f46251b47e1ea66bcc8d679>
- other: <https://git.kernel.org/stable/c/1c9aca1787e8395a2c59fef20e914467958969c5>
- other: <https://git.kernel.org/stable/c/e8785404de06a69d89dcdd1e9a0b6ea42dc6d327>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-40213>

HTML: <https://flawdb.com/CVE-2025-40213> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-40213>
