CVE-2025-40213

Source
https://cve.org/CVERecord?id=CVE-2025-40213
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40213.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40213
Downstream
Related
Published
2025-11-24T15:59:44Z
Modified
2026-03-20T12:43:14.929681Z
Summary
Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete
Details

In the Linux kernel, the following vulnerability has been resolved:

Bluetooth: MGMT: fix crash in setmeshsync and setmeshcomplete

There is a BUG: KASAN: stack-out-of-bounds in setmeshsync due to memcpy from badly declared on-stack flexible array.

Another crash is in setmeshcomplete() due to double listdel via mgmtpendingvalid + mgmtpending_remove.

Use DEFINE_FLEX to declare the flexible array right, and don't memcpy outside bounds.

As mgmtpendingvalid removes the cmd from list, use mgmtpendingfree, and also report status on error.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40213.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d71b98f253b079cbadc83266383f26fe7e9e103b
Fixed
5c19daa93d9af29f1f46251b47e1ea66bcc8d679
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
302a1f674c00dd5581ab8e493ef44767c5101aab
Fixed
1c9aca1787e8395a2c59fef20e914467958969c5
Fixed
e8785404de06a69d89dcdd1e9a0b6ea42dc6d327
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
87a1f16f07c6c43771754075e08f45b41d237421

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40213.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.17.0
Fixed
6.17.8

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40213.json"