From mboxrd@z Thu Jan 1 00:00:00 1970 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 A1B3D25FA13; Tue, 8 Apr 2025 11:42:28 +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=1744112548; cv=none; b=AVbv44NKmpYE6EkOBbqoZSxQt1D+R7N687bwIxIBnUJl1yKJVmiqMlFZSDMFhYiAMAVpJjxueWeywEQmoYkNvvx1WSdVHfqzSWg0pXbxary+ZxYkMnPY9Fq2CCMAdhz0FBXLBfGYCT5phjtVr8+vqo4TvB22Wnjgzh4jiHC1szc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744112548; c=relaxed/simple; bh=G8k57NmaKyqNhuPv/HZNJMu4cCJdjTC/nEVrtrquU8I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vx8Jc9rXHMkatM3CpAX2SvmwcgTGGYn7kUu9zC1EKZuVrAX2qsByPhtJd4m/OeP6fZikFIvSzUv1r3AgQM3kLD8RrzM+kCnzaj+VvcgVx2FgMoiyW7ViHmKDE5XXIMVW5k5TuLrXfd2gtfd5om8dblMEfWRXXKE32xd1Zu4odHQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KCx1m3KF; 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="KCx1m3KF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31356C4CEE5; Tue, 8 Apr 2025 11:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744112548; bh=G8k57NmaKyqNhuPv/HZNJMu4cCJdjTC/nEVrtrquU8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KCx1m3KFrjgOwFKLVtDnZQPTJzDkvJi2pf7HYNUMdHE/5DGVHztTMzyB4Pv+2Ta9m LgYLSiEVwGYafpZDqvBluvZjqx9NvcD/RHE2JT/LIqWAne0WvXniob/J95H4ns5swL m/CsCUi0U73PwyS8IwlbCqXi+Xi2OmpoSFQqEESQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Luiz Augusto von Dentz , Kiran K , Bin Lan , He Zhe Subject: [PATCH 5.15 108/279] Bluetooth: hci_event: Align BR/EDR JUST_WORKS paring with LE Date: Tue, 8 Apr 2025 12:48:11 +0200 Message-ID: <20250408104829.259431921@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104826.319283234@linuxfoundation.org> References: <20250408104826.319283234@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luiz Augusto von Dentz commit b25e11f978b63cb7857890edb3a698599cddb10e upstream. This aligned BR/EDR JUST_WORKS method with LE which since 92516cd97fd4 ("Bluetooth: Always request for user confirmation for Just Works") always request user confirmation with confirm_hint set since the likes of bluetoothd have dedicated policy around JUST_WORKS method (e.g. main.conf:JustWorksRepairing). CVE: CVE-2024-8805 Cc: stable@vger.kernel.org Fixes: ba15a58b179e ("Bluetooth: Fix SSP acceptor just-works confirmation without MITM") Signed-off-by: Luiz Augusto von Dentz Tested-by: Kiran K Signed-off-by: Bin Lan Signed-off-by: He Zhe Signed-off-by: Greg Kroah-Hartman --- net/bluetooth/hci_event.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -4859,19 +4859,16 @@ static void hci_user_confirm_request_evt goto unlock; } - /* If no side requires MITM protection; auto-accept */ + /* If no side requires MITM protection; use JUST_CFM method */ if ((!loc_mitm || conn->remote_cap == HCI_IO_NO_INPUT_OUTPUT) && (!rem_mitm || conn->io_capability == HCI_IO_NO_INPUT_OUTPUT)) { - /* If we're not the initiators request authorization to - * proceed from user space (mgmt_user_confirm with - * confirm_hint set to 1). The exception is if neither - * side had MITM or if the local IO capability is - * NoInputNoOutput, in which case we do auto-accept + /* If we're not the initiator of request authorization and the + * local IO capability is not NoInputNoOutput, use JUST_WORKS + * method (mgmt_user_confirm with confirm_hint set to 1). */ if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && - conn->io_capability != HCI_IO_NO_INPUT_OUTPUT && - (loc_mitm || rem_mitm)) { + conn->io_capability != HCI_IO_NO_INPUT_OUTPUT) { BT_DBG("Confirming auto-accept as acceptor"); confirm_hint = 1; goto confirm;