From: syzbot <syzbot+6cf5652d3df49fae2e3f@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] Re: [PATCH v2] Bluetooth: fix use-after-free in device_for_each_child()
Date: Fri, 01 Nov 2024 12:30:37 -0700 [thread overview]
Message-ID: <67252c5d.050a0220.35b515.0176.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: [PATCH v2] Bluetooth: fix use-after-free in device_for_each_child()
Author: luiz.dentz@gmail.com
On Fri, Nov 1, 2024 at 1:37 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Dmitry,
>
> On Fri, Nov 1, 2024 at 11:31 AM Luiz Augusto von Dentz
> <luiz.dentz@gmail.com> wrote:
> >
> > Hi Dmitry,
> >
> > On Fri, Nov 1, 2024 at 11:17 AM Dmitry Antipov <dmantipov@yandex.ru> wrote:
> > >
> > > On 11/1/24 6:12 PM, Luiz Augusto von Dentz wrote:
> > >
> > > > There is no Tested-by thus why I assumed it wasn't tested by syzbot yet.
> > >
> > > Ugh. Until today I've assumed that Tested-by: is applicable to human-driven
> > > testing only :-).
> >
> > Nope, in fact it is very handy to have syzbot test your changes since
> > it may hit other problems as well.
>
> Looks like this doesn't solve the problem, in fact I think you are
> getting it backwards, you are trying to reparent the parent dev not
> the child and I assume by destroying the parent device there should be
> some way to reset the parent which seems to be the intent the
> following code in hci_conn_del_sysfs:
>
> while (1) {
> struct device *dev;
>
> dev = device_find_child(&conn->dev, NULL, __match_tty);
> if (!dev)
> break;
> device_move(dev, NULL, DPM_ORDER_DEV_LAST);
> put_device(dev);
> }
>
> But note that it only does that after matching tty, but I guess we
> want to do it regardless otherwise we may have the child objects still
> access it, that said we should probably use device_for_each_child
> though if that is safe to do calls to device_move under its callback.
#syz test
> > > Dmitry
> > >
> >
> >
> > --
> > Luiz Augusto von Dentz
>
>
>
> --
> Luiz Augusto von Dentz
--
Luiz Augusto von Dentz
prev parent reply other threads:[~2024-11-01 19:30 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] " syzbot
2024-10-24 14:14 ` 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 [this message]
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=67252c5d.050a0220.35b515.0176.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