syzbot


kernel BUG in direntry_check_right

Status: upstream: reported syz repro on 2022/12/26 20:36
Subsystems: reiserfs
[Documentation on labels]
Reported-by: syzbot+a012f19feb263a4eae26@syzkaller.appspotmail.com
First crash: 725d, last: 725d
Fix bisection: failed (error log, bisect log)
  
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in direntry_check_right reiserfs C done done 2 364d 407d 25/28 fixed on 2024/01/30 15:47

Sample crash report:
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
REISERFS (device loop2): Created .reiserfs_priv - reserved for xattr storage.
REISERFS (device loop4): found reiserfs format "3.6" with non-standard journal
REISERFS (device loop4): using ordered data mode
------------[ cut here ]------------
kernel BUG at fs/reiserfs/item_ops.c:569!
reiserfs: using flush barriers
REISERFS (device loop4): journal params: device loop4, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9998 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0
REISERFS (device loop4): checking transaction log (loop4)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:direntry_check_right+0x23e/0x290 fs/reiserfs/item_ops.c:569
Code: f0 48 83 c4 10 5b 5d 41 5c 41 5d 41 5e 41 5f c3 e8 47 0f 8b ff 8b 44 24 0c 83 e8 02 41 39 c6 44 0f 4f f0 eb c0 e8 32 0f 8b ff <0f> 0b 41 be ff ff ff ff eb c5 be 02 00 00 00 48 89 ef e8 fb ef c0
RSP: 0018:ffff88808d476f10 EFLAGS: 00010293
RAX: ffff8880b44b8040 RBX: 00000000ffffffff RCX: ffffffff81d774b6
RDX: 0000000000000000 RSI: ffffffff81d7763e RDI: 0000000000000005
RBP: ffff88808d4772d0 R08: 0000000000000001 R09: 00000000ffffffff
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000028
R13: 0000000000000007 R14: 0000000000000000 R15: ffff88808d930f48
FS:  00007fcbae62a700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3557564718 CR3: 00000000a26a6000 CR4: 00000000003406f0
REISERFS (device loop4): Using r5 hash to sort names
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 check_right+0x2e8/0x690 fs/reiserfs/fix_node.c:355
 dc_check_balance_leaf fs/reiserfs/fix_node.c:1987 [inline]
 dc_check_balance fs/reiserfs/fix_node.c:2043 [inline]
 check_balance fs/reiserfs/fix_node.c:2090 [inline]
 fix_nodes+0x3038/0x7840 fs/reiserfs/fix_node.c:2639
REISERFS (device loop4): Created .reiserfs_priv - reserved for xattr storage.
 reiserfs_cut_from_item+0x24c/0x1960 fs/reiserfs/stree.c:1752
 reiserfs_do_truncate+0x64a/0x10c0 fs/reiserfs/stree.c:1983
 reiserfs_truncate_file+0x1b1/0x1030 fs/reiserfs/inode.c:2320
 reiserfs_setattr+0xdc2/0x1090 fs/reiserfs/inode.c:3412
 notify_change+0x70b/0xfc0 fs/attr.c:334
 do_truncate+0x134/0x1f0 fs/open.c:63
 handle_truncate fs/namei.c:3009 [inline]
 do_last fs/namei.c:3427 [inline]
 path_openat+0x2308/0x2df0 fs/namei.c:3537
 do_filp_open+0x18c/0x3f0 fs/namei.c:3567
 do_sys_open+0x3b3/0x520 fs/open.c:1085
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fcbb72d90a9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fcbae62a168 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fcbb73f9050 RCX: 00007fcbb72d90a9
RDX: 000000000000275a RSI: 00000000200001c0 RDI: ffffffffffffff9c
RBP: 00007fcbb7334ae9 R08: 0000000000000000 R09: 0000000000000000
REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffcb327246f R14: 00007fcbae62a300 R15: 0000000000022000
Modules linked in:
---[ end trace 06529875a4f2f3c4 ]---
RIP: 0010:direntry_check_right+0x23e/0x290 fs/reiserfs/item_ops.c:569
Code: f0 48 83 c4 10 5b 5d 41 5c 41 5d 41 5e 41 5f c3 e8 47 0f 8b ff 8b 44 24 0c 83 e8 02 41 39 c6 44 0f 4f f0 eb c0 e8 32 0f 8b ff <0f> 0b 41 be ff ff ff ff eb c5 be 02 00 00 00 48 89 ef e8 fb ef c0
REISERFS (device loop1): using ordered data mode
reiserfs: using flush barriers
RSP: 0018:ffff88808d476f10 EFLAGS: 00010293
RAX: ffff8880b44b8040 RBX: 00000000ffffffff RCX: ffffffff81d774b6
RDX: 0000000000000000 RSI: ffffffff81d7763e RDI: 0000000000000005
RBP: ffff88808d4772d0 R08: 0000000000000001 R09: 00000000ffffffff
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000028
REISERFS (device loop1): journal params: device loop1, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30
R13: 0000000000000007 R14: 0000000000000000 R15: ffff88808d930f48
REISERFS (device loop1): checking transaction log (loop1)
FS:  00007fcbae62a700(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f3557200000 CR3: 00000000a26a6000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/26 20:36 linux-4.19.y 3f8a27f9e27b 9da18ae8 .config console log report syz [disk image] [vmlinux] [mounted in repro] ci2-linux-4-19 kernel BUG in direntry_check_right
* Struck through repros no longer work on HEAD.