BUG: unable to handle kernel NULL pointer dereference in __lookup_slow

14 views
Skip to first unread message

syzbot

unread,
Oct 1, 2020, 4:51:26 PM10/1/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b09c3451 Linux 4.19.149
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15086d13900000
kernel config: https://syzkaller.appspot.com/x/.config?x=d7c6dfb55644e8fd
dashboard link: https://syzkaller.appspot.com/bug?extid=9a0b21b8e095def1655c
compiler: gcc (GCC) 10.1.0-syz 20200507

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

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

BTRFS error (device loop3): open_ctree failed
BTRFS error (device loop4): superblock checksum mismatch
BTRFS error (device loop4): open_ctree failed
REISERFS (device loop2): Using rupasov hash to sort names
REISERFS (device loop2): using 3.5.x disk format
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
PGD 63c08067 P4D 63c08067 PUD 87bd3067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 23504 Comm: syz-executor.2 Not tainted 4.19.149-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010: (null)
Code: Bad RIP value.
RSP: 0018:ffff8880852678a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff11010a4cf17 RCX: ffffc90005f64000
RDX: 0000000000000000 RSI: ffff88808a9a0040 RDI: ffff888043448a80
RBP: ffffffff881a37c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff88808a9a0040
R13: ffff888043448a80 R14: ffff888085267a30 R15: ffff8880852678d8
FS: 00007f56c7589700(0000) GS:ffff8880ae200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000960e7000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
__lookup_slow+0x246/0x4a0 fs/namei.c:1672
lookup_one_len+0x163/0x190 fs/namei.c:2544
reiserfs_lookup_privroot+0x92/0x280 fs/reiserfs/xattr.c:963
reiserfs_fill_super+0x21e8/0x2e60 fs/reiserfs/super.c:2179
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4607ea
Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 ad 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 8a 89 fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007f56c7588a88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f56c7588b20 RCX: 00000000004607ea
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f56c7588ae0
RBP: 00007f56c7588ae0 R08: 00007f56c7588b20 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000
R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020011100
Modules linked in:
CR2: 0000000000000000
---[ end trace a4951f5d36bf1513 ]---
RIP: 0010: (null)
Code: Bad RIP value.
RSP: 0018:ffff8880852678a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff11010a4cf17 RCX: ffffc90005f64000
RDX: 0000000000000000 RSI: ffff88808a9a0040 RDI: ffff888043448a80
RBP: ffffffff881a37c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff88808a9a0040
R13: ffff888043448a80 R14: ffff888085267a30 R15: ffff8880852678d8
FS: 00007f56c7589700(0000) GS:ffff8880ae200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000960e7000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600


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

unread,
Oct 2, 2020, 1:25:18 AM10/2/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: b09c3451 Linux 4.19.149
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=117182b7900000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=109d9f0f900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14b65f6b900000

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

reiserfs: using flush barriers
REISERFS (device loop0): journal params: device loop0, size 8192, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30
REISERFS (device loop0): checking transaction log (loop0)
REISERFS (device loop0): Using rupasov hash to sort names
REISERFS (device loop0): using 3.5.x disk format
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
PGD a0bab067 P4D a0bab067 PUD a4d46067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 6489 Comm: syz-executor696 Not tainted 4.19.149-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010: (null)
Code: Bad RIP value.
RSP: 0018:ffff8880848ff8a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff1101091ff17 RCX: ffffffff81b863eb
RDX: 0000000000000000 RSI: ffff88808375a300 RDI: ffff888080588740
RBP: ffffffff881a37c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff88808375a300
R13: ffff888080588740 R14: ffff8880848ffa30 R15: ffff8880848ff8d8
FS: 0000000000cc0880(0000) GS:ffff8880ae300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000a8cd0000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__lookup_slow+0x246/0x4a0 fs/namei.c:1672
lookup_one_len+0x163/0x190 fs/namei.c:2544
reiserfs_lookup_privroot+0x92/0x280 fs/reiserfs/xattr.c:963
reiserfs_fill_super+0x21e8/0x2e60 fs/reiserfs/super.c:2179
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x318 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2469 [inline]
do_mount+0x51c/0x2f10 fs/namespace.c:2799
ksys_mount+0xcf/0x130 fs/namespace.c:3015
__do_sys_mount fs/namespace.c:3029 [inline]
__se_sys_mount fs/namespace.c:3026 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3026
do_syscall_64+0xf9/0x670 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x447d9a
Code: b8 08 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 7d a3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 5a a3 fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007ffd40849518 EFLAGS: 00000297 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffd40849570 RCX: 0000000000447d9a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffd40849530
RBP: 00007ffd40849530 R08: 00007ffd40849570 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000297 R12: 0000000000000006
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
Modules linked in:
CR2: 0000000000000000
---[ end trace f09174b787254a18 ]---
RIP: 0010: (null)
Code: Bad RIP value.
RSP: 0018:ffff8880848ff8a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff1101091ff17 RCX: ffffffff81b863eb
RDX: 0000000000000000 RSI: ffff88808375a300 RDI: ffff888080588740
RBP: ffffffff881a37c0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff88808375a300
R13: ffff888080588740 R14: ffff8880848ffa30 R15: ffff8880848ff8d8
FS: 0000000000cc0880(0000) GS:ffff8880ae200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000a8cd0000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

syzbot

unread,
Apr 7, 2021, 7:34:09 PM4/7/21
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit b8590c82b3ccf9fb4d9f0b0b097be10736869333
Author: Rustam Kovhaev <rkov...@gmail.com>
Date: Sun Nov 1 14:09:58 2020 +0000

reiserfs: add check for an invalid ih_entry_count

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=176d3fe9d00000
start commit: ad326970 Linux 4.19.152
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=1ec7667b405157e
dashboard link: https://syzkaller.appspot.com/bug?extid=9a0b21b8e095def1655c
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=176334ef900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10ab9fc8500000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: reiserfs: add check for an invalid ih_entry_count

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages