linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: unable to handle kernel NULL pointer dereference in __lookup_slow
@ 2020-09-28  7:36 syzbot
  2020-12-10  4:34 ` syzbot
  2021-01-09  7:20 ` syzbot
  0 siblings, 2 replies; 4+ messages in thread
From: syzbot @ 2020-09-28  7:36 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel, syzkaller-bugs, viro

Hello,

syzbot found the following issue on:

HEAD commit:    7c7ec322 Merge tag 'for-linus' of git://git.kernel.org/pub..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17289773900000
kernel config:  https://syzkaller.appspot.com/x/.config?x=240e2ebab67245c7
dashboard link: https://syzkaller.appspot.com/bug?extid=3db80bbf66b88d68af9d
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+3db80bbf66b88d68af9d@syzkaller.appspotmail.com

REISERFS (device loop1): Using r5 hash to sort names
REISERFS (device loop1): using 3.5.x disk format
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD a7454067 P4D a7454067 PUD 93380067 PMD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9128 Comm: syz-executor.1 Not tainted 5.9.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffffc90008bbf910 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff92001177f25 RCX: ffffc9000aad7000
RDX: 0000000000000000 RSI: ffff888085c9f330 RDI: ffff88804358f7e0
RBP: ffffffff889c4280 R08: 0000000000000001 R09: ffffffff8d461a7f
R10: 0000000000000000 R11: 000000000005f088 R12: ffff888085c9f330
R13: ffff88804358f7e0 R14: ffffc90008bbfaa0 R15: ffffc90008bbf948
FS:  00007f6bb6cc7700(0000) GS:ffff8880ae400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000a75b9000 CR4: 00000000001526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __lookup_slow+0x24c/0x480 fs/namei.c:1544
 lookup_one_len+0x163/0x190 fs/namei.c:2562
 reiserfs_lookup_privroot+0x92/0x280 fs/reiserfs/xattr.c:972
 reiserfs_fill_super+0x211b/0x2df3 fs/reiserfs/super.c:2176
 mount_bdev+0x32e/0x3f0 fs/super.c:1417
 legacy_get_tree+0x105/0x220 fs/fs_context.c:592
 vfs_get_tree+0x89/0x2f0 fs/super.c:1547
 do_new_mount fs/namespace.c:2875 [inline]
 path_mount+0x1387/0x20a0 fs/namespace.c:3192
 do_mount fs/namespace.c:3205 [inline]
 __do_sys_mount fs/namespace.c:3413 [inline]
 __se_sys_mount fs/namespace.c:3390 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3390
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x460bca
Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 dd 87 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 ba 87 fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007f6bb6cc6a88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f6bb6cc6b20 RCX: 0000000000460bca
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007f6bb6cc6ae0
RBP: 00007f6bb6cc6ae0 R08: 00007f6bb6cc6b20 R09: 0000000020000000
R10: 0000000000a04850 R11: 0000000000000202 R12: 0000000020000000
R13: 0000000020000100 R14: 0000000020000200 R15: 0000000020000040
Modules linked in:
CR2: 0000000000000000
---[ end trace 79d7e2c3db21cbd3 ]---
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffffc90008bbf910 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 1ffff92001177f25 RCX: ffffc9000aad7000
RDX: 0000000000000000 RSI: ffff888085c9f330 RDI: ffff88804358f7e0
RBP: ffffffff889c4280 R08: 0000000000000001 R09: ffffffff8d461a7f
R10: 0000000000000000 R11: 000000000005f088 R12: ffff888085c9f330
R13: ffff88804358f7e0 R14: ffffc90008bbfaa0 R15: ffffc90008bbf948
FS:  00007f6bb6cc7700(0000) GS:ffff8880ae500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000558411c291f8 CR3: 00000000a75b9000 CR4: 00000000001526e0
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 syzkaller@googlegroups.com.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BUG: unable to handle kernel NULL pointer dereference in __lookup_slow
  2020-09-28  7:36 BUG: unable to handle kernel NULL pointer dereference in __lookup_slow syzbot
@ 2020-12-10  4:34 ` syzbot
  2021-01-09  7:20 ` syzbot
  1 sibling, 0 replies; 4+ messages in thread
From: syzbot @ 2020-12-10  4:34 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel, syzkaller-bugs, viro

syzbot has found a reproducer for the following issue on:

HEAD commit:    a68a0262 mm/madvise: remove racy mm ownership check
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15b36097500000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e597c2b53c984cd8
dashboard link: https://syzkaller.appspot.com/bug?extid=3db80bbf66b88d68af9d
compiler:       clang version 11.0.0 (https://github.com/llvm/llvm-project.git ca2dcbd030eadbf0aa9b660efe864ff08af6e18b)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1737b8a7500000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1697246b500000

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

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: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 1d5b1067 P4D 1d5b1067 PUD 13a4d067 PMD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 8464 Comm: syz-executor889 Not tainted 5.10.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc900015ffa10 EFLAGS: 00010246
RAX: 1ffffffff13857c8 RBX: dffffc0000000000 RCX: ffff8880152c8000
RDX: 0000000000000000 RSI: ffff88802e27dbe8 RDI: ffff888034c90190
RBP: ffffffff89c2be40 R08: ffffffff81c397ee R09: fffffbfff1eabc57
R10: fffffbfff1eabc57 R11: 0000000000000000 R12: 0000000000000000
R13: ffff888034c90190 R14: 1ffff11005c4fb7d R15: ffff88802e27dbe8
FS:  00000000023f0880(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000012d42000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __lookup_slow+0x240/0x370 fs/namei.c:1544
 lookup_one_len+0x10e/0x200 fs/namei.c:2563
 reiserfs_lookup_privroot+0x85/0x1e0 fs/reiserfs/xattr.c:979
 reiserfs_fill_super+0x2a57/0x3140 fs/reiserfs/super.c:2176
 mount_bdev+0x24f/0x360 fs/super.c:1419
 legacy_get_tree+0xea/0x180 fs/fs_context.c:592
 vfs_get_tree+0x88/0x270 fs/super.c:1549
 do_new_mount fs/namespace.c:2875 [inline]
 path_mount+0x17b4/0x2a20 fs/namespace.c:3205
 do_mount fs/namespace.c:3218 [inline]
 __do_sys_mount fs/namespace.c:3426 [inline]
 __se_sys_mount+0x28c/0x320 fs/namespace.c:3403
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x44707a
Code: b8 08 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 fd ad 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 da ad fb ff c3 66 0f 1f 84 00 00 00 00 00
RSP: 002b:00007ffc217e9828 EFLAGS: 00000297 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc217e9880 RCX: 000000000044707a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007ffc217e9840
RBP: 00007ffc217e9840 R08: 00007ffc217e9880 R09: 00007ffc00000015
R10: 0000000000000000 R11: 0000000000000297 R12: 0000000000000006
R13: 0000000000000004 R14: 0000000000000003 R15: 0000000000000003
Modules linked in:
CR2: 0000000000000000
---[ end trace f20ed6d33f177882 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc900015ffa10 EFLAGS: 00010246
RAX: 1ffffffff13857c8 RBX: dffffc0000000000 RCX: ffff8880152c8000
RDX: 0000000000000000 RSI: ffff88802e27dbe8 RDI: ffff888034c90190
RBP: ffffffff89c2be40 R08: ffffffff81c397ee R09: fffffbfff1eabc57
R10: fffffbfff1eabc57 R11: 0000000000000000 R12: 0000000000000000
R13: ffff888034c90190 R14: 1ffff11005c4fb7d R15: ffff88802e27dbe8
FS:  00000000023f0880(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000012d42000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BUG: unable to handle kernel NULL pointer dereference in __lookup_slow
  2020-09-28  7:36 BUG: unable to handle kernel NULL pointer dereference in __lookup_slow syzbot
  2020-12-10  4:34 ` syzbot
@ 2021-01-09  7:20 ` syzbot
  2021-01-11 11:14   ` Dmitry Vyukov
  1 sibling, 1 reply; 4+ messages in thread
From: syzbot @ 2021-01-09  7:20 UTC (permalink / raw)
  To: jack, linux-fsdevel, linux-kernel, rkovhaev, syzkaller-bugs, viro

syzbot suspects this issue was fixed by commit:

commit d24396c5290ba8ab04ba505176874c4e04a2d53c
Author: Rustam Kovhaev <rkovhaev@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=111480e7500000
start commit:   a68a0262 mm/madvise: remove racy mm ownership check
git tree:       upstream
kernel config:  https://syzkaller.appspot.com/x/.config?x=e597c2b53c984cd8
dashboard link: https://syzkaller.appspot.com/bug?extid=3db80bbf66b88d68af9d
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1737b8a7500000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1697246b500000

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BUG: unable to handle kernel NULL pointer dereference in __lookup_slow
  2021-01-09  7:20 ` syzbot
@ 2021-01-11 11:14   ` Dmitry Vyukov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Vyukov @ 2021-01-11 11:14 UTC (permalink / raw)
  To: syzbot; +Cc: Jan Kara, linux-fsdevel, LKML, rkovhaev, syzkaller-bugs, Al Viro

On Sat, Jan 9, 2021 at 8:20 AM syzbot
<syzbot+3db80bbf66b88d68af9d@syzkaller.appspotmail.com> wrote:
>
> syzbot suspects this issue was fixed by commit:
>
> commit d24396c5290ba8ab04ba505176874c4e04a2d53c
> Author: Rustam Kovhaev <rkovhaev@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=111480e7500000
> start commit:   a68a0262 mm/madvise: remove racy mm ownership check
> git tree:       upstream
> kernel config:  https://syzkaller.appspot.com/x/.config?x=e597c2b53c984cd8
> dashboard link: https://syzkaller.appspot.com/bug?extid=3db80bbf66b88d68af9d
> syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1737b8a7500000
> C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1697246b500000
>
> 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

Looks realistic.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-11 11:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-28  7:36 BUG: unable to handle kernel NULL pointer dereference in __lookup_slow syzbot
2020-12-10  4:34 ` syzbot
2021-01-09  7:20 ` syzbot
2021-01-11 11:14   ` Dmitry Vyukov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).