Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 183E52D59F7 for ; Mon, 24 Nov 2025 15:59:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763999993; cv=none; b=lXYWwDUpXBAGAlfiug+FGvqio/rMNWenHTKhE8kyplJDo2p6zkFrylpsdBDnzm+nLDf1OXTR8+LbzYMNGLog23HQxPJrNrbHgLVPjqo3Oq/VQ+k74cQnaqPTxC/MhFGbC8B7T2CW3/w0BgEvg1g+8EYn1bSJIcyHFJoJfLyFmpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763999993; c=relaxed/simple; bh=YHor+qHms5NcTEKn7s3sJcqkOEEeskKtyVDcb8IVEYM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dIKG8xSLu1UBTyS05aA5ByWuMTL9YWq9PyqsYCSmqEB864+n+SMDZWmDllVD92UkL23Haonni8qQYjjj42JAmeJoTavSzYLk60wGh1bh6qNTERD7ariiphV2z/aJThfon8g/hH1Hi4fCbQ3GNCciySZjo/yAXG4Md7DNiKu9f3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sMtLzZBH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sMtLzZBH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1847BC116C6; Mon, 24 Nov 2025 15:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1763999992; bh=YHor+qHms5NcTEKn7s3sJcqkOEEeskKtyVDcb8IVEYM=; h=From:To:Cc:Subject:Date:Reply-To:From; b=sMtLzZBHPiDdeQKpJKq2aJq8i/g9iyBM1Ak6oCAQ3ywGJPJCzLgpQRrtQBSnhbu/v 8jNcGQ8jdHyCjBcisqa7EXyUU78ZXJDpTfWH/VdPBD8bttbKdKuIMZoZL5QBw1J9JH BiY4VwGU9SuP2txa3sHhUMC/MNP7h4/J40yEQkcI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40213: Bluetooth: MGMT: fix crash in set_mesh_sync and set_mesh_complete Date: Mon, 24 Nov 2025 16:59:48 +0100 Message-ID: <2025112447-CVE-2025-40213-c55f@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2393; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=J7WSoV06ibZN+3CHSTJJSR9FvQzfmzpcO+L6rt+HsjU=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkqDZ8nJSX/u3lZUnkz0/Off7o0vXZGftwtmBEqu/GQ6 EST8rLKjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIyx6G+RXbbJ/LMZ/I6lm8 pLdWY+Zax7JGDoa5gmp7mRb/uMX3edfLZQ7h7VX8HGWhAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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