commit:     f92ea749b92c8f4890b69030efc4d0e732082d05
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 14 13:26:28 2024 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Thu Nov 14 13:26:28 2024 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=f92ea749

Bluetooth: hci_core: Fix calling mgmt_device_connected

Bug: https://bugs.gentoo.org/942925

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 0000_README                                    |  4 +++
 2400_bluetooth-mgmt-device-connected-fix.patch | 34 ++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/0000_README b/0000_README
index 49804b3a..ea33a378 100644
--- a/0000_README
+++ b/0000_README
@@ -307,6 +307,10 @@ Patch:  
2011_netfilter-nf-tables-allow-clone-callbacks-to-sleep.patch
 From:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
 Desc:   netfilter: nf_tables: allow clone callbacks to sleep
 
+Patch:  2400_bluetooth-mgmt-device-connected-fix.patch
+From:   
https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
+Desc:   Bluetooth: hci_core: Fix calling mgmt_device_connected
+
 Patch:  2600_HID-revert-Y900P-fix-ThinkPad-L15-touchpad.patch
 From:   https://bugs.gentoo.org/942797
 Desc:   Revert: HID: multitouch: Add support for lenovo Y9000P Touchpad

diff --git a/2400_bluetooth-mgmt-device-connected-fix.patch 
b/2400_bluetooth-mgmt-device-connected-fix.patch
new file mode 100644
index 00000000..86cf10e9
--- /dev/null
+++ b/2400_bluetooth-mgmt-device-connected-fix.patch
@@ -0,0 +1,34 @@
+From 48adce305dc6d6c444fd00e40ad07d4a41acdfbf Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <[email protected]>
+Date: Fri, 8 Nov 2024 11:19:54 -0500
+Subject: Bluetooth: hci_core: Fix calling mgmt_device_connected
+
+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 <[email protected]>
+---
+ 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, NULL, 0);
+       hci_dev_unlock(hdev);
+ 
+       if (conn) {
+-- 
+cgit 1.2.3-korg
+

Reply via email to