BUG: kernel NULL pointer dereference, address: 000000000000003e
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 8000000021a06067 P4D 8000000021a06067 PUD 2a5b6067 PMD 0
Oops: Oops: 0010 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 5319 Comm: syz.2.3 Not tainted 6.11.0-rc5-next-20240827-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:0x3e
Code: Unable to access opcode bytes at 0x14.
RSP: 0018:ffffc90004047018 EFLAGS: 00010082
RAX: ffff8880b9128cec RBX: 0000000000000000 RCX: dffffc0000000000
RDX: ffffc9000a4fe000 RSI: 0000000000010984 RDI: 0000000000010985
RBP: ffffc900040471f8 R08: ffffffff8bc07606 R09: 0000000000000000
R10: ffffc90004047160 R11: fffff52000808e30 R12: 1ffff92000808e18
R13: dffffc0000000000 R14: 00000000000002ac R15: 0000000000000010
FS: 00007fc2a37936c0(0000) GS:ffff8880b9100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000000003e CR3: 000000002aea2000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
handle_page_fault arch/x86/mm/fault.c:1481 [inline]
exc_page_fault+0x5ed/0x8c0 arch/x86/mm/fault.c:1539
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 6970:kallsyms_seqs_of_names+0x23b145/0x4a3cf8
Code: 36 34 20 31 20 35 20 6f 6c 64 2e 69 20 38 30 20 34 20 38 20 76 61 6c 2e 61 64 64 72 00 31 20 33 32 20 31 20 33 20 6f 6c 64 00 <31> 20 33 32 20 38 20 33 20 6f 6c 64 00 70 76 5f 6c 6f 63 6b 5f 68
RSP: 0000:0000000000000046 EFLAGS: 00000008 ORIG_RAX: 0000000045e0360e
==================================================================
BUG: KASAN: stack-out-of-bounds in __show_regs+0xdc/0x610 arch/x86/kernel/process_64.c:83
Read of size 8 at addr ffffc900040472c0 by task syz.2.3/5319
CPU: 1 UID: 0 PID: 5319 Comm: syz.2.3 Not tainted 6.11.0-rc5-next-20240827-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
__show_regs+0xdc/0x610 arch/x86/kernel/process_64.c:83
show_trace_log_lvl+0x348/0x410 arch/x86/kernel/dumpstack.c:301
show_regs arch/x86/kernel/dumpstack.c:478 [inline]
__die_body+0x5f/0xb0 arch/x86/kernel/dumpstack.c:420
page_fault_oops+0x8e4/0xcc0 arch/x86/mm/fault.c:711
handle_page_fault arch/x86/mm/fault.c:1481 [inline]
exc_page_fault+0x5ed/0x8c0 arch/x86/mm/fault.c:1539
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0010:0x3e
Code: Unable to access opcode bytes at 0x14.
RSP: 0018:ffffc90004047018 EFLAGS: 00010082
RAX: ffff8880b9128cec RBX: 0000000000000000 RCX: dffffc0000000000
RDX: ffffc9000a4fe000 RSI: 0000000000010984 RDI: 0000000000010985
RBP: ffffc900040471f8 R08: ffffffff8bc07606 R09: 0000000000000000
R10: ffffc90004047160 R11: fffff52000808e30 R12: 1ffff92000808e18
R13: dffffc0000000000 R14: 00000000000002ac R15: 0000000000000010
</TASK>
The buggy address belongs to stack of task syz.2.3/5319
and is located at offset 0 in frame:
kvm_wait+0x0/0x2c0
This frame has 2 objects:
[32, 40) 'flags.i.i.i'
[64, 72) 'flags.i.i'
The buggy address belongs to the virtual mapping at
[ffffc90004040000, ffffc90004049000) created by:
copy_process+0x5d1/0x3d50 kernel/fork.c:2203
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888000000002 pfn:0x2baf3
memcg:ffff888142f92582
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: ffff888000000002 0000000000000000 00000001ffffffff ffff888142f92582
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 5313, tgid 5313 (syz.2.3), ts 58436212824, free_ts 58373390571
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1520
prep_new_page mm/page_alloc.c:1528 [inline]
get_page_from_freelist+0x312a/0x3270 mm/page_alloc.c:3479
__alloc_pages_noprof+0x29e/0x780 mm/page_alloc.c:4751
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265
vm_area_alloc_pages mm/vmalloc.c:3600 [inline]
__vmalloc_area_node mm/vmalloc.c:3669 [inline]
__vmalloc_node_range_noprof+0xa40/0x1400 mm/vmalloc.c:3850
alloc_thread_stack_node kernel/fork.c:314 [inline]
dup_task_struct+0x444/0x8c0 kernel/fork.c:1115
copy_process+0x5d1/0x3d50 kernel/fork.c:2203
kernel_clone+0x226/0x8f0 kernel/fork.c:2784
__do_sys_clone3 kernel/fork.c:3088 [inline]
__se_sys_clone3+0x2cb/0x350 kernel/fork.c:3067
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 4685 tgid 4685 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1101 [inline]
free_unref_page+0xc64/0xe80 mm/page_alloc.c:2654
__slab_free+0x31b/0x3d0 mm/slub.c:4436
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4040 [inline]
slab_alloc_node mm/slub.c:4089 [inline]
kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4096
getname_flags+0xb7/0x540 fs/namei.c:139
do_sys_openat2+0xd2/0x1d0 fs/open.c:1410
do_sys_open fs/open.c:1431 [inline]
__do_sys_openat fs/open.c:1447 [inline]
__se_sys_openat fs/open.c:1442 [inline]
__x64_sys_openat+0x247/0x2a0 fs/open.c:1442
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffffc90004047180: f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90004047200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90004047280: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2
^
ffffc90004047300: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90004047380: 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00
==================================================================