CVE-2025-40213 Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete
A memory corruption flaw in the Linux kernel Bluetooth subsystem allows attackers to cause a system crash via stack-out-of-bounds writes.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-40213?
CVE-2025-40213 is a high-severity memory corruption vulnerability in Linux, published on 24 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2025-40213?
How do I fix CVE-2025-40213?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2025-40213 being exploited?
There is no known exploitation of CVE-2025-40213 in the wild and no public exploit code.
Sources
Also known as AZL-89667, BELL-CVE-2025-40213, DEBIAN-CVE-2025-40213, GHSA-hxj9-5m9x-pxq2, ROOT-OS-DEBIAN-13-CVE-2025-40213, UBUNTU-CVE-2025-40213.