[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zv6qDfzdXMrSjGkE@fedora>
Date: Thu, 3 Oct 2024 22:28:29 +0800
From: Qianqiang Liu <qianqiang.liu@....com>
To: syzbot <syzbot+03d6270b6425df1605bf@...kaller.appspotmail.com>
Cc: johan.hedberg@...il.com, linux-bluetooth@...r.kernel.org,
linux-kernel@...r.kernel.org, luiz.dentz@...il.com,
marcel@...tmann.org, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in
set_powered_sync
#syz test
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 5533e6f561b3..259b18eb0b20 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5187,8 +5187,11 @@ int hci_dev_close_sync(struct hci_dev *hdev)
auto_off = hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF);
if (!auto_off && !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
- hci_dev_test_flag(hdev, HCI_MGMT))
+ hci_dev_test_flag(hdev, HCI_MGMT)) {
+ hci_req_sync_lock(hdev);
__mgmt_power_off(hdev);
+ hci_req_sync_unlock(hdev);
+ }
hci_inquiry_cache_flush(hdev);
hci_pend_le_actions_clear(hdev);
--
Best,
Qianqiang Liu
Powered by blists - more mailing lists