From: Edward Adam Davis <eadavis@qq.com>
To: syzbot+35ebc808442df6420eae@syzkaller.appspotmail.com
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bluetooth?] KASAN: invalid-free in hci_req_sync_complete
Date: Sun, 23 Jun 2024 11:42:30 +0800 [thread overview]
Message-ID: <tencent_C4F16D10941CEB5AED86CD707A4E6F502F0A@qq.com> (raw)
In-Reply-To: <00000000000033a6e8061b3c6d4a@google.com>
please test db free in hci_req_sync_complete
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2ccbdf43d5e7
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index efea25eb56ce..c98d573eae87 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -106,7 +106,13 @@ void hci_req_sync_complete(struct hci_dev *hdev, u8 result, u16 opcode,
hdev->req_result = result;
hdev->req_status = HCI_REQ_DONE;
if (skb) {
- kfree_skb(hdev->req_skb);
+ if (!hdev->req_skb)
+ printk("skb: %p, fclone: %d %s\n", skb, skb->fclone, __func__);
+
+ if (hdev->req_skb && hdev->req_skb->fclone == SKB_FCLONE_CLONE) {
+ printk("skb: %p, skb fc: %d, rskb: %p, rskb fc: %d, %s\n", skb, skb->fclone, hdev->req_skb, hdev->req_skb->fclone, __func__);
+ kfree_skb(hdev->req_skb);
+ }
hdev->req_skb = skb_get(skb);
}
wake_up_interruptible(&hdev->req_wait_q);
next prev parent reply other threads:[~2024-06-23 3:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 6:47 syzbot
2024-06-19 11:23 ` syzbot
2024-06-19 12:32 ` Edward Adam Davis
2024-06-19 12:58 ` syzbot
2024-06-23 2:36 ` Edward Adam Davis
2024-06-23 3:08 ` syzbot
2024-06-23 3:42 ` Edward Adam Davis [this message]
2024-06-23 4:06 ` syzbot
2024-06-23 4:14 ` Edward Adam Davis
2024-06-23 4:40 ` syzbot
2024-06-23 5:43 ` Hillf Danton
2024-06-23 6:08 ` syzbot
2024-06-23 9:06 ` [PATCH] Bluetooth: fix double free " Edward Adam Davis
2024-06-24 10:40 ` [syzbot] [bluetooth?] KASAN: invalid-free " Hillf Danton
2024-06-24 11:03 ` syzbot
2024-06-24 12:07 ` Edward Adam Davis
2024-06-24 12:36 ` 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=tencent_C4F16D10941CEB5AED86CD707A4E6F502F0A@qq.com \
--to=eadavis@qq.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+35ebc808442df6420eae@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
all inboxes | Powered by JetHome®