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 5F788190676 for ; Tue, 30 Jul 2024 07:50:18 +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=1722325818; cv=none; b=ajQ67WUzDNpp2JbQHQ6dvTQho1owRZTCyXbWQtsq4Az1fU+43LwwJzQNCNHyEaWwuK/ByNiEXuv24EWZVCfJxFE4GC1Q++I9N/dAh2f6qxbhqlz+4fgkXMiW6ujlyAsAtvGS7f9uTbjQ27qPApHGR+aqpUEoTEjo/JHzcqTYeRM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722325818; c=relaxed/simple; bh=9CVtWYuuhXZ01IwMdi9qyBVDiOx6uVpc0PsDW7tGYi8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Pl11KiqXROVmr9zQ2QGRLKmZ0tKiFau6KG9S4Ahpw+lZWJ3D64on0VEVcZYSlKqMNRrjryWNzdvhEnjqGV4ieYCtlhWwRP+JEz/WP8yWLKblDgYFpDei7Ygj8boGMJsuMrkl2XtKoXfHC2tCndOOh34nfVcIGPVlpLL3vZjjUFA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=njhga6Ae; 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="njhga6Ae" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70A38C32782; Tue, 30 Jul 2024 07:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722325817; bh=9CVtWYuuhXZ01IwMdi9qyBVDiOx6uVpc0PsDW7tGYi8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=njhga6AeykQ0EIZZNVqo/Et4Ac23IKWEpiNEbbRuwq5+priehjWr6mY9PUSI9wMwm /EuX+HMTmlLiEQisPSXPaOhFSkZIxTbGP7UD0wq89Jm/9FAF4RfOkseaLKjFTYqnxw AMvHO48o0zurtd2Z1hx9AaOuNXD+Qna0YBsAIvHg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42141: Bluetooth: ISO: Check socket flag instead of hcon Date: Tue, 30 Jul 2024 09:47:59 +0200 Message-ID: <2024073030-CVE-2024-42141-9017@gregkh> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3499; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9CVtWYuuhXZ01IwMdi9qyBVDiOx6uVpc0PsDW7tGYi8=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkrZk3S0T6VEjNX4oB968TZJzK4TROOLJi37X30o9Czr e9ZJuzt74hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJBL5kWHBqxrRfh0sWrrm/ 8USkpHgTzwPR4jkM8zRUzpryvBVaoaPI1rrj7X4Vp7K1xwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: Bluetooth: ISO: Check socket flag instead of hcon This fixes the following Smatch static checker warning: net/bluetooth/iso.c:1364 iso_sock_recvmsg() error: we previously assumed 'pi->conn->hcon' could be null (line 1359) net/bluetooth/iso.c 1347 static int iso_sock_recvmsg(struct socket *sock, struct msghdr *msg, 1348 size_t len, int flags) 1349 { 1350 struct sock *sk = sock->sk; 1351 struct iso_pinfo *pi = iso_pi(sk); 1352 1353 BT_DBG("sk %p", sk); 1354 1355 if (test_and_clear_bit(BT_SK_DEFER_SETUP, &bt_sk(sk)->flags)) { 1356 lock_sock(sk); 1357 switch (sk->sk_state) { 1358 case BT_CONNECT2: 1359 if (pi->conn->hcon && ^^^^^^^^^^^^^^ If ->hcon is NULL 1360 test_bit(HCI_CONN_PA_SYNC, &pi->conn->hcon->flags)) { 1361 iso_conn_big_sync(sk); 1362 sk->sk_state = BT_LISTEN; 1363 } else { --> 1364 iso_conn_defer_accept(pi->conn->hcon); ^^^^^^^^^^^^^^ then we're toast 1365 sk->sk_state = BT_CONFIG; 1366 } 1367 release_sock(sk); 1368 return 0; 1369 case BT_CONNECTED: 1370 if (test_bit(BT_SK_PA_SYNC, The Linux kernel CVE team has assigned CVE-2024-42141 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit fbdc4bc47268 and fixed in 6.6.39 with commit 045669710464 Issue introduced in 6.6 with commit fbdc4bc47268 and fixed in 6.9.9 with commit 33fabef48916 Issue introduced in 6.6 with commit fbdc4bc47268 and fixed in 6.10 with commit 596b6f081336 Issue introduced in 6.5.12 with commit c03a10bd5b6c 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-2024-42141 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/iso.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/045669710464a21c67e690ef14698fd71857cb11 https://git.kernel.org/stable/c/33fabef489169c6db87843ef23351ed0d5e51ad8 https://git.kernel.org/stable/c/596b6f081336e77764ca35cfeab66d0fcdbe544e