From patchwork Mon Jan 13 07:31:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "d.privalov" X-Patchwork-Id: 13936816 X-Patchwork-Delegate: kuba@kernel.org Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3B92233159; Mon, 13 Jan 2025 07:31:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.154.21.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736753477; cv=none; b=OaIKTjWsZzc7BSAYixKvkl6CmvYLVbMx+9zJQHjDfiLpFz+OtvFBOblQI8v77OnBo+KdPQQYab3zZ1Ma3sKbK4X927Ig5Tyl5Ipl1OLctrsp+1JovKONP08/7LuoN+oR91EevdFHtitqk3Kn85IoKvXD3WNGjQ16BjnJupOS78E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736753477; c=relaxed/simple; bh=KJwKmwzr8Nr0Q+7RoTpPudrZ2dBk7d3ZB7mPHkxavaM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oTVZq9B69dS68k3jAccdL3ZHT9HC7idumrvvC1odL6UbLQJqNucu1RtHHhXT1LgQmMA58mLc7JvPPtvc5i4o0IV6nYQ0ksJ5CeBTL77ntTZx8W+Sr5dttVHh0PUTaPaepmKuBJUd4HyBk0SllBziNUgMX75bycYIC4TPUDZOM9g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=omp.ru; spf=pass smtp.mailfrom=omp.ru; arc=none smtp.client-ip=90.154.21.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=omp.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=omp.ru Received: from localhost.localdomain (188.234.32.57) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Mon, 13 Jan 2025 10:31:04 +0300 From: d.privalov To: Marcel Holtmann CC: Johan Hedberg , "David S. Miller" , Jakub Kicinski , Luiz Augusto von Dentz , , , , , , Dmitriy Privalov Subject: [PATCH 5.10 2/2] Bluetooth: hci_core: Fix calling mgmt_device_connected Date: Mon, 13 Jan 2025 10:31:00 +0300 Message-ID: <20250113073100.34744-2-d.privalov@omp.ru> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250113073100.34744-1-d.privalov@omp.ru> References: <20241226093539.44806-1-d.privalov@omp.ru> <20250113073100.34744-1-d.privalov@omp.ru> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 6.1.1, Database issued on: 01/13/2025 06:54:52 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 19 X-KSE-AntiSpam-Info: Lua profiles 190284 [Jan 13 2025] X-KSE-AntiSpam-Info: Version: 6.1.1.7 X-KSE-AntiSpam-Info: Envelope from: d.privalov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 49 0.3.49 28b3b64a43732373258a371bd1554adb2caa23cb X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_phishing_log_reg_60_70} X-KSE-AntiSpam-Info: {Tracking_uf_ne_domains} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {Tracking_repetitive_subdir_in_url} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 188.234.32.57 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: {Found in DNSBL: 188.234.32.57 in (user) dbl.spamhaus.org} X-KSE-AntiSpam-Info: bugzilla.kernel.org:7.1.1;127.0.0.199:7.1.2;github.com:7.1.1;omp.ru:7.1.1;188.234.32.57:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1 X-KSE-AntiSpam-Info: FromAlignment: s X-KSE-AntiSpam-Info: ApMailHostAddress: 188.234.32.57 X-KSE-AntiSpam-Info: {DNS response errors} X-KSE-AntiSpam-Info: Rate: 19 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=temperror header.from=omp.ru;spf=temperror smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 01/13/2025 06:56:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 1/13/2025 3:31:00 AM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Patchwork-Delegate: kuba@kernel.org From: Luiz Augusto von Dentz commit 55abbd148dfb604ebf3f72d6c3dd2a8063d40718 upstream. Since 61a939c68ee0 ("Bluetooth: Queue incoming ACL data until BT_CONNECTED state is reached") there is no long the need to call mgmt_device_connected as ACL data will be queued until BT_CONNECTED state. Link: https://bugzilla.kernel.org/show_bug.cgi?id=219458 Link: https://github.com/bluez/bluez/issues/1014 Fixes: 333b4fd11e89 ("Bluetooth: L2CAP: Fix uaf in l2cap_connect") Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Dmitriy Privalov --- net/bluetooth/hci_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index f6cff34a85421c..f9e19f9cb5a386 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -3792,8 +3792,6 @@ static void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb) hci_dev_lock(hdev); conn = hci_conn_hash_lookup_handle(hdev, handle); - if (conn && hci_dev_test_flag(hdev, HCI_MGMT)) - mgmt_device_connected(hdev, conn, 0, NULL, 0); hci_dev_unlock(hdev); if (conn) {