syzbot


kernel BUG at fs/reiserfs/prints.c:LINE!

Status: fixed on 2021/03/10 01:48
Reported-by: syzbot+1541a3226994c0781b29@syzkaller.appspotmail.com
Fix commit: d24396c5290b reiserfs: add check for an invalid ih_entry_count
First crash: 800d, last: 721d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: kernel BUG at fs/reiserfs/prints.c:LINE! (log)
Repro: C syz .config

Fix bisection: fixed by (bisect log) :
commit d24396c5290ba8ab04ba505176874c4e04a2d53c
Author: Rustam Kovhaev <rkovhaev@gmail.com>
Date: Sun Nov 1 14:09:58 2020 +0000

  reiserfs: add check for an invalid ih_entry_count

similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG at fs/reiserfs/journal.c:LINE! C done 748 1d09h 1705d 0/24 upstream: reported C repro on 2018/03/31 15:55
linux-4.14 kernel BUG at fs/reiserfs/prints.c:LINE! C done 3 717d 797d 1/1 fixed on 2021/01/12 18:45
linux-4.19 kernel BUG at fs/reiserfs/journal.c:LINE! C error 103 4d09h 801d 0/1 upstream: reported C repro on 2020/09/21 00:32
linux-4.19 kernel BUG at fs/reiserfs/prints.c:LINE! C done 5 695d 786d 1/1 fixed on 2021/02/21 17:18

Sample crash report:
REISERFS panic (device loop0): journal-2332 do_journal_end: Trying to log block 8211, which is a log block
------------[ cut here ]------------
kernel BUG at fs/reiserfs/prints.c:390!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8498 Comm: syz-executor996 Not tainted 5.10.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__reiserfs_panic.cold+0x37/0x8a fs/reiserfs/prints.c:390
Code: 5d 89 74 6d e8 11 8a c1 f8 4c 89 e9 4c 89 f2 4c 89 e6 49 c7 c0 80 30 00 8f 48 c7 c7 e0 37 5d 89 e8 0f 29 fe ff e8 f0 89 c1 f8 <0f> 0b e8 e9 89 c1 f8 4d 85 e4 49 c7 c6 20 36 5d 89 75 0a 49 c7 c6
RSP: 0018:ffffc90001607b10 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888025da6000 RCX: 0000000000000000
RDX: ffff888027f30200 RSI: ffffffff88ae80c0 RDI: fffff520002c0f54
RBP: ffffc90001607be0 R08: 000000000000006a R09: ffff8880b9e309e7
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff895d9e20
R13: ffffffff895da620 R14: ffffffff895d3620 R15: 000000000000201a
FS:  0000000001e04880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056419a1c10c8 CR3: 0000000029e01000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 do_journal_end+0x3d85/0x4950 fs/reiserfs/journal.c:4135
 reiserfs_sync_fs+0xf8/0x120 fs/reiserfs/super.c:78
 __sync_filesystem fs/sync.c:39 [inline]
 sync_filesystem fs/sync.c:64 [inline]
 sync_filesystem+0x105/0x260 fs/sync.c:48
 generic_shutdown_super+0x70/0x370 fs/super.c:448
 kill_block_super+0x97/0xf0 fs/super.c:1446
 deactivate_locked_super+0x94/0x160 fs/super.c:335
 deactivate_super+0xad/0xd0 fs/super.c:366
 cleanup_mnt+0x3a3/0x530 fs/namespace.c:1118
 task_work_run+0xdd/0x190 kernel/task_work.c:151
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:164 [inline]
 exit_to_user_mode_prepare+0x17e/0x1a0 kernel/entry/common.c:191
 syscall_exit_to_user_mode+0x38/0x260 kernel/entry/common.c:266
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x448177
Code: 00 00 00 b8 08 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 8d a2 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 6d a2 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff4aecf3d8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007fff4aed0550 RCX: 0000000000448177
RDX: 0000000000400bb0 RSI: 0000000000000002 RDI: 00007fff4aecf480
RBP: 000000000001ab61 R08: 0000000000000000 R09: 0000000000000009
R10: 0000000000000005 R11: 0000000000000202 R12: 00007fff4aed04f0
R13: 0000000001e05880 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
---[ end trace b32a201a76ecd765 ]---
RIP: 0010:__reiserfs_panic.cold+0x37/0x8a fs/reiserfs/prints.c:390
Code: 5d 89 74 6d e8 11 8a c1 f8 4c 89 e9 4c 89 f2 4c 89 e6 49 c7 c0 80 30 00 8f 48 c7 c7 e0 37 5d 89 e8 0f 29 fe ff e8 f0 89 c1 f8 <0f> 0b e8 e9 89 c1 f8 4d 85 e4 49 c7 c6 20 36 5d 89 75 0a 49 c7 c6
RSP: 0018:ffffc90001607b10 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888025da6000 RCX: 0000000000000000
RDX: ffff888027f30200 RSI: ffffffff88ae80c0 RDI: fffff520002c0f54
RBP: ffffc90001607be0 R08: 000000000000006a R09: ffff8880b9e309e7
R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff895d9e20
R13: ffffffff895da620 R14: ffffffff895d3620 R15: 000000000000201a
FS:  0000000001e04880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f37f8042148 CR3: 0000000029e01000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2020/11/06 22:36 upstream 521b619acdc8 64069d48 .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/10/12 03:20 upstream 3dd0130f2430 4a77ae0b .config log report syz C
ci-upstream-kasan-gce-selinux-root 2020/12/09 06:36 upstream 7d8761ba27fc 40cc414d .config log report info
ci-upstream-kasan-gce-selinux-root 2020/10/12 00:41 upstream 3dd0130f2430 4a77ae0b .config log report info
ci-upstream-kasan-gce-selinux-root 2020/09/21 11:31 upstream ba4f184e126b 9e1fa68e .config log report info
* Struck through repros no longer work on HEAD.