[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025112447-CVE-2025-40213-c55f@gregkh>
Date: Mon, 24 Nov 2025 16:59:48 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2025-40213: Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete
From: Greg Kroah-Hartman <gregkh@...nel.org>
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.
The Linux kernel CVE team has assigned CVE-2025-40213 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.17 with commit 302a1f674c00dd5581ab8e493ef44767c5101aab and fixed in 6.17.8 with commit 1c9aca1787e8395a2c59fef20e914467958969c5
Issue introduced in 6.17 with commit 302a1f674c00dd5581ab8e493ef44767c5101aab and fixed in 6.18-rc4 with commit e8785404de06a69d89dcdd1e9a0b6ea42dc6d327
Issue introduced in 6.16.10 with commit 87a1f16f07c6c43771754075e08f45b41d237421
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-40213
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
include/net/bluetooth/mgmt.h
net/bluetooth/mgmt.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/5c19daa93d9af29f1f46251b47e1ea66bcc8d679
https://git.kernel.org/stable/c/1c9aca1787e8395a2c59fef20e914467958969c5
https://git.kernel.org/stable/c/e8785404de06a69d89dcdd1e9a0b6ea42dc6d327
Powered by blists - more mailing lists