syzbot has found a reproducer for the following issue on:
HEAD commit: d2869ace6eeb Linux 6.1.31
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=16b5b895280000
kernel config:
https://syzkaller.appspot.com/x/.config?x=623aacf949348d7d
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=163e2779280000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=132665a3280000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/2ed651ed0d8f/disk-d2869ace.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/b8d3199c542c/vmlinux-d2869ace.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/a44812549bf7/bzImage-d2869ace.xz
mounted in repro:
https://storage.googleapis.com/syzbot-assets/af641d3fb302/mount_0.gz
REISERFS (device loop0): checking transaction log (loop0)
REISERFS (device loop0): Using r5 hash to sort names
REISERFS (device loop0): using 3.5.x disk format
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
REISERFS warning: reiserfs-5093 is_leaf: item entry count seems wrong *3.5*[2 1 0(1) DIR], item_len 35, item_location 4029, free_space(entry_count) 2
REISERFS error (device loop0): vs-5150 search_by_key: invalid format found in block 532. Fsck?
REISERFS (device loop0): Remounting filesystem read-only
general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 0 PID: 3610 Comm: syz-executor248 Not tainted 6.1.31-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:reiserfs_node_data fs/reiserfs/reiserfs.h:2184 [inline]
RIP: 0010:item_head fs/reiserfs/reiserfs.h:2200 [inline]
RIP: 0010:tp_item_head fs/reiserfs/reiserfs.h:2226 [inline]
RIP: 0010:direct2indirect+0x957/0x1830 fs/reiserfs/tail_conversion.c:119
Code: 49 c1 e7 04 4a 8d 5c 39 08 48 89 d8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 3d 03 00 00 48 63 1b 49 83 c5 28 4c 89 e8 48 c1 e8 03 <80> 3c 10 00 74 12 4c 89 ef e8 fb 17 b4 ff 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc90003e3f0a0 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 0000000000000000 RCX: ffffc90003e3f678
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000008
RBP: ffffc90003e3f230 R08: ffffffff822c041b R09: ffffffff822b2839
R10: 0000000000000002 R11: ffff8880236ebb80 R12: 0000000000000001
R13: 0000000000000028 R14: 0000000000000000 R15: 0000000000000010
FS: 00007fd704c6c700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd6fcc4b718 CR3: 000000001ae42000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
reiserfs_get_block+0x4c57/0x5150 fs/reiserfs/inode.c:949
__block_write_begin_int+0x544/0x1a30 fs/buffer.c:1991
reiserfs_write_begin+0x249/0x510 fs/reiserfs/inode.c:2775
generic_cont_expand_simple+0x187/0x2a0 fs/buffer.c:2347
reiserfs_setattr+0x606/0x11c0 fs/reiserfs/inode.c:3305
notify_change+0xdcd/0x1080 fs/attr.c:482
do_truncate+0x21c/0x300 fs/open.c:65
do_sys_ftruncate+0x2e2/0x380 fs/open.c:193
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fd704ccb739
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 18 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:00007fd704c6c2f8 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007fd704d4a780 RCX: 00007fd704ccb739
RDX: 00007fd704ccb739 RSI: 0000000000000f88 RDI: 0000000000000004
RBP: 00007fd704d166b8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 7366726573696572 R14: 6576652e73646970 R15: 00007fd704d4a788
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:reiserfs_node_data fs/reiserfs/reiserfs.h:2184 [inline]
RIP: 0010:item_head fs/reiserfs/reiserfs.h:2200 [inline]
RIP: 0010:tp_item_head fs/reiserfs/reiserfs.h:2226 [inline]
RIP: 0010:direct2indirect+0x957/0x1830 fs/reiserfs/tail_conversion.c:119
Code: 49 c1 e7 04 4a 8d 5c 39 08 48 89 d8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 3d 03 00 00 48 63 1b 49 83 c5 28 4c 89 e8 48 c1 e8 03 <80> 3c 10 00 74 12 4c 89 ef e8 fb 17 b4 ff 48 ba 00 00 00 00 00 fc
RSP: 0018:ffffc90003e3f0a0 EFLAGS: 00010206
RAX: 0000000000000005 RBX: 0000000000000000 RCX: ffffc90003e3f678
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: 0000000000000008
RBP: ffffc90003e3f230 R08: ffffffff822c041b R09: ffffffff822b2839
R10: 0000000000000002 R11: ffff8880236ebb80 R12: 0000000000000001
R13: 0000000000000028 R14: 0000000000000000 R15: 0000000000000010
FS: 00007fd704c6c700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd6fcc4b718 CR3: 000000001ae42000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 49 c1 e7 04 shl $0x4,%r15
4: 4a 8d 5c 39 08 lea 0x8(%rcx,%r15,1),%rbx
9: 48 89 d8 mov %rbx,%rax
c: 48 c1 e8 03 shr $0x3,%rax
10: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
14: 84 c0 test %al,%al
16: 0f 85 3d 03 00 00 jne 0x359
1c: 48 63 1b movslq (%rbx),%rbx
1f: 49 83 c5 28 add $0x28,%r13
23: 4c 89 e8 mov %r13,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 80 3c 10 00 cmpb $0x0,(%rax,%rdx,1) <-- trapping instruction
2e: 74 12 je 0x42
30: 4c 89 ef mov %r13,%rdi
33: e8 fb 17 b4 ff callq 0xffb41833
38: 48 rex.W
39: ba 00 00 00 00 mov $0x0,%edx
3e: 00 fc add %bh,%ah
---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.