From: "Mazin Alhaddad" <mazin@getstate.dev>
To: "syzbot" <syzbot+479aff51bb361ef5aa18@syzkaller.appspotmail.com>,
<linux-kernel@vger.kernel.org>, <syzkaller-bugs@googlegroups.com>
Subject: Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in mgmt_remove_adv_monitor_sync
Date: Thu, 05 Dec 2024 18:51:57 +0300 [thread overview]
Message-ID: <D63VY8C6B77L.2EEUFPWVWLWFB@getstate.dev> (raw)
In-Reply-To: <6751c15a.050a0220.b4160.01d7.GAE@google.com>
[-- Attachment #1.1: Type: text/plain, Size: 84 bytes --]
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
[-- Attachment #2: 0001-TEST.patch --]
[-- Type: text/plain, Size: 1292 bytes --]
From fe103377fd3b4388dac32a1ccc93caa3762f6f8c Mon Sep 17 00:00:00 2001
From: Mazin AlHaddad <mazin@getstate.dev>
Date: Thu, 5 Dec 2024 16:00:03 +0300
Subject: [PATCH] TEST
---
net/bluetooth/hci_core.c | 2 ++
net/bluetooth/hci_sync.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index f9e19f9cb..6ba2b9501 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -478,6 +478,8 @@ int hci_dev_do_close(struct hci_dev *hdev)
BT_DBG("%s %p", hdev->name, hdev);
+ hci_cmd_sync_clear(hdev);
+
hci_req_sync_lock(hdev);
err = hci_dev_close_sync(hdev);
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index c86f4e42e..aa5aa3fed 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5197,6 +5197,9 @@ int hci_dev_close_sync(struct hci_dev *hdev)
*/
drain_workqueue(hdev->workqueue);
+ /* flush cmd work */
+ flush_work(&hdev->cmd_work);
+
hci_dev_lock(hdev);
hci_discovery_set_state(hdev, DISCOVERY_STOPPED);
@@ -5234,8 +5237,6 @@ int hci_dev_close_sync(struct hci_dev *hdev)
clear_bit(HCI_INIT, &hdev->flags);
}
- /* flush cmd work */
- flush_work(&hdev->cmd_work);
/* Drop queues */
skb_queue_purge(&hdev->rx_q);
--
2.46.0
next prev parent reply other threads:[~2024-12-05 15:52 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <D63E89JWB8QV.38E70BVWNMMVL@getstate.dev>
2024-12-05 2:24 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in mgmt_remove_adv_monitor_sync syzbot
2024-12-05 2:43 ` Mazin Alhaddad
2024-12-05 3:06 ` syzbot
2024-12-05 8:36 ` [PATCH] [PATCH] TEST Pei Xiao
2024-12-05 8:50 ` Aleksandr Nogikh
2024-12-05 9:47 ` Pei Xiao
2024-12-05 11:38 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in mgmt_remove_adv_monitor_sync Mazin Alhaddad
2024-12-05 12:04 ` syzbot
2024-12-05 12:18 ` Mazin Alhaddad
2024-12-05 12:39 ` syzbot
2024-12-05 12:20 ` Mazin Alhaddad
2024-12-05 12:48 ` syzbot
2024-12-05 13:01 ` Mazin Alhaddad
2024-12-05 13:44 ` syzbot
2024-12-05 13:51 ` Mazin Alhaddad
2024-12-05 14:10 ` syzbot
2024-12-05 14:26 ` Mazin Alhaddad
2024-12-05 15:06 ` syzbot
2024-12-05 15:51 ` Mazin Alhaddad [this message]
2024-12-05 16:42 ` syzbot
2024-12-08 15:56 ` Mazin Alhaddad
2024-12-08 16:41 ` syzbot
2024-12-08 18:24 ` Mazin Alhaddad
2024-12-08 18:47 ` syzbot
2024-12-08 19:12 ` Mazin Alhaddad
2024-12-08 21:42 ` syzbot
2024-12-08 21:44 ` Mazin Alhaddad
2024-12-08 22:06 ` syzbot
[not found] <D6JFGS83KL11.2PX1Q2EA60PMZ@getstate.dev>
2024-12-23 22:43 ` syzbot
2024-12-05 9:45 [patch] test Pei Xiao
2024-12-05 9:55 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in mgmt_remove_adv_monitor_sync syzbot
-- strict thread matches above, loose matches on Subject: below --
2024-12-05 9:30 [PATCH] test Pei Xiao
2024-12-05 9:38 ` [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in mgmt_remove_adv_monitor_sync syzbot
[not found] <de7743c9-1fd1-4dc3-9ed4-31c32a9118eb@kylinos.cn>
2024-12-05 9:13 ` syzbot
2024-07-24 8:59 syzbot
2024-11-28 6:53 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D63VY8C6B77L.2EEUFPWVWLWFB@getstate.dev \
--to=mazin@getstate.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+479aff51bb361ef5aa18@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.