[v5.15] kernel BUG in reiserfs_cut_from_item

0 views
Skip to first unread message

syzbot

unread,
Jun 9, 2023, 9:59:05 AM6/9/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 7349e40704a0 Linux 5.15.116
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1089551b280000
kernel config: https://syzkaller.appspot.com/x/.config?x=831c3122ac9c9145
dashboard link: https://syzkaller.appspot.com/bug?extid=f62df49d6b037e4d80c0
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/8c03c3ad4501/disk-7349e407.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/350c3d79bc87/vmlinux-7349e407.xz
kernel image: https://storage.googleapis.com/syzbot-assets/73a4ed3d5438/bzImage-7349e407.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f62df4...@syzkaller.appspotmail.com

REISERFS error (device loop5): vs-5150 search_by_key: invalid format found in block 532. Fsck?
------------[ cut here ]------------
kernel BUG at fs/reiserfs/stree.c:1568!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 6909 Comm: syz-executor.5 Not tainted 5.15.116-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
RIP: 0010:reiserfs_cut_from_item+0x22ff/0x2560 fs/reiserfs/stree.c:1694
Code: 44 89 e1 80 e1 07 38 c1 0f 8c 7b f5 ff ff be 04 00 00 00 4c 89 e7 e8 20 b5 b9 ff 48 8b 54 24 28 e9 64 f5 ff ff e8 31 59 70 ff <0f> 0b e8 2a 59 70 ff 0f 0b e8 23 59 70 ff 0f 0b e8 4c 48 0b 08 e8
RSP: 0018:ffffc9000b377300 EFLAGS: 00010287
RAX: ffffffff820fa01f RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc90005699000 RSI: 000000000000ec43 RDI: 000000000000ec44
RBP: ffffc9000b377830 R08: ffffffff820f8344 R09: ffffffff820f0599
R10: 0000000000000002 R11: ffff888024920000 R12: 0000000000000e00
R13: 1ffff11003a44110 R14: 0000000000001000 R15: ffff88801f384678
FS: 00007f24dfc81700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7c68e30000 CR3: 000000002373e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
reiserfs_do_truncate+0xa12/0x15b0 fs/reiserfs/stree.c:1973
reiserfs_truncate_file+0x638/0xda0 fs/reiserfs/inode.c:2318
reiserfs_setattr+0xa4d/0xf90 fs/reiserfs/inode.c:3409
notify_change+0xd4d/0x1000 fs/attr.c:488
do_truncate+0x21c/0x300 fs/open.c:65
do_sys_ftruncate+0x2eb/0x390 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+0x61/0xcb
RIP: 0033:0x7f24e9751169
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:00007f24dfc81168 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007f24e9871120 RCX: 00007f24e9751169
RDX: 0000000000000000 RSI: 0000000000000e00 RDI: 0000000000000006
RBP: 00007f24e97acca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffff52ad35f R14: 00007f24dfc81300 R15: 0000000000022000
</TASK>
Modules linked in:
---[ end trace 7d22eb6bf0b39cda ]---
RIP: 0010:maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
RIP: 0010:reiserfs_cut_from_item+0x22ff/0x2560 fs/reiserfs/stree.c:1694
Code: 44 89 e1 80 e1 07 38 c1 0f 8c 7b f5 ff ff be 04 00 00 00 4c 89 e7 e8 20 b5 b9 ff 48 8b 54 24 28 e9 64 f5 ff ff e8 31 59 70 ff <0f> 0b e8 2a 59 70 ff 0f 0b e8 23 59 70 ff 0f 0b e8 4c 48 0b 08 e8
RSP: 0018:ffffc9000b377300 EFLAGS: 00010287
RAX: ffffffff820fa01f RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc90005699000 RSI: 000000000000ec43 RDI: 000000000000ec44
RBP: ffffc9000b377830 R08: ffffffff820f8344 R09: ffffffff820f0599
R10: 0000000000000002 R11: ffff888024920000 R12: 0000000000000e00
R13: 1ffff11003a44110 R14: 0000000000001000 R15: ffff88801f384678
FS: 00007f24dfc81700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000182 CR3: 000000002373e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Jun 10, 2023, 5:52:46 AM6/10/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 7349e40704a0 Linux 5.15.116
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12474543280000
kernel config: https://syzkaller.appspot.com/x/.config?x=f650a0601dbf525d
dashboard link: https://syzkaller.appspot.com/bug?extid=f62df49d6b037e4d80c0
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=122b5807280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13c3e543280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eec1263e4f05/disk-7349e407.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/833d6ae016fd/vmlinux-7349e407.xz
kernel image: https://storage.googleapis.com/syzbot-assets/da142afba386/Image-7349e407.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/97a6de8f710c/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f62df4...@syzkaller.appspotmail.com

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 loop1): vs-5150 search_by_key: invalid format found in block 532. Fsck?
------------[ cut here ]------------
kernel BUG at fs/reiserfs/stree.c:1568!
Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 8929 Comm: syz-executor232 Not tainted 5.15.116-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
pc : reiserfs_cut_from_item+0x1a74/0x1c84 fs/reiserfs/stree.c:1694
lr : maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
lr : reiserfs_cut_from_item+0x1a74/0x1c84 fs/reiserfs/stree.c:1694
sp : ffff8000203b7080
x29: ffff8000203b75a0 x28: ffff8000203b7780 x27: 0000000000000000
x26: ffff8000203b7560 x25: ffff8000203b76e0 x24: 0000000000000e00
x23: dfff800000000000 x22: ffff0000cff9e678 x21: 1fffe0001a6c9958
x20: 0000000000000e00 x19: ffff0000cff9e000 x18: 0000000000000000
x17: ff80800008cd02b8 x16: 0000000000000000 x15: ffff800008cd02b8
x14: 00000000fffffffe x13: ffffffffffffffff x12: 0000000000000000
x11: ff80800008cd7d58 x10: 0000000000000000 x9 : ffff800008cd7d58
x8 : ffff0000d0100000 x7 : 0000000000025f18 x6 : 0000000000025ed8
x5 : ffff8000203b60f8 x4 : ffff8000149bfd28 x3 : ffff800008a68ad8
x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000e00
Call trace:
maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
reiserfs_cut_from_item+0x1a74/0x1c84 fs/reiserfs/stree.c:1694
reiserfs_do_truncate+0x89c/0x11c8 fs/reiserfs/stree.c:1973
reiserfs_truncate_file+0x3ac/0x6f0 fs/reiserfs/inode.c:2318
reiserfs_setattr+0x8e8/0xd94 fs/reiserfs/inode.c:3409
notify_change+0xac4/0xd60 fs/attr.c:488
do_truncate+0x1c0/0x28c fs/open.c:65
do_sys_ftruncate+0x288/0x31c fs/open.c:193
__do_sys_ftruncate fs/open.c:204 [inline]
__se_sys_ftruncate fs/open.c:202 [inline]
__arm64_sys_ftruncate+0x60/0x74 fs/open.c:202
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
Code: 52800081 97efbf94 17fffde7 97dfacea (d4210000)
---[ end trace c8f717b10aaaacc3 ]---


---
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.
Reply all
Reply to author
Forward
0 new messages