public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Qianqiang Liu <qianqiang.liu@163.com>
To: syzbot <syzbot+03d6270b6425df1605bf@syzkaller.appspotmail.com>
Cc: johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org,
	linux-kernel@vger.kernel.org, luiz.dentz@gmail.com,
	marcel@holtmann.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in set_powered_sync
Date: Thu, 3 Oct 2024 23:41:25 +0800	[thread overview]
Message-ID: <Zv67JUPfzgQp7Kgf@fedora> (raw)
In-Reply-To: <66feadf0.050a0220.9ec68.0042.GAE@google.com>

#syz test

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 5533e6f561b3..353fa423c36c 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -321,7 +321,7 @@ static void hci_cmd_sync_work(struct work_struct *work)
 
 		bt_dev_dbg(hdev, "entry %p", entry);
 
-		if (entry->func) {
+		if (entry->func && entry->data) {
 			int err;
 
 			hci_req_sync_lock(hdev);
diff --git a/net/bluetooth/mgmt_util.c b/net/bluetooth/mgmt_util.c
index 0115f783bde8..eccc51bfaf2e 100644
--- a/net/bluetooth/mgmt_util.c
+++ b/net/bluetooth/mgmt_util.c
@@ -307,6 +307,7 @@ void mgmt_pending_free(struct mgmt_pending_cmd *cmd)
 	sock_put(cmd->sk);
 	kfree(cmd->param);
 	kfree(cmd);
+	cmd = NULL;
 }
 
 void mgmt_pending_remove(struct mgmt_pending_cmd *cmd)

-- 
Best,
Qianqiang Liu


  reply	other threads:[~2024-10-03 15:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-15  9:36 [syzbot] [bluetooth?] KASAN: slab-use-after-free Read in set_powered_sync syzbot
2024-09-08  9:07 ` syzbot
2024-11-16  0:56   ` Hillf Danton
2024-11-16  1:23     ` syzbot
2024-11-16  3:00   ` Hillf Danton
2024-11-16  3:28     ` syzbot
2024-09-08 16:43 ` syzbot
2024-10-03 14:28 ` Qianqiang Liu
2024-10-03 14:45   ` syzbot
2024-10-03 15:41     ` Qianqiang Liu [this message]
2024-10-03 16:22       ` syzbot
2024-10-03 16:45         ` Qianqiang Liu
2024-10-03 16:54           ` Luiz Augusto von Dentz
2024-10-03 17:15             ` Qianqiang Liu
2024-10-04 20:50               ` Luiz Augusto von Dentz
2024-10-04 20:54                 ` syzbot
2024-10-03 17:13           ` syzbot
2024-10-04 13:56 ` [syzbot] " syzbot
2024-11-15 16:42 ` [syzbot] Re: [PATCH v1] Bluetooth: MGMT: Fix " syzbot
2024-11-15 18:41 ` syzbot
2024-11-18 16:04 ` [syzbot] Re: [PATCH v3] " syzbot
2024-11-18 17:00 ` syzbot
2024-11-18 20:50 ` [syzbot] Re: [PATCH v5] " syzbot
     [not found] <20241004135647.691343-1-dmantipov@yandex.ru>
2024-10-04 15:02 ` [syzbot] [bluetooth?] KASAN: " syzbot
     [not found] <CABBYNZLatZOTP3B68PPdm0E7y-t4qAzCDmaB8vxKZu-o3ncmgQ@mail.gmail.com>
2024-11-15 23:32 ` syzbot
     [not found] <CABBYNZJU6ctSeqC5f+EPqo6UJoVKwtjc_EWZa=-CEJNAi28Upw@mail.gmail.com>
2024-11-15 23:57 ` syzbot
     [not found] <CABBYNZ+jcHzVhzLXeU9GYJuFO-PgT=vfYq1+RrGkgyRA9AeU1A@mail.gmail.com>
2024-11-18 16:31 ` syzbot
     [not found] <CABBYNZKUmL=xekhLMfF9vza3agxtAX5qh1NTJVuRD9R9hwHmQg@mail.gmail.com>
2024-11-18 17:26 ` syzbot
     [not found] <CABBYNZ+=qNj8=Osdzxx2n0Yt0H0AjKtOAx__QkZw_Gk3a1ygbw@mail.gmail.com>
2024-11-18 21:16 ` 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=Zv67JUPfzgQp7Kgf@fedora \
    --to=qianqiang.liu@163.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=syzbot+03d6270b6425df1605bf@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox