syzbot


WARNING in kfree

Status: fixed on 2019/10/15 23:40
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+5aca688dac0796c56129@syzkaller.appspotmail.com
Fix commit: 43ce4c1feadb vfs: Add a single-or-reconfig keying to vfs_get_super()
First crash: 1930d, last: 1930d
Cause bisection: introduced by (bisect log) :
commit 3deadeebafcec6a0a7c9397bd32ea5ac6d5191c1
Author: David Howells <dhowells@redhat.com>
Date: Mon Jan 21 14:04:22 2019 +0000

  vfs: Convert debugfs to use the new mount API

Crash: BUG: sleeping function called from invalid context in __do_page_fault (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH vfs/for-next] vfs: fix vfs_get_single_reconf_super error handling 2 (2) 2019/09/06 03:01
WARNING in kfree 0 (2) 2019/09/01 14:06
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in kfree (2) net syz done done 1 1737d 1736d 15/28 fixed on 2020/06/28 13:52

Sample crash report:
------------[ cut here ]------------
virt_to_cache: Object is not a Slab page!
WARNING: CPU: 0 PID: 8815 at mm/slab.h:473 virt_to_cache mm/slab.h:473 [inline]
WARNING: CPU: 0 PID: 8815 at mm/slab.h:473 kfree+0x1d3/0x2c0 mm/slab.c:3748
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 8815 Comm: syz-executor970 Not tainted 5.3.0-rc6-next-20190827 #74
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x172/0x1f0 lib/dump_stack.c:113
 panic+0x2dc/0x755 kernel/panic.c:220
 __warn.cold+0x2f/0x3c kernel/panic.c:581
 report_bug+0x289/0x300 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:179 [inline]
 fixup_bug arch/x86/kernel/traps.c:174 [inline]
 do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:272
 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:291
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1028
RIP: 0010:virt_to_cache mm/slab.h:473 [inline]
RIP: 0010:kfree+0x1d3/0x2c0 mm/slab.c:3748
Code: 53 ff e9 67 fe ff ff 80 3d 5d e4 14 08 00 75 1c 48 c7 c6 a0 6c b5 87 48 c7 c7 d0 be a7 88 c6 05 46 e4 14 08 01 e8 d5 b8 96 ff <0f> 0b f6 c7 02 75 6d 48 83 3d 2e 23 46 07 00 0f 85 4b ff ff ff 0f
RSP: 0018:ffff888089e978e8 EFLAGS: 00010082
RAX: 0000000000000000 RBX: 0000000000000282 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815bd606 RDI: ffffed10113d2f0f
RBP: ffff888089e97908 R08: ffff8880a03e0680 R09: ffffed1015d04109
R10: ffffed1015d04108 R11: ffff8880ae820847 R12: ffffffff81756100
R13: ffffffff829d0110 R14: ffff8880aa0bae80 R15: ffff88821b827170
 debugfs_release_dentry+0x60/0x80 fs/debugfs/inode.c:194
 __dentry_kill+0x3f7/0x600 fs/dcache.c:584
 shrink_dentry_list+0x152/0x4a0 fs/dcache.c:1120
 shrink_dcache_parent+0x23d/0x400 fs/dcache.c:1547
 do_one_tree+0x16/0x40 fs/dcache.c:1601
 shrink_dcache_for_umount+0x72/0x170 fs/dcache.c:1618
 generic_shutdown_super+0x6d/0x370 fs/super.c:445
 kill_anon_super+0x3e/0x60 fs/super.c:1104
 kill_litter_super+0x50/0x60 fs/super.c:1113
 deactivate_locked_super+0x95/0x100 fs/super.c:333
 deactivate_super fs/super.c:364 [inline]
 deactivate_super+0x1b2/0x1d0 fs/super.c:360
 put_fs_context+0xae/0x5b0 fs/fs_context.c:499
 fscontext_release+0x51/0x70 fs/fsopen.c:73
 __fput+0x2ff/0x890 fs/file_table.c:280
 ____fput+0x16/0x20 fs/file_table.c:313
 task_work_run+0x145/0x1c0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x904/0x2e60 kernel/exit.c:879
 do_group_exit+0x135/0x360 kernel/exit.c:983
 __do_sys_exit_group kernel/exit.c:994 [inline]
 __se_sys_exit_group kernel/exit.c:992 [inline]
 __x64_sys_exit_group+0x44/0x50 kernel/exit.c:992
 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43fde8
Code: Bad RIP value.
RSP: 002b:00007ffd9fbe5158 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043fde8
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004bf670 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d1180 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/08/29 16:50 linux-next ed2393ca0910 fd37b39e .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/29 16:11 linux-next ed2393ca0910 fd37b39e .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.