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

From: syzbot
Date: Sat Aug 14 2021 - 07:07:36 EST


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+57876cfc2dca0c6b2e6a@xxxxxxxxxxxxxxxxxxxxxxxxx

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 syzkaller@xxxxxxxxxxxxxxxx.

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