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 CE4591A0BE0 for ; Mon, 8 Dec 2025 00:48:24 +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=1765154904; cv=none; b=m+76+Xrawaa7JraZ7cBstd2Lz92ke+vB5WaJTCrEBNNUOaug1MK7KIfHMrG7cpDmRzpYlSHOgjCXjdyfAHFNIPYcv6SayC82uL4gLm5xOC+gkngQZFtCN28IHMwdm06H432FQizTHkpvbDUYQY0Iefy4Q5ZlyjrE8dj0BySXQQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765154904; c=relaxed/simple; bh=LW46aJLdQ6VwPvg2bDyEjRWM482aluPHR1ui7aHA1l0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pF5gD7JC36ar/zdiFhgXvihyyePLhl73WNzC5/+wHSoU98nGWjJnu0ljR5Uhz8DrqRkqEa6vVhluh54e3LdfkFQx6/CV4oq3AJpK9sIOqAygAVhTIE2dT2co5V4QJGM6icdYoFDHA3DAXJHcuIyTqLyzNO5G21nPs0uYqArvpOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FCMB07hL; 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="FCMB07hL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57921C4CEFB; Mon, 8 Dec 2025 00:48:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765154904; bh=LW46aJLdQ6VwPvg2bDyEjRWM482aluPHR1ui7aHA1l0=; h=From:To:Cc:Subject:Date:Reply-To:From; b=FCMB07hL1OfUCDP2tghe3a4xWJKQDpq84P4xycsDIARSGTmRT+RcIkKb7nEmw+MQ/ WomffktlE22WsGTwqB1vQTozzMd0Ob4ZxEOdakjaLs6as2bd47nTTK0acEDbzNtQNZ 6VJMsNJ2sgab17KG41T6IyM6Z59Fgz6iLt8QDmcY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40318: Bluetooth: hci_sync: fix race in hci_cmd_sync_dequeue_once Date: Mon, 8 Dec 2025 09:47:42 +0900 Message-ID: <2025120823-CVE-2025-40318-0f27@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=2866; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=mlxrq5sCYot15HGPv2CzsTn0RBYLbOfjFlFL7sMwVOw=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlmCtIXePWqJ93gbzUtDpQ8ra8TuVCs7br6w7SvErwbe Y/0Wm/oiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgImYHWJYMMV4q0C3QXEG19TZ 9T0nrn6fVHxGiWHBxe+X037p+9b8vT1hu+kkebs7YWbuAA== 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: hci_sync: fix race in hci_cmd_sync_dequeue_once hci_cmd_sync_dequeue_once() does lookup and then cancel the entry under two separate lock sections. Meanwhile, hci_cmd_sync_work() can also delete the same entry, leading to double list_del() and "UAF". Fix this by holding cmd_sync_work_lock across both lookup and cancel, so that the entry cannot be removed concurrently. The Linux kernel CVE team has assigned CVE-2025-40318 to this issue. Affected and fixed versions =========================== Issue introduced in 6.1.120 with commit f00f36db76eb8fd10d13e80e2590f23b5beaa54d and fixed in 6.1.159 with commit 0a94f7e017438935c09ef833a1aa908ad9875213 Issue introduced in 6.6.51 with commit 1499f79995c7ee58e3bfeeff75f6d1b37dcda881 and fixed in 6.6.117 with commit 932c0a4f77ac13e526fdd5b42914d29c9821d389 Issue introduced in 6.9 with commit 505ea2b295929e7be2b4e1bc86ee31cb7862fb01 and fixed in 6.12.58 with commit ae76cf6c2c842944c6514c57df54d728f1916553 Issue introduced in 6.9 with commit 505ea2b295929e7be2b4e1bc86ee31cb7862fb01 and fixed in 6.17.8 with commit 9cd536970192b72257afcdfba0bfc09993e6f19c Issue introduced in 6.9 with commit 505ea2b295929e7be2b4e1bc86ee31cb7862fb01 and fixed in 6.18 with commit 09b0cd1297b4dbfe736aeaa0ceeab2265f47f772 Issue introduced in 6.8.9 with commit 357603f4d396d85fbf0045512efaf1d7f7394ed7 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-40318 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: net/bluetooth/hci_sync.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/0a94f7e017438935c09ef833a1aa908ad9875213 https://git.kernel.org/stable/c/932c0a4f77ac13e526fdd5b42914d29c9821d389 https://git.kernel.org/stable/c/ae76cf6c2c842944c6514c57df54d728f1916553 https://git.kernel.org/stable/c/9cd536970192b72257afcdfba0bfc09993e6f19c https://git.kernel.org/stable/c/09b0cd1297b4dbfe736aeaa0ceeab2265f47f772