public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+6cf5652d3df49fae2e3f@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] Re: KASAN: use-after-free Read in netdev_unregister_kobject
Date: Thu, 24 Oct 2024 07:13:20 -0700	[thread overview]
Message-ID: <671a5600.050a0220.10f4f4.01f0.GAE@google.com> (raw)
In-Reply-To: <000000000000afab690616b12f99@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: Re: KASAN: use-after-free Read in netdev_unregister_kobject
Author: dmantipov@yandex.ru

#syz test git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next fb4560832d4c91d73680538d6659ac2c024ec9d5

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 629c302f7407..aaa7849c74f4 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2716,7 +2716,6 @@ void hci_unregister_dev(struct hci_dev *hdev)
  		rfkill_destroy(hdev->rfkill);
  	}

-	device_del(&hdev->dev);
  	/* Actual cleanup is deferred until hci_release_dev(). */
  	hci_dev_put(hdev);
  }
@@ -2756,6 +2755,8 @@ void hci_release_dev(struct hci_dev *hdev)
  	kfree_skb(hdev->sent_cmd);
  	kfree_skb(hdev->req_skb);
  	kfree_skb(hdev->recv_event);
+
+	device_del(&hdev->dev);
  	kfree(hdev);
  }
  EXPORT_SYMBOL(hci_release_dev);


  parent reply	other threads:[~2024-10-24 14:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 15:35 [syzbot] [pm?] KASAN: use-after-free Read in netdev_unregister_kobject syzbot
2024-04-22 23:16 ` Hillf Danton
2024-04-23  3:12   ` syzbot
2024-04-23 10:42 ` Hillf Danton
2024-04-23 13:25   ` syzbot
2024-04-23 21:31 ` Hillf Danton
2024-04-23 22:06   ` syzbot
2024-10-24 14:13 ` syzbot [this message]
2024-10-24 14:14 ` [syzbot] " syzbot
2024-11-01 11:57 ` syzbot
2024-11-01 11:59 ` syzbot
2024-11-01 15:01 ` [syzbot] Re: [PATCH v2] Bluetooth: fix use-after-free in device_for_each_child() syzbot
2024-11-01 19:30 ` 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=671a5600.050a0220.10f4f4.01f0.GAE@google.com \
    --to=syzbot+6cf5652d3df49fae2e3f@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --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