BUG: unable to handle kernel NULL pointer dereference in __lookup_slow (2)

7 views
Skip to first unread message

syzbot

unread,
Apr 10, 2021, 6:21:19 PM4/10/21
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 830a059c Linux 4.19.186
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1572be6ad00000
kernel config: https://syzkaller.appspot.com/x/.config?x=7415cc95f9edb7b9
dashboard link: https://syzkaller.appspot.com/bug?extid=f871373fd0aaa3073617

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+f87137...@syzkaller.appspotmail.com

REISERFS (device loop3): journal params: device loop3, size 8192, journal first block 18, max trans len 256, max batch 225, max commit age 30, max trans age 30
REISERFS (device loop3): checking transaction log (loop3)
Bluetooth: hci3: command 0x0409 tx timeout
REISERFS (device loop3): Using rupasov hash to sort names
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
PGD 3d75e067 P4D 3d75e067 PUD 40e1b067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 20261 Comm: syz-executor.3 Not tainted 4.19.186-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:ffff88803594f8a8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff11006b29f18 RCX: ffffc90012db0000
RDX: 0000000000000000 RSI: ffff88809a982ce0 RDI: ffff8880472b9740
RBP: ffffffff8878d400 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff88809a982ce0
R13: ffff8880472b9740 R14: ffff88803594fa38 R15: ffff88803594f8e0
FS: 00007fab8e021700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000040e1a000 CR4: 00000000001426f0
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:970
reiserfs_fill_super+0x202c/0x2cf0 fs/reiserfs/super.c:2179
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 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+0x113c/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/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x46797a
Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fab8e020fa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 000000000046797a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fab8e021000
RBP: 00007fab8e021040 R08: 00007fab8e021040 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000
R13: 0000000020000100 R14: 00007fab8e021000 R15: 0000000020011200
Modules linked in:
CR2: 0000000000000000
---[ end trace 2e9385c10a3cd2a6 ]---
RIP: 0010: (null)
Code: Bad RIP value.
RSP: 0018:ffff88803594f8a8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff11006b29f18 RCX: ffffc90012db0000
RDX: 0000000000000000 RSI: ffff88809a982ce0 RDI: ffff8880472b9740
RBP: ffffffff8878d400 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff88809a982ce0
R13: ffff8880472b9740 R14: ffff88803594fa38 R15: ffff88803594f8e0
FS: 00007fab8e021700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000040e1a000 CR4: 00000000001426f0
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.

syzbot

unread,
Apr 10, 2021, 7:07:21 PM4/10/21
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 830a059c Linux 4.19.186
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15e7c4f9d00000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=134c5fced00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15f7b6fcd00000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f87137...@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
BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
PGD 96e65067 P4D 96e65067 PUD a9dc7067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8106 Comm: syz-executor839 Not tainted 4.19.186-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:ffff88809d6af8a8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff11013ad5f18 RCX: ffffffff81a4f39b
RDX: 0000000000000000 RSI: ffff88809a1f3e40 RDI: ffff88808948d740
RBP: ffffffff8878d400 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff88809a1f3e40
R13: ffff88808948d740 R14: ffff88809d6afa38 R15: ffff88809d6af8e0
FS: 0000000000c24300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000098035000 CR4: 00000000001406f0
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:970
reiserfs_fill_super+0x202c/0x2cf0 fs/reiserfs/super.c:2179
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 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+0x113c/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/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4451ea
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe34c0dd28 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffe34c0dd80 RCX: 00000000004451ea
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffe34c0dd40
RBP: 00007ffe34c0dd40 R08: 00007ffe34c0dd80 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000286 R12: 00000000200002a8
R13: 0000000000000003 R14: 0000000000000004 R15: 0000000000000007
Modules linked in:
CR2: 0000000000000000
---[ end trace e1709dbdba48f960 ]---
RIP: 0010: (null)
Code: Bad RIP value.
RSP: 0018:ffff88809d6af8a8 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff11013ad5f18 RCX: ffffffff81a4f39b
RDX: 0000000000000000 RSI: ffff88809a1f3e40 RDI: ffff88808948d740
RBP: ffffffff8878d400 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff88809a1f3e40
R13: ffff88808948d740 R14: ffff88809d6afa38 R15: ffff88809d6af8e0
FS: 0000000000c24300(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000098035000 CR4: 00000000001406f0

syzbot

unread,
Sep 11, 2021, 11:11:07 AM9/11/21
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit df2f583b63637f9f882ba604cf23e0336de82220
Author: Yu Kuai <yuk...@huawei.com>
Date: Fri Jul 2 04:07:43 2021 +0000

reiserfs: add check for root_inode in reiserfs_fill_super

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=14f900c3300000
start commit: 9f84340f012e Linux 4.19.196
git tree: linux-4.19.y
kernel config: https://syzkaller.appspot.com/x/.config?x=abf37bdf4eb59b8e
dashboard link: https://syzkaller.appspot.com/bug?extid=f871373fd0aaa3073617
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10435454300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17b657c2300000

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

#syz fix: reiserfs: add check for root_inode in reiserfs_fill_super

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