================================================================== BUG: KASAN: vmalloc-out-of-bounds in vrealloc_noprof+0x294/0x2c0 mm/vmalloc.c:4079 Write of size 2097120 at addr ffffc90006800020 by task syz.4.19/5551 CPU: 0 UID: 0 PID: 5551 Comm: syz.4.19 Not tainted 6.12.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x108/0x280 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 kasan_check_range+0x282/0x290 mm/kasan/generic.c:189 __asan_memset+0x23/0x50 mm/kasan/shadow.c:84 vrealloc_noprof+0x294/0x2c0 mm/vmalloc.c:4079 push_insn_history kernel/bpf/verifier.c:3571 [inline] check_stack_write_fixed_off kernel/bpf/verifier.c:4807 [inline] check_stack_write+0x2a7b/0x3d80 kernel/bpf/verifier.c:5246 check_mem_access+0x12b8/0x2050 kernel/bpf/verifier.c:7267 do_check+0x7158/0xd5c0 kernel/bpf/verifier.c:18703 do_check_common+0x1341/0x1d10 kernel/bpf/verifier.c:21848 do_check_main kernel/bpf/verifier.c:21939 [inline] bpf_check+0x6748/0x1db10 kernel/bpf/verifier.c:22656 bpf_prog_load+0x1214/0x1de0 kernel/bpf/syscall.c:2946 __sys_bpf+0x3f6/0x650 kernel/bpf/syscall.c:5759 __do_sys_bpf kernel/bpf/syscall.c:5866 [inline] __se_sys_bpf kernel/bpf/syscall.c:5864 [inline] __x64_sys_bpf+0x77/0x90 kernel/bpf/syscall.c:5864 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8d/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f365db7e819 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f365ea19038 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f365dd35fa0 RCX: 00007f365db7e819 RDX: 0000000000000090 RSI: 0000000020000840 RDI: 0000000000000005 RBP: 00007f365dbf175e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f365dd35fa0 R15: 00007ffe7c788948 The buggy address belongs to the virtual mapping at [ffffc90006400000, ffffc90006a01000) created by: push_insn_history kernel/bpf/verifier.c:3571 [inline] check_stack_write_fixed_off kernel/bpf/verifier.c:4807 [inline] check_stack_write+0x2a7b/0x3d80 kernel/bpf/verifier.c:5246 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x65400 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102cc2(GFP_HIGHUSER|__GFP_NOWARN), pid 5551, tgid 5546 (syz.4.19), ts 113887423751, free_ts 7029893823 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x10f/0x130 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0x3246/0x3390 mm/page_alloc.c:3474 __alloc_pages_noprof+0x256/0x650 mm/page_alloc.c:4750 alloc_pages_mpol_noprof+0x289/0x4e0 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3568 [inline] __vmalloc_area_node mm/vmalloc.c:3646 [inline] __vmalloc_node_range_noprof+0x68f/0xfd0 mm/vmalloc.c:3828 __kvmalloc_node_noprof mm/util.c:680 [inline] kvrealloc_noprof+0x142/0x190 mm/util.c:755 push_insn_history kernel/bpf/verifier.c:3571 [inline] check_stack_write_fixed_off kernel/bpf/verifier.c:4807 [inline] check_stack_write+0x2a7b/0x3d80 kernel/bpf/verifier.c:5246 check_mem_access+0x12b8/0x2050 kernel/bpf/verifier.c:7267 do_check+0x7158/0xd5c0 kernel/bpf/verifier.c:18703 do_check_common+0x1341/0x1d10 kernel/bpf/verifier.c:21848 do_check_main kernel/bpf/verifier.c:21939 [inline] bpf_check+0x6748/0x1db10 kernel/bpf/verifier.c:22656 bpf_prog_load+0x1214/0x1de0 kernel/bpf/syscall.c:2946 __sys_bpf+0x3f6/0x650 kernel/bpf/syscall.c:5759 __do_sys_bpf kernel/bpf/syscall.c:5866 [inline] __se_sys_bpf kernel/bpf/syscall.c:5864 [inline] __x64_sys_bpf+0x77/0x90 kernel/bpf/syscall.c:5864 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x8d/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0xc5d/0xf40 mm/page_alloc.c:2657 free_contig_range+0x142/0x4c0 mm/page_alloc.c:6765 destroy_args+0x72/0x6e0 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x3c2/0x5e0 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x196/0x4d0 init/main.c:1269 do_initcall_level+0x11e/0x1e0 init/main.c:1331 do_initcalls+0x3e/0x70 init/main.c:1347 kernel_init_freeable+0x36a/0x4c0 init/main.c:1580 kernel_init+0x18/0x1b0 init/main.c:1469 ret_from_fork+0x32/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffffc900067fff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900067fff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90006800000: 00 00 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ^ ffffc90006800080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ffffc90006800100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 ==================================================================