[v6.1] kernel BUG in reiserfs_cut_from_item

1 view
Skip to first unread message

syzbot

unread,
May 17, 2023, 2:05:50 AM5/17/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: bf4ad6fa4e53 Linux 6.1.28
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17f3d296280000
kernel config: https://syzkaller.appspot.com/x/.config?x=26fca33e75c97e43
dashboard link: https://syzkaller.appspot.com/bug?extid=17a2a95e28075c63e42f
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/058ee41df9de/disk-bf4ad6fa.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/480706160d27/vmlinux-bf4ad6fa.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e6a9f4f20a23/bzImage-bf4ad6fa.xz

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

REISERFS (device loop4): Remounting filesystem read-only
------------[ cut here ]------------
kernel BUG at fs/reiserfs/stree.c:1568!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 17805 Comm: syz-executor.4 Not tainted 6.1.28-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
RIP: 0010:maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
RIP: 0010:reiserfs_cut_from_item+0x231e/0x2580 fs/reiserfs/stree.c:1694
Code: 44 89 e1 80 e1 07 38 c1 0f 8c 5c f5 ff ff be 04 00 00 00 4c 89 e7 e8 41 5b b4 ff 48 8b 54 24 28 e9 45 f5 ff ff e8 82 15 5e ff <0f> 0b e8 7b 15 5e ff 0f 0b e8 74 15 5e ff 0f 0b e8 6d 0e 56 08 e8
RSP: 0018:ffffc9000305f320 EFLAGS: 00010283
RAX: ffffffff822bba3e RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc90006009000 RSI: 00000000000125aa RDI: 00000000000125ab
RBP: ffffc9000305f850 R08: ffffffff822b9d44 R09: ffffffff822b1f99
R10: 0000000000000002 R11: ffff8880126bbb80 R12: 0000000000000e00
R13: 1ffff110111ff1e4 R14: 0000000000001000 R15: ffff8880804f2678
FS: 00007f1135592700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2dd36000 CR3: 000000007566a000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 000000000000003b DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
reiserfs_do_truncate+0xa12/0x15b0 fs/reiserfs/stree.c:1973
reiserfs_truncate_file+0x4d6/0x810 fs/reiserfs/inode.c:2310
reiserfs_setattr+0xc57/0x11c0 fs/reiserfs/inode.c:3395
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:0x7f113488c169
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:00007f1135592168 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007f11349ac050 RCX: 00007f113488c169
RDX: 0000000000000000 RSI: 0000000000000e00 RDI: 0000000000000006
RBP: 00007f11348e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe7904d28f R14: 00007f1135592300 R15: 0000000000022000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
RIP: 0010:reiserfs_cut_from_item+0x231e/0x2580 fs/reiserfs/stree.c:1694
Code: 44 89 e1 80 e1 07 38 c1 0f 8c 5c f5 ff ff be 04 00 00 00 4c 89 e7 e8 41 5b b4 ff 48 8b 54 24 28 e9 45 f5 ff ff e8 82 15 5e ff <0f> 0b e8 7b 15 5e ff 0f 0b e8 74 15 5e ff 0f 0b e8 6d 0e 56 08 e8
RSP: 0018:ffffc9000305f320 EFLAGS: 00010283
RAX: ffffffff822bba3e RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc90006009000 RSI: 00000000000125aa RDI: 00000000000125ab
RBP: ffffc9000305f850 R08: ffffffff822b9d44 R09: ffffffff822b1f99
R10: 0000000000000002 R11: ffff8880126bbb80 R12: 0000000000000e00
R13: 1ffff110111ff1e4 R14: 0000000000001000 R15: ffff8880804f2678
FS: 00007f1135592700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5aa1abdd38 CR3: 000000007566a000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 000000000000003b DR6: 00000000ffff0ff0 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 16, 2023, 11:51:53 AM6/16/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: ca87e77a2ef8 Linux 6.1.34
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=112bf2cf280000
kernel config: https://syzkaller.appspot.com/x/.config?x=143044f84cdceac2
dashboard link: https://syzkaller.appspot.com/bug?extid=17a2a95e28075c63e42f
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=12a55b27280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/1141c37ce351/disk-ca87e77a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/de1fca0d0bb4/vmlinux-ca87e77a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c3417b70e0bf/Image-ca87e77a.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/054abb8e04b0/mount_0.gz

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

------------[ cut here ]------------
kernel BUG at fs/reiserfs/stree.c:1568!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 6245 Comm: syz-executor.1 Not tainted 6.1.34-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+0x1a88/0x1c98 fs/reiserfs/stree.c:1694
lr : maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
lr : reiserfs_cut_from_item+0x1a88/0x1c98 fs/reiserfs/stree.c:1694
sp : ffff8000220270a0
x29: ffff8000220275c0 x28: ffff8000220277a0 x27: 0000000000000000
x26: ffff800022027580 x25: ffff800022027700 x24: 0000000000000e5c
x23: dfff800000000000 x22: ffff0000d374c678 x21: 1fffe0001cef3f24
x20: 0000000000000e5c x19: ffff0000d374c000 x18: 1fffe000368b5f76
x17: ffff8000155bd000 x16: 0000000000000000 x15: 0000000000000000
x14: 0000000000000000 x13: 00000000fffffffe x12: ffff0000ed155340
x11: ff80800008d9f26c x10: 0000000000000000 x9 : ffff800008d9f26c
x8 : ffff0000ed155340 x7 : ffff80000827cdcc x6 : 0000000000000000
x5 : 0000000000000080 x4 : 0000000000000001 x3 : ffff800008b2bac0
x2 : 0000000000000001 x1 : 0000000000000000 x0 : 0000000000000e5c
Call trace:
maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
reiserfs_cut_from_item+0x1a88/0x1c98 fs/reiserfs/stree.c:1694
reiserfs_do_truncate+0x89c/0x11c8 fs/reiserfs/stree.c:1973
reiserfs_truncate_file+0x510/0xb1c fs/reiserfs/inode.c:2310
reiserfs_setattr+0xb58/0x101c fs/reiserfs/inode.c:3395
notify_change+0xc24/0xec0 fs/attr.c:482
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/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
Code: 52800081 97ef37e8 17fffde2 97dd6c47 (d4210000)
---[ end trace 0000000000000000 ]---


---
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.

syzbot

unread,
Jun 23, 2023, 5:40:49 PM6/23/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: e84a4e368abe Linux 6.1.35
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14b5ad57280000
kernel config: https://syzkaller.appspot.com/x/.config?x=a69b5c9de715622a
dashboard link: https://syzkaller.appspot.com/bug?extid=17a2a95e28075c63e42f
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1175f03b280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1300bc77280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3c7fedd1a86d/disk-e84a4e36.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8b34c6296ed7/vmlinux-e84a4e36.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a88164798cc2/bzImage-e84a4e36.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/5f06ef26d1aa/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+17a2a9...@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 loop2): 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: 1 PID: 9388 Comm: syz-executor123 Not tainted 6.1.35-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
RIP: 0010:reiserfs_cut_from_item+0x231e/0x2580 fs/reiserfs/stree.c:1694
Code: 44 89 e1 80 e1 07 38 c1 0f 8c 5c f5 ff ff be 04 00 00 00 4c 89 e7 e8 01 50 b4 ff 48 8b 54 24 28 e9 45 f5 ff ff e8 32 06 5e ff <0f> 0b e8 2b 06 5e ff 0f 0b e8 24 06 5e ff 0f 0b e8 6d b5 57 08 e8
RSP: 0018:ffffc9000489f320 EFLAGS: 00010293
RAX: ffffffff822bd05e RBX: 0000000000000000 RCX: ffff88807342d940
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000e00
RBP: ffffc9000489f850 R08: ffffffff822bb364 R09: ffffffff822b35b9
R10: 0000000000000002 R11: ffff88807342d940 R12: 0000000000000e00
R13: 1ffff1100e009958 R14: 0000000000001000 R15: ffff88802210e678
FS: 00007f001ea67700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f001ea67000 CR3: 000000001f5d7000 CR4: 00000000003506e0
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+0x4d6/0x810 fs/reiserfs/inode.c:2310
reiserfs_setattr+0xc57/0x11c0 fs/reiserfs/inode.c:3395
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:0x7f0026ae4cd9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 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:00007f001ea671f8 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007f0026b63798 RCX: 00007f0026ae4cd9
RDX: 00007f0026ae4cd9 RSI: 0000000000000e00 RDI: 0000000000000006
RBP: 00007f0026b63790 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0026b6379c
R13: 00007fff1a8b369f R14: 00007f001ea67300 R15: 0000000000022000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:maybe_indirect_to_direct fs/reiserfs/stree.c:1568 [inline]
RIP: 0010:reiserfs_cut_from_item+0x231e/0x2580 fs/reiserfs/stree.c:1694
Code: 44 89 e1 80 e1 07 38 c1 0f 8c 5c f5 ff ff be 04 00 00 00 4c 89 e7 e8 01 50 b4 ff 48 8b 54 24 28 e9 45 f5 ff ff e8 32 06 5e ff <0f> 0b e8 2b 06 5e ff 0f 0b e8 24 06 5e ff 0f 0b e8 6d b5 57 08 e8
RSP: 0018:ffffc9000489f320 EFLAGS: 00010293
RAX: ffffffff822bd05e RBX: 0000000000000000 RCX: ffff88807342d940
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000e00
RBP: ffffc9000489f850 R08: ffffffff822bb364 R09: ffffffff822b35b9
R10: 0000000000000002 R11: ffff88807342d940 R12: 0000000000000e00
R13: 1ffff1100e009958 R14: 0000000000001000 R15: ffff88802210e678
FS: 00007f001ea67700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff1a8e39b0 CR3: 000000001f5d7000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Reply all
Reply to author
Forward
0 new messages