syzbot


WARNING in sysfs_remove_group

Status: fixed on 2019/12/02 18:02
Reported-by: syzbot+b444ba3a5b2e55989f54@syzkaller.appspotmail.com
Fix commit: 5432923a6b20 driver core: Fix use-after-free and double free on glue directory
First crash: 1744d, last: 1744d
Fix bisection: fixed by (bisect log) :
commit 5432923a6b208b253d95d95cee72d0508c803421
Author: Muchun Song <smuchun@gmail.com>
Date: Sat Jul 27 03:21:22 2019 +0000

  driver core: Fix use-after-free and double free on glue directory

  
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in sysfs_remove_group fs C 11125 2118d 2372d 8/26 fixed on 2018/07/09 18:05
upstream WARNING in sysfs_remove_group (2) fs C 1725 1676d 2043d 0/26 closed as dup on 2018/11/25 13:06
linux-4.19 WARNING in sysfs_remove_group 1 1686d 1686d 0/1 auto-closed as invalid on 2020/01/10 17:21

Sample crash report:
kobject_add_internal failed for hci0 (error: -2 parent: bluetooth)
Bluetooth: Can't register HCI device
sysfs group 'power' not found for kobject 'rfkill724'
------------[ cut here ]------------
kobject: 'rfkill730' (ffff88808f0bb6a8): kobject_uevent_env
WARNING: CPU: 1 PID: 7872 at fs/sysfs/group.c:235 sysfs_remove_group fs/sysfs/group.c:235 [inline]
WARNING: CPU: 1 PID: 7872 at fs/sysfs/group.c:235 sysfs_remove_group.cold+0x4f/0x69 fs/sysfs/group.c:226
Kernel panic - not syncing: panic_on_warn set ...

CPU: 1 PID: 7872 Comm: syz-executor649 Not tainted 4.14.133 #28
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x138/0x19c lib/dump_stack.c:53
 panic+0x1f2/0x426 kernel/panic.c:182
kobject: 'hci2' (ffff88808e4ce428): kobject_add_internal: parent: 'bluetooth', set: 'devices'
 __warn.cold+0x2f/0x36 kernel/panic.c:546
 report_bug+0x216/0x254 lib/bug.c:186
kobject: 'hci3' (ffff88808f772468): kobject_add_internal: parent: 'bluetooth', set: 'devices'
 fixup_bug arch/x86/kernel/traps.c:177 [inline]
 fixup_bug arch/x86/kernel/traps.c:172 [inline]
 do_error_trap+0x1bb/0x310 arch/x86/kernel/traps.c:295
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314
 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:960
RIP: 0010:sysfs_remove_group fs/sysfs/group.c:235 [inline]
RIP: 0010:sysfs_remove_group.cold+0x4f/0x69 fs/sysfs/group.c:226
kobject: 'rfkill730' (ffff88808f0bb6a8): fill_kobj_path: path = '/devices/virtual/bluetooth/hci0/rfkill730'
RSP: 0018:ffff888098077af8 EFLAGS: 00010286
RAX: 0000000000000035 RBX: ffffffff86b64ac0 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffed101300ef55
RBP: ffff888098077b18 R08: 0000000000000035 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880a71f55c0
R13: ffff88808dd8ed28 R14: ffffffff86b650a0 R15: ffffffff845dbb80
kobject: 'rfkill730' (ffff88808f0bb6a8): kobject_cleanup, parent           (null)
 dpm_sysfs_remove+0x58/0x60 drivers/base/power/sysfs.c:769
 device_del+0xfc/0xaa0 drivers/base/core.c:1984
 rfkill_unregister+0xd1/0x2c0 net/rfkill/core.c:1077
kobject: 'rfkill730' (ffff88808f0bb6a8): calling ktype release
 hci_unregister_dev+0x259/0x7d0 net/bluetooth/hci_core.c:3208
 vhci_release+0x76/0xf0 drivers/bluetooth/hci_vhci.c:354
 __fput+0x275/0x7a0 fs/file_table.c:210
 ____fput+0x16/0x20 fs/file_table.c:244
kobject: 'hci2' (ffff88808e4ce428): kobject_uevent_env
 task_work_run+0x114/0x190 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x7df/0x2c10 kernel/exit.c:874
 do_group_exit+0x111/0x330 kernel/exit.c:977
kobject: 'hci2' (ffff88808e4ce428): fill_kobj_path: path = '/devices/virtual/bluetooth/hci2'
 SYSC_exit_group kernel/exit.c:988 [inline]
 SyS_exit_group+0x1d/0x20 kernel/exit.c:986
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x43fee8
RSP: 002b:00007ffd55e78ad8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043fee8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004bf710 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d1180 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/07/16 22:26 linux-4.14.y aea8526edf59 4ec4ea48 .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.