syzbot


BUG: corrupted list in dquot_disable

Status: fixed on 2021/01/09 09:31
Reported-by: syzbot+a32b97fee7676905ca03@syzkaller.appspotmail.com
Fix commit: a9c625fcddc0 quota: Sanity-check quota file headers on load
First crash: 1234d, last: 1234d
Fix bisection: fixed by (bisect log) :
commit a9c625fcddc078624e1e7a673443b29c71be3431
Author: Jan Kara <jack@suse.cz>
Date: Mon Nov 2 15:16:29 2020 +0000

  quota: Sanity-check quota file headers on load

  

Sample crash report:
EXT4-fs error (device loop0): ext4_mb_generate_buddy:754: group 0, block bitmap and bg descriptor inconsistent: 32768 vs 25 free clusters
Quota error (device loop0): write_blk: dquota write failed
Quota error (device loop0): qtree_write_dquot: Error -28 occurred while creating quota
list_del corruption. prev->next should be ffff88808dfc4e20, but was ffffffff8903d2e0
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:51!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 7991 Comm: syz-executor330 Not tainted 4.14.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff8880b335e540 task.stack: ffff8880b2978000
RIP: 0010:__list_del_entry_valid.cold+0xf/0x55 lib/list_debug.c:51
RSP: 0018:ffff8880b297fb30 EFLAGS: 00010282
RAX: 0000000000000054 RBX: ffff88808dfc4c40 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff878bbac0 RDI: ffffed101652ff5c
RBP: ffff88808dfc4e20 R08: 0000000000000054 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff8995316f
R13: ffff88808dfc4c60 R14: ffff88808dfc4e20 R15: dffffc0000000000
FS:  0000000002628880(0000) GS:ffff8880ba400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000026318b8 CR3: 0000000098fdb000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __list_del_entry include/linux/list.h:117 [inline]
 list_del_init include/linux/list.h:159 [inline]
 remove_free_dquot fs/quota/dquot.c:307 [inline]
 invalidate_dquots fs/quota/dquot.c:566 [inline]
 dquot_disable+0xd72/0x1810 fs/quota/dquot.c:2217
 ext4_quota_off+0xd8/0x3a0 fs/ext4/super.c:5780
 ext4_quota_off_umount fs/ext4/super.c:880 [inline]
 ext4_put_super+0x86/0xf00 fs/ext4/super.c:910
 generic_shutdown_super+0x144/0x370 fs/super.c:446
 kill_block_super+0x95/0xe0 fs/super.c:1161
 deactivate_locked_super+0x6c/0xd0 fs/super.c:319
 deactivate_super+0x7f/0xa0 fs/super.c:350
 cleanup_mnt+0x186/0x2c0 fs/namespace.c:1183
 task_work_run+0x11f/0x190 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:191 [inline]
 exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
 do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x4481f7
RSP: 002b:00007ffdd042bca8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007ffdd042ce20 RCX: 00000000004481f7
RDX: 0000000000400bb0 RSI: 0000000000000002 RDI: 00007ffdd042bd50
RBP: 0000000000009595 R08: 0000000000000000 R09: 0000000000000009
R10: 0000000000000005 R11: 0000000000000202 R12: 00007ffdd042cdc0
R13: 0000000002629880 R14: 0000000000000000 R15: 0000000000000000
Code: 87 e8 9c f8 23 fe 0f 0b 48 89 f1 48 c7 c7 e0 d1 cc 87 4c 89 e6 e8 88 f8 23 fe 0f 0b 48 89 ee 48 c7 c7 80 d3 cc 87 e8 77 f8 23 fe <0f> 0b 4c 89 ea 48 89 ee 48 c7 c7 c0 d2 cc 87 e8 63 f8 23 fe 0f 
RIP: __list_del_entry_valid.cold+0xf/0x55 lib/list_debug.c:51 RSP: ffff8880b297fb30
---[ end trace 3584cc6ac8feaf23 ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/09 02:00 linux-4.14.y 47cbf4cc32db 40cc414d .config console log report syz C ci2-linux-4-14
* Struck through repros no longer work on HEAD.