{"id":"CVE-2025-40213","aliases":["CVE-2025-40213"],"related":[],"kind":"vulnerability","state":"published","title":"Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete","summary":"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't memcpy\noutside bounds.\n\nAs mgmt_pending_valid removes the cmd from list, use mgmt_pending_free,\nand also report status on error.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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't memcpy\noutside bounds.\n\nAs mgmt_pending_valid removes the cmd from list, use mgmt_pending_free,\nand also report status on error.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nBluetooth: MGMT: soluciona un fallo en set_mesh_sync y set_mesh_complete\n\nExiste un BUG: KASAN: stack-out-of-bounds en set_mesh_sync debido a memcpy desde un array flexible en la pila mal declarado.\n\nOtro fallo ocurre en set_mesh_complete() debido a un doble list_del a través de mgmt_pending_valid + mgmt_pending_remove.\n\nUsa DEFINE_FLEX para declarar correctamente el array flexible, y no hagas memcpy fuera de los límites.\n\nComo mgmt_pending_valid elimina el cmd de la lista, usa mgmt_pending_free, y también informa el estado en caso de error.","source":"nvd"}],"published":"2025-11-24T15:59:44.000Z","modified":"2026-10-21T13:18:19.787Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"0b60eb04b8524e1b4b3f07fea0d16fda9a677d9a","fixed":"31d6c9216aa1be18ba317239738f73b0b0c7b691","status":"affected"},{"type":"git","introduced":"d71b98f253b079cbadc83266383f26fe7e9e103b","fixed":"5c19daa93d9af29f1f46251b47e1ea66bcc8d679","status":"affected"},{"type":"git","introduced":"302a1f674c00dd5581ab8e493ef44767c5101aab","fixed":"1c9aca1787e8395a2c59fef20e914467958969c5","status":"affected"},{"type":"git","introduced":"302a1f674c00dd5581ab8e493ef44767c5101aab","fixed":"e8785404de06a69d89dcdd1e9a0b6ea42dc6d327","status":"affected"},{"type":"git","version":"87a1f16f07c6c43771754075e08f45b41d237421","status":"affected"},{"type":"semver","introduced":"6.6.140","fixed":"6.6.160","status":"affected"},{"type":"semver","introduced":"6.16.10","fixed":"6.17","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.17","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.17.8","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/31d6c9216aa1be18ba317239738f73b0b0c7b691","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5c19daa93d9af29f1f46251b47e1ea66bcc8d679","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1c9aca1787e8395a2c59fef20e914467958969c5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e8785404de06a69d89dcdd1e9a0b6ea42dc6d327","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-40213","url":"https://www.cve.org/CVERecord?id=CVE-2025-40213","licence":"CVE Terms of Use","modified":"2026-10-21T12:37:53.837Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-40213","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40213","licence":"Public domain","modified":"2026-10-21T13:18:19.787Z"}],"updatedAt":"2026-11-25T22:59:07.966Z","epss":{"score":0.00193,"percentile":0.09473,"date":"2026-12-01T12:00:22.000Z"}}