[syzbot] BUG: unable to handle kernel paging request in alloc_huge_page

13 views
Skip to first unread message

syzbot

unread,
Aug 14, 2021, 7:07:24 AM8/14/21
to ak...@linux-foundation.org, linux-...@vger.kernel.org, linu...@kvack.org, mike.k...@oracle.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 92d00774360d Add linux-next specific files for 20210810
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=12e2b4d9300000
kernel config: https://syzkaller.appspot.com/x/.config?x=a6933fa6f9a86ca9
dashboard link: https://syzkaller.appspot.com/bug?extid=57876cfc2dca0c6b2e6a
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.1
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16f81581300000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11419dfa300000

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

BUG: unable to handle page fault for address: fffffffffffffffc
#PF: supervisor write access in kernel mode
#PF: error_code(0x0002) - not-present page
PGD b68f067 P4D b68f067 PUD b691067 PMD 0
Oops: 0002 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 6601 Comm: syz-executor361 Not tainted 5.14.0-rc5-next-20210810-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_add include/linux/list.h:71 [inline]
RIP: 0010:list_add include/linux/list.h:86 [inline]
RIP: 0010:alloc_huge_page+0xdcb/0x11b0 mm/hugetlb.c:2821
Code: 00 0f 85 6b 03 00 00 48 89 ce 48 89 4a 08 48 b8 00 00 00 00 00 fc ff df 48 c1 ee 03 80 3c 06 00 0f 85 2b 03 00 00 49 8d 7e 10 <49> 89 56 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80
RSP: 0018:ffffc90002b8fb78 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: 0000000000000001 RCX: fffffffffffffffc
RDX: ffffea0001fb0008 RSI: 1fffffffffffffff RDI: 0000000000000004
RBP: ffffc90002b8fd50 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff81b6fda1 R11: 0000000000000000 R12: ffffffff90246a70
R13: 0000000000000001 R14: fffffffffffffff4 R15: ffffffff90246b48
FS: 00000000014e5300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffffc CR3: 000000006eadf000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
hugetlbfs_fallocate+0x6f3/0x12e0 fs/hugetlbfs/inode.c:727
vfs_fallocate+0x48d/0xd80 fs/open.c:311
ksys_fallocate fs/open.c:334 [inline]
__do_sys_fallocate fs/open.c:342 [inline]
__se_sys_fallocate fs/open.c:340 [inline]
__x64_sys_fallocate+0xcf/0x140 fs/open.c:340
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x43fca9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 14 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffeb30e0858 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00000000000f4240 RCX: 000000000043fca9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000003fe R11: 0000000000000246 R12: 000000000001105c
R13: 00007ffeb30e087c R14: 00007ffeb30e0890 R15: 00007ffeb30e0880
Modules linked in:
CR2: fffffffffffffffc
---[ end trace ca76f32b4018d821 ]---
RIP: 0010:__list_add include/linux/list.h:71 [inline]
RIP: 0010:list_add include/linux/list.h:86 [inline]
RIP: 0010:alloc_huge_page+0xdcb/0x11b0 mm/hugetlb.c:2821
Code: 00 0f 85 6b 03 00 00 48 89 ce 48 89 4a 08 48 b8 00 00 00 00 00 fc ff df 48 c1 ee 03 80 3c 06 00 0f 85 2b 03 00 00 49 8d 7e 10 <49> 89 56 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80
RSP: 0018:ffffc90002b8fb78 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: 0000000000000001 RCX: fffffffffffffffc
RDX: ffffea0001fb0008 RSI: 1fffffffffffffff RDI: 0000000000000004
RBP: ffffc90002b8fd50 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff81b6fda1 R11: 0000000000000000 R12: ffffffff90246a70
R13: 0000000000000001 R14: fffffffffffffff4 R15: ffffffff90246b48
FS: 00000000014e5300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: fffffffffffffffc CR3: 000000006eadf000 CR4: 00000000001506f0
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 can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

Andrew Morton

unread,
Aug 14, 2021, 6:06:55 PM8/14/21
to syzbot, linux-...@vger.kernel.org, linu...@kvack.org, mike.k...@oracle.com, syzkall...@googlegroups.com
On Sat, 14 Aug 2021 04:07:23 -0700 syzbot <syzbot+57876c...@syzkaller.appspotmail.com> wrote:

> Hello,
>
> syzbot found the following issue on:

Thanks.

> HEAD commit: 92d00774360d Add linux-next specific files for 20210810
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=12e2b4d9300000
> kernel config: https://syzkaller.appspot.com/x/.config?x=a6933fa6f9a86ca9
> dashboard link: https://syzkaller.appspot.com/bug?extid=57876cfc2dca0c6b2e6a
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.1
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16f81581300000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11419dfa300000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+57876c...@syzkaller.appspotmail.com
>
> BUG: unable to handle page fault for address: fffffffffffffffc
> #PF: supervisor write access in kernel mode
> #PF: error_code(0x0002) - not-present page
> PGD b68f067 P4D b68f067 PUD b691067 PMD 0
> Oops: 0002 [#1] PREEMPT SMP KASAN
> CPU: 0 PID: 6601 Comm: syz-executor361 Not tainted 5.14.0-rc5-next-20210810-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> RIP: 0010:__list_add include/linux/list.h:71 [inline]
> RIP: 0010:list_add include/linux/list.h:86 [inline]
> RIP: 0010:alloc_huge_page+0xdcb/0x11b0 mm/hugetlb.c:2821

That appears to be

list_add(&page->lru, &h->hugepage_activelist);

I'm suspecting Mike's surplus page changes?

> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11419dfa300000

Nice to have that,

Matthew Wilcox

unread,
Aug 14, 2021, 7:26:07 PM8/14/21
to Andrew Morton, syzbot, linux-...@vger.kernel.org, linu...@kvack.org, mike.k...@oracle.com, syzkall...@googlegroups.com
On Sat, Aug 14, 2021 at 03:06:52PM -0700, Andrew Morton wrote:
> On Sat, 14 Aug 2021 04:07:23 -0700 syzbot <syzbot+57876c...@syzkaller.appspotmail.com> wrote:
> > HEAD commit: 92d00774360d Add linux-next specific files for 20210810
> > RIP: 0010:__list_add include/linux/list.h:71 [inline]
> > RIP: 0010:list_add include/linux/list.h:86 [inline]
> > RIP: 0010:alloc_huge_page+0xdcb/0x11b0 mm/hugetlb.c:2821
>
> That appears to be
>
> list_add(&page->lru, &h->hugepage_activelist);
>
> I'm suspecting Mike's surplus page changes?

Is this not the same as
https://lore.kernel.org/linux-mm/846c4502-3332-0d25...@quicinc.com/
which is already patched in your tree?

Mike Kravetz

unread,
Aug 15, 2021, 2:17:20 PM8/15/21
to Matthew Wilcox, Andrew Morton, syzbot, linux-...@vger.kernel.org, linu...@kvack.org, syzkall...@googlegroups.com
Yes, I believe it is the same, and already fixed. RCX: fffffffffffffffc
makes me 99.9% confident.

I can verify on Monday.
--
Mike Kravetz

Dmitry Vyukov

unread,
Aug 16, 2021, 3:48:04 AM8/16/21
to Mike Kravetz, Matthew Wilcox, Andrew Morton, syzbot, linux-...@vger.kernel.org, linu...@kvack.org, syzkall...@googlegroups.com
Let's tell syzbot about the fix:

#syz fix:
mm/hugetlb: Initialize page to NULL in alloc_buddy_huge_page_with_mpol()

Mike Kravetz

unread,
Aug 16, 2021, 1:01:05 PM8/16/21
to Dmitry Vyukov, Matthew Wilcox, Andrew Morton, syzbot, linux-...@vger.kernel.org, linu...@kvack.org, syzkall...@googlegroups.com
Thanks!

I verified and removed my .01% of doubt.
--
Mike Kravetz
Reply all
Reply to author
Forward
0 new messages