================================================================== BUG: KASAN: slab-out-of-bounds in bq_xmit_all+0x134/0x11d0 kernel/bpf/devmap.c:385 Read of size 8 at addr ffff88802e7e3590 by task syz.1.5221/24011 CPU: 1 UID: 0 PID: 24011 Comm: syz.1.5221 Not tainted 6.10.0-syzkaller-12381-gc33ffdb70cc6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 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 bq_xmit_all+0x134/0x11d0 kernel/bpf/devmap.c:385 __dev_flush+0x81/0x160 kernel/bpf/devmap.c:425 xdp_do_check_flushed+0x129/0x240 net/core/filter.c:4300 __napi_poll+0xe4/0x490 net/core/dev.c:6774 napi_poll net/core/dev.c:6840 [inline] net_rx_action+0x89b/0x1240 net/core/dev.c:6962 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:unwind_next_frame+0x1a80/0x2a00 arch/x86/kernel/unwind_orc.c:648 Code: e8 35 61 52 00 49 89 df 48 8b 2c 24 e9 f2 02 00 00 48 8b 7c 24 18 48 8d 5f 02 48 83 c7 03 48 89 d8 48 c1 e8 03 42 0f b6 04 28 <84> c0 0f 85 36 0e 00 00 48 89 f8 48 c1 e8 03 42 0f b6 04 28 84 c0 RSP: 0018:ffffc9000b6feec8 EFLAGS: 00000a07 RAX: 0000000000000000 RBX: ffffffff903cc76c RCX: 0000000000000000 RDX: 0000000000000003 RSI: ffffffff8e1a3320 RDI: ffffffff903cc76d RBP: ffffffff903cc76e R08: 0000000000000005 R09: ffffffff814120bf R10: 0000000000000003 R11: ffff88802b86bc00 R12: ffffc9000b6ff750 R13: dffffc0000000000 R14: ffffc9000b6feff0 R15: 1ffff920016dfdf4 arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 save_stack+0xfb/0x1f0 mm/page_owner.c:156 __reset_page_owner+0x75/0x3f0 mm/page_owner.c:297 reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_folios+0x100f/0x1ac0 mm/page_alloc.c:2656 folios_put_refs+0x76e/0x860 mm/swap.c:1039 free_pages_and_swap_cache+0x2ea/0x690 mm/swap_state.c:332 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x44f/0xc80 mm/mmap.c:3425 __mmput+0x115/0x380 kernel/fork.c:1345 exit_mm+0x220/0x310 kernel/exit.c:571 do_exit+0x9b2/0x27f0 kernel/exit.c:869 do_group_exit+0x207/0x2c0 kernel/exit.c:1031 get_signal+0x1695/0x1730 kernel/signal.c:2917 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f4e95375f19 Code: Unable to access opcode bytes at 0x7f4e95375eef. RSP: 002b:00007f4e961c40f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f4e95505f68 RCX: 00007f4e95375f19 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f4e95505f68 RBP: 00007f4e95505f60 R08: 00007f4e961c46c0 R09: 00007f4e961c46c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4e95505f6c R13: 000000000000000b R14: 00007fff82c72020 R15: 00007fff82c72108 Allocated by task 24005: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3988 [inline] slab_alloc_node mm/slub.c:4037 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4044 vm_area_alloc+0x24/0x1d0 kernel/fork.c:471 mmap_region+0xc3d/0x2090 mm/mmap.c:2944 do_mmap+0x8f9/0x1010 mm/mmap.c:1468 vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:588 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 The buggy address belongs to the object at ffff88802e7e34d8 which belongs to the cache vm_area_struct of size 184 The buggy address is located 0 bytes to the right of allocated 184-byte region [ffff88802e7e34d8, ffff88802e7e3590) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2e7e3 memcg:ffff88802baa2301 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000000 ffff888015eefb40 ffffea0000791a80 dead000000000004 raw: 0000000000000000 0000000000100010 00000001fdffffff ffff88802baa2301 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 4754, tgid 4754 (sh), ts 32059352634, free_ts 32056534124 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3438 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4696 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x5f/0x120 mm/slub.c:2321 allocate_slab+0x5a/0x2f0 mm/slub.c:2484 new_slab mm/slub.c:2537 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3723 __slab_alloc+0x58/0xa0 mm/slub.c:3813 __slab_alloc_node mm/slub.c:3866 [inline] slab_alloc_node mm/slub.c:4025 [inline] kmem_cache_alloc_noprof+0x1c1/0x2a0 mm/slub.c:4044 vm_area_alloc+0x24/0x1d0 kernel/fork.c:471 mmap_region+0xc3d/0x2090 mm/mmap.c:2944 do_mmap+0x8f9/0x1010 mm/mmap.c:1468 vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:588 elf_map fs/binfmt_elf.c:381 [inline] elf_load+0x153/0x6f0 fs/binfmt_elf.c:408 load_elf_interp+0x443/0xac0 fs/binfmt_elf.c:675 load_elf_binary+0x1a47/0x2680 fs/binfmt_elf.c:1235 search_binary_handler fs/exec.c:1821 [inline] exec_binprm fs/exec.c:1863 [inline] bprm_execve+0xaf8/0x1770 fs/exec.c:1914 page last free pid 4753 tgid 4753 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_folios+0x100f/0x1ac0 mm/page_alloc.c:2656 folios_put_refs+0x76e/0x860 mm/swap.c:1039 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x44f/0xc80 mm/mmap.c:3425 __mmput+0x115/0x380 kernel/fork.c:1345 exit_mm+0x220/0x310 kernel/exit.c:571 do_exit+0x9b2/0x27f0 kernel/exit.c:869 do_group_exit+0x207/0x2c0 kernel/exit.c:1031 __do_sys_exit_group kernel/exit.c:1042 [inline] __se_sys_exit_group kernel/exit.c:1040 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1040 x64_sys_call+0x26c3/0x26d0 arch/x86/include/generated/asm/syscalls_64.h:232 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: ffff88802e7e3480: 00 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 ffff88802e7e3500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802e7e3580: 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 ^ ffff88802e7e3600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802e7e3680: 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: e8 35 61 52 00 call 0x52613a 5: 49 89 df mov %rbx,%r15 8: 48 8b 2c 24 mov (%rsp),%rbp c: e9 f2 02 00 00 jmp 0x303 11: 48 8b 7c 24 18 mov 0x18(%rsp),%rdi 16: 48 8d 5f 02 lea 0x2(%rdi),%rbx 1a: 48 83 c7 03 add $0x3,%rdi 1e: 48 89 d8 mov %rbx,%rax 21: 48 c1 e8 03 shr $0x3,%rax 25: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax * 2a: 84 c0 test %al,%al <-- trapping instruction 2c: 0f 85 36 0e 00 00 jne 0xe68 32: 48 89 f8 mov %rdi,%rax 35: 48 c1 e8 03 shr $0x3,%rax 39: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax 3e: 84 c0 test %al,%al