general protection fault in fix_nodes

9 views
Skip to first unread message

syzbot

unread,
Dec 8, 2022, 5:03:38 AM12/8/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1762f153880000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=666b46ca78661410fbb0
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16c74c7d880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13e313f3880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/abd83da2c098/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+666b46...@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 loop0): vs-5150 search_by_key: invalid format found in block 544. Fsck?
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8876 Comm: syz-executor420 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:317 [inline]
RIP: 0010:buffer_locked include/linux/buffer_head.h:123 [inline]
RIP: 0010:fix_nodes+0x460/0x7840 fs/reiserfs/fix_node.c:2582
Code: 02 00 00 89 de 89 ef e8 be 9a 90 ff 39 dd 0f 85 b4 43 00 00 e8 c1 99 90 ff 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 04 6c 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b
RSP: 0018:ffff8880ab467318 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000024 RCX: ffffffff81d1eba2
RDX: 0000000000000000 RSI: ffffffff81d1ebaf RDI: 0000000000000004
RBP: 0000000000000024 R08: 0000000000000000 R09: 0000000000000024
R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88808ac62780 R14: ffff8880922ae380 R15: ffff8880ab467640
FS: 00007ffaa9268700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc8cbeb9c0 CR3: 00000000992b9000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
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
do_sys_ftruncate+0x492/0x560 fs/open.c:194
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7ffab12fec29
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 15 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:00007ffaa92682f8 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007ffab13847c0 RCX: 00007ffab12fec29
RDX: 00007ffaa9268700 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007ffab13511d8 R08: 00007ffaa9268700 R09: 0000000000000000
R10: 00007ffaa9268700 R11: 0000000000000246 R12: 0030656c69662f2e
R13: 7366726573696572 R14: 0031656c69662f2e R15: 00007ffab13847c8
Modules linked in:
REISERFS (device loop2): journal params: device loop2, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30
REISERFS (device loop2): checking transaction log (loop2)
---[ end trace b2e53cf0d22a3b33 ]---
RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:317 [inline]
RIP: 0010:buffer_locked include/linux/buffer_head.h:123 [inline]
RIP: 0010:fix_nodes+0x460/0x7840 fs/reiserfs/fix_node.c:2582
REISERFS (device loop4): found reiserfs format "3.5" with non-standard journal
Code: 02 00 00 89 de 89 ef e8 be 9a 90 ff 39 dd 0f 85 b4 43 00 00 e8 c1 99 90 ff 4c 89 e2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 04 6c 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b
REISERFS (device loop4): using ordered data mode
REISERFS (device loop2): Using r5 hash to sort names
REISERFS (device loop2): using 3.5.x disk format
reiserfs: using flush barriers
REISERFS (device loop3): found reiserfs format "3.5" with non-standard journal
REISERFS (device loop2): Created .reiserfs_priv - reserved for xattr storage.
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
RSP: 0018:ffff8880ab467318 EFLAGS: 00010246
REISERFS (device loop3): using ordered data mode
REISERFS (device loop4): checking transaction log (loop4)
reiserfs: using flush barriers
REISERFS (device loop1): found reiserfs format "3.5" with non-standard journal
REISERFS (device loop1): using ordered data mode
REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30
RAX: dffffc0000000000 RBX: 0000000000000024 RCX: ffffffff81d1eba2
RDX: 0000000000000000 RSI: ffffffff81d1ebaf RDI: 0000000000000004
reiserfs: using flush barriers
RBP: 0000000000000024 R08: 0000000000000000 R09: 0000000000000024
REISERFS (device loop3): checking transaction log (loop3)
R10: 0000000000000004 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88808ac62780 R14: ffff8880922ae380 R15: ffff8880ab467640
FS: 00007ffaa9268700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
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
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
REISERFS (device loop1): checking transaction log (loop1)
REISERFS (device loop4): Using r5 hash to sort names
REISERFS (device loop1): Using r5 hash to sort names
CR2: 00007ffc8cacdfc8 CR3: 00000000992b9000 CR4: 00000000003406f0
REISERFS (device loop1): using 3.5.x disk format
REISERFS (device loop4): using 3.5.x disk format
REISERFS (device loop1): Created .reiserfs_priv - reserved for xattr storage.
REISERFS (device loop4): Created .reiserfs_priv - reserved for xattr storage.
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 02 00 add (%rax),%al
2: 00 89 de 89 ef e8 add %cl,-0x17107622(%rcx)
8: be 9a 90 ff 39 mov $0x39ff909a,%esi
d: dd 0f fisttpll (%rdi)
f: 85 b4 43 00 00 e8 c1 test %esi,-0x3e180000(%rbx,%rax,2)
16: 99 cltd
17: 90 nop
18: ff 4c 89 e2 decl -0x1e(%rcx,%rcx,4)
1c: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
23: fc ff df
26: 48 c1 ea 03 shr $0x3,%rdx
* 2a: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2e: 0f 85 04 6c 00 00 jne 0x6c38
34: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
3b: fc ff df
3e: 49 rex.WB
3f: 8b .byte 0x8b


---
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.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

syzbot

unread,
Dec 15, 2022, 12:04:42 AM12/15/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c4215ee4771b Linux 4.14.302
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1515df1f880000
kernel config: https://syzkaller.appspot.com/x/.config?x=4a9988fe055c9527
dashboard link: https://syzkaller.appspot.com/bug?extid=82c92daf6ac2ee1979b9
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=174205af880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c93ba055d204/disk-c4215ee4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/bfbc929a33c1/vmlinux-c4215ee4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/444658051770/bzImage-c4215ee4.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/dd97d3e8f29d/mount_0.gz

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

kasan: CONFIG_KASAN_INLINE enabled
REISERFS (device loop5): using ordered data mode
kasan: GPF could be caused by NULL-ptr deref or user memory access
REISERFS (device loop3): journal params: device loop3, size 512, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30
reiserfs: using flush barriers
general protection fault: 0000 [#1] PREEMPT SMP KASAN
REISERFS warning: reiserfs-5093 is_leaf: item entry count seems wrong *3.5*[2 3 0(1) DIR], item_len 35, item_location 4029, free_space(entry_count) 2
Modules linked in:
CPU: 1 PID: 9531 Comm: syz-executor.2 Not tainted 4.14.302-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
REISERFS error (device loop4): vs-5150 search_by_key: invalid format found in block 544. Fsck?
task: ffff8880971d2540 task.stack: ffff888091658000
RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:328 [inline]
RIP: 0010:buffer_locked include/linux/buffer_head.h:119 [inline]
RIP: 0010:fix_nodes+0x3ea/0x7140 fs/reiserfs/fix_node.c:2582
RSP: 0018:ffff88809165f3d8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000024 RCX: 61c8864680b583eb
RDX: 0000000000000000 RSI: ffff8880896783f0 RDI: ffff8880ab78c500
RBP: 0000000000000000 R08: 000000000000005e R09: 000000000000000a
REISERFS (device loop4): Remounting filesystem read-only
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88809a0b8d80
R13: 00000000fffffc10 R14: ffff88809165f6c8 R15: ffff88809165fb08
FS: 00007f6363f94700(0000) GS:ffff8880ba500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fee14800000 CR3: 000000009cd8a000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
REISERFS error (device loop4): vs-13050 reiserfs_update_sd_size: i/o failure occurred trying to update [2 3 0x0 SD] stat data
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
REISERFS warning (device loop4): clm-6006 reiserfs_dirty_inode: writing inode 2 on readonly FS
reiserfs_cut_from_item+0x212/0x1570 fs/reiserfs/stree.c:1752
reiserfs_do_truncate+0x53f/0xf50 fs/reiserfs/stree.c:1983
reiserfs_truncate_file+0x17e/0xdb0 fs/reiserfs/inode.c:2319
reiserfs_setattr+0xb2d/0xe00 fs/reiserfs/inode.c:3411
notify_change+0x56b/0xd10 fs/attr.c:315
do_truncate+0xff/0x1a0 fs/open.c:63
do_sys_ftruncate.constprop.0+0x3a3/0x480 fs/open.c:205
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x5e/0xd3
RIP: 0033:0x7f636cc640d9
RSP: 002b:00007f6363f94168 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007f636cd84120 RCX: 00007f636cc640d9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f636ccbfae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff4badc30f R14: 00007f6363f94300 R15: 0000000000022000
Code: 3c 03 0f 8e 08 65 00 00 41 39 9e a8 02 00 00 0f 85 58 44 00 00 e8 f7 e5 a6 ff 48 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 78 67 00 00 48 8b 45 00 a8 04 0f 84 f4 00 00
RIP: constant_test_bit arch/x86/include/asm/bitops.h:328 [inline] RSP: ffff88809165f3d8
RIP: buffer_locked include/linux/buffer_head.h:119 [inline] RSP: ffff88809165f3d8
RIP: fix_nodes+0x3ea/0x7140 fs/reiserfs/fix_node.c:2582 RSP: ffff88809165f3d8
---[ end trace c9b4ae8ff33872f4 ]---
----------------
Code disassembly (best guess):
0: 3c 03 cmp $0x3,%al
2: 0f 8e 08 65 00 00 jle 0x6510
8: 41 39 9e a8 02 00 00 cmp %ebx,0x2a8(%r14)
f: 0f 85 58 44 00 00 jne 0x446d
15: e8 f7 e5 a6 ff callq 0xffa6e611
1a: 48 89 ea mov %rbp,%rdx
1d: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
24: fc ff df
27: 48 c1 ea 03 shr $0x3,%rdx
* 2b: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2f: 0f 85 78 67 00 00 jne 0x67ad
35: 48 8b 45 00 mov 0x0(%rbp),%rax
39: a8 04 test $0x4,%al
3b: 0f .byte 0xf
3c: 84 f4 test %dh,%ah
Reply all
Reply to author
Forward
0 new messages