Re: [syzbot] general protection fault in __device_attach
From: Andy Shevchenko
Date: Fri Jun 03 2022 - 07:04:21 EST
On Fri, Jun 03, 2022 at 03:02:07AM -0700, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit a9c4cf299f5f79d5016c8a9646fa1fc49381a8c1
> Author: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Date: Fri Jun 18 13:41:27 2021 +0000
>
> ACPI: sysfs: Use __ATTR_RO() and __ATTR_RW() macros
Hmm... It's not obvious at all how this change can alter the behaviour so
drastically. device_add() is called from USB core with intf->dev.name == NULL
by some reason. A-ha, seems like fault injector, which looks like
dev_set_name(&intf->dev, "%d-%s:%d.%d", dev->bus->busnum,
dev->devpath, configuration, ifnum);
missed the return code check.
But I'm not familiar with that code at all, adding Linux USB ML and Alan.
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1040b80df00000
> start commit: d1dc87763f40 assoc_array: Fix BUG_ON during garbage collect
> git tree: upstream
> final oops: https://syzkaller.appspot.com/x/report.txt?x=1240b80df00000
> console output: https://syzkaller.appspot.com/x/log.txt?x=1440b80df00000
> kernel config: https://syzkaller.appspot.com/x/.config?x=c51cd24814bb5665
> dashboard link: https://syzkaller.appspot.com/bug?extid=dd3c97de244683533381
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15613e2bf00000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15c90adbf00000
>
> Reported-by: syzbot+dd3c97de244683533381@xxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: a9c4cf299f5f ("ACPI: sysfs: Use __ATTR_RO() and __ATTR_RW() macros")
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
--
With Best Regards,
Andy Shevchenko