Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792758894; b=OCeakuLNZsyiobQnKyguGKDrqjWhuvo/S8QKCln2lVB18ec7blYOdtZtFPwV1Rks2y2Q GpQSxTe7aIi4jKg8S5haJN1p7Tl3M7aswYICfezCuRcs4YbXg4lEbXyZO5/V627KHLrt/ gJ0XbT/sfF4Hb0wyo/HQheKv59t0GrXWwLwDvv2NdCNNILs5M7lPf4xLl8VnCYh6zHYAR FMaE9xT3uX/fHDsh6ZMkDLPLlvq+C7nDYtAK1SuZDp/PJohURo28p7s42qVyVxVHDHw13 iHULuSP8ht7CZiVWgqdrT6riJoTzb1nP1x3lc1XPXHbuvX+sLGzdVbM7GE/MckAeOBw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792758894; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=Ebe+mo10DiU81lZozilaPqETBADvE7e8AYYAarSkCjE=; b=d/iyiS2x9xTj+6rh3Xjy9o6HmQeXO3zCi4GzwtH69Q/Pybo/MjwlCt+mNr7LJcaIKxGM 84rEjoK6aDkqKJSq1YYodnNJn1CaSoCmm46Utal5ua6cJcBNXKvIdYRdKDMLJDk+dUSBK nMRWJrVicto4lOGcf4CE39KQ9jYVsQxBp0NtxGN6NZWCNMOc74S6M5o+8mt6XGLeUQQYV FqAANVsB0PCc1oGieyajzwPF8LCeX+aiMngDlFGvR4uiog4at1Dq2PJJeGG1wCSevxhH8 3OVhpinl2lX3AyEmXSgNjg7t7athmcrBKThDg+FNy+xa/LsfQEbHczz1uxvWzH8WWww== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Yy8jBQqB; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C431606A31B for ; Fri, 23 Oct 2026 12:34:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Yy8jBQqB Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E1DF1F01825; Fri, 23 Oct 2026 12:34:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792758894; bh=Ebe+mo10DiU81lZozilaPqETBADvE7e8AYYAarSkCjE=; h=From:To:Cc:Subject:Date:Reply-To; b=Yy8jBQqBYbfREkxNRvwphoFFU9imE9HGlrTQ1cOGEznNjI0kOHcairONiQ3vjIy4H bzdCT4QC41QLfhi0V6Va9VEASY1RHtxsF9R9BzdrpTM162OrtRVUNg3mcDNtQA5EP4 IZZ9m4dEpsZ1yY1lMnXCFwDLUFwWqDqgps/O0Ie8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99009: Bluetooth: RFCOMM: connect the session socket without rfcomm_mutex Date: Fri, 23 Oct 2026 14:20:11 +0200 Message-ID: <2026102319-CVE-2026-99009-bc57@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6059; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dQqSMHUmoQC9/GyN+VxFJkxNHYuoqyX4OtojPjOohG4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFm3A46fn+0x+a7a4j6V+fvyH8iUPpliElBnU/VLbm2QS nC/RcqLjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIIiGGBYsvqwSEHXzo6dx1 e0LHV6/D5+MnFTPMD9LTPvVTw7zuzjfZI3fafnV8bqjXBwA= 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: RFCOMM: connect the session socket without rfcomm_mutex An RFCOMM connect() issued while a BR/EDR link is being authenticated makes lockdep report a circular dependency, and the reported cycle is a real AB/BA between rfcomm_mutex and hdev->lock. rfcomm_security_cfm() is called from the HCI event path, which already holds hdev->lock: hci_rx_work() hci_event_packet() hci_cc_read_enc_key_size() [hdev->lock] hci_encrypt_cfm() [hci_cb_list_lock] rfcomm_security_cfm() [rfcomm_mutex] while an RFCOMM connect() from userspace takes the same two locks the other way round: rfcomm_sock_connect() rfcomm_dlc_open() [rfcomm_mutex] __rfcomm_dlc_open() rfcomm_session_create() kernel_connect() l2cap_sock_connect() l2cap_chan_connect() [hdev->lock] WARNING: possible circular locking dependency detected kworker/u131:1/1128 is trying to acquire lock: rfcomm_mutex, at: rfcomm_security_cfm+0x31/0x3e0 [rfcomm] but task is already holding lock: hci_cb_list_lock, at: hci_cc_read_enc_key_size+0x1d2/0xcc0 Chain exists of: rfcomm_mutex --> &hdev->lock --> hci_cb_list_lock hci_auth_complete_evt() and hci_encrypt_change_evt() reach the callback the same way. Both orders have to be seen in the same boot, which is why a BR/EDR connection alone is not enough to show it: a session set up by the remote side is created by rfcomm_accept_connection() in krfcommd, which calls kernel_accept() and never takes hdev->lock under rfcomm_mutex. Connecting a device that authenticates and encrypts the link and then calling connect() on an RFCOMM socket towards any address - the connect does not have to succeed, the order is recorded before the page timeout - reports it every time. Only the session socket has to be connected with the lock held, and it does not: nothing else can see the socket before it is put on the session list. So connect it first and take rfcomm_mutex afterwards, which removes the rfcomm_mutex -> hdev->lock order for good, rather than keeping the HCI event path out of rfcomm_mutex. rfcomm_session_create() becomes rfcomm_session_connect(), which returns the connected socket without touching the session list, and rfcomm_dlc_open() adds the session once it holds the lock again. If another opener added a session for the same pair while this socket was connecting, that session is used and this socket is dropped. __rfcomm_dlc_open() now takes the session it should use, and its state check runs after the lock is re-acquired, so a DLC that was opened or closed in the meantime is still handled. Over an existing ACL link the connection can complete before the session reaches the list, and the wakeup from the socket callback is then lost, so krfcommd is woken once the session is visible. Connecting without the lock opens a window in which the socket can be closed. The DLC is not on a session yet, so rfcomm_dlc_close() finds nothing to do and returns without touching it, and rfcomm_dlc_open() would then attach a DLC whose owner is gone. rfcomm_dlc_close() now marks such a DLC with RFCOMM_CLOSED, and rfcomm_dlc_open() checks the mark once it holds rfcomm_mutex again and drops the socket instead of attaching the DLC. The mark is cleared when an open starts, so a DLC that is reused is not affected. This covers both callers of rfcomm_dlc_open(), the socket and the tty layer. The Linux kernel CVE team has assigned CVE-2026-99009 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.157 with commit 82425b14f0fb22e46cfddc56d6465570f5ed0ce6 and fixed in 6.6.160 with commit 4dc3d5a004b8fd59f3c905631dbb18cb601b1b41 Issue introduced in 6.12.109 with commit 1b7841ffad08e911e8c4b9470f3fa08423568940 and fixed in 6.12.114 with commit d2206e8c78be69d21d4f5343c3e99fbaeef41cbb Issue introduced in 6.18.50 with commit 946d76db77ee5f922968ce558629ae47b381e3fc and fixed in 6.18.58 with commit cc7732b8549ecb6f02457edeb8db1f6d255e381c Issue introduced in 7.2.4 with commit fbf7961964a6e93360179f64712320ae9a1e9577 and fixed in 7.2.11 with commit f492de11b325446b0b11bc2eb86e1f546eaa61b6 Issue introduced in 5.10.270 with commit 62ce8b33eb238cf18c15207332fbdc26d858f592 Issue introduced in 5.15.221 with commit 3873f3449701b3dc98cba577923be6493598e7a1 Issue introduced in 6.1.188 with commit 7ded3264106418c6456ccceaafd9fda596ce12c3 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-2026-99009 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/rfcomm.h net/bluetooth/rfcomm/core.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/4dc3d5a004b8fd59f3c905631dbb18cb601b1b41 https://git.kernel.org/stable/c/d2206e8c78be69d21d4f5343c3e99fbaeef41cbb https://git.kernel.org/stable/c/cc7732b8549ecb6f02457edeb8db1f6d255e381c https://git.kernel.org/stable/c/f492de11b325446b0b11bc2eb86e1f546eaa61b6 https://git.kernel.org/stable/c/ac022970e9fb0a5f7e7d1f6c8e104c1ed924dd1c