================================================================== BUG: KASAN: slab-out-of-bounds in bq_xmit_all+0x134/0x11d0 kernel/bpf/devmap.c:385 Read of size 8 at addr ffff88802eadcb60 by task syz.4.95/5524 CPU: 1 UID: 0 PID: 5524 Comm: syz.4.95 Not tainted 6.10.0-next-20240719-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __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 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 common_interrupt+0xaa/0xd0 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 RIP: 0010:get_current arch/x86/include/asm/current.h:49 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x8/0x70 kernel/kcov.c:206 Code: 8b 3d fc b9 4b 0c 48 89 de 5b e9 13 bb 5b 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 04 24 <65> 48 8b 0c 25 40 d7 03 00 65 8b 15 20 fe 6f 7e f7 c2 00 01 ff 00 RSP: 0018:ffffc9000c796ec0 EFLAGS: 00000202 RAX: ffffffff814125ab RBX: ffffc9000c798000 RCX: ffff888029475a00 RDX: ffff888029475a00 RSI: ffffc9000c7973a0 RDI: ffffc9000c7974c0 RBP: ffffc9000c796fa0 R08: ffffffff81412545 R09: ffffffff814120bf R10: 0000000000000003 R11: ffff888029475a00 R12: ffffc9000c7974c0 R13: dffffc0000000000 R14: ffffc9000c790000 R15: ffffc9000c7974c8 unwind_next_frame+0x1e5b/0x2a00 arch/x86/kernel/unwind_orc.c:665 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+0x76/0x430 mm/page_owner.c:297 reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1093 [inline] free_unref_folios+0x103a/0x1b00 mm/page_alloc.c:2691 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/0x390 kernel/fork.c:1347 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+0x16a1/0x1740 kernel/signal.c:2917 arch_do_signal_or_restart+0x96/0x830 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:0x7f3dd7f75b59 Code: Unable to access opcode bytes at 0x7f3dd7f75b2f. RSP: 002b:00007f3dd8d2c0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f3dd8105f68 RCX: 00007f3dd7f75b59 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f3dd8105f68 RBP: 00007f3dd8105f60 R08: 00007f3dd8d2c6c0 R09: 00007f3dd8d2c6c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3dd8105f6c R13: 000000000000000b R14: 00007fffdd341f70 R15: 00007fffdd342058 Allocated by task 5095: 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_dup+0x27/0x290 kernel/fork.c:487 __split_vma+0x1a9/0xc30 mm/mmap.c:2465 do_vmi_align_munmap+0x388/0x18c0 mm/mmap.c:2663 do_vma_munmap mm/mmap.c:3243 [inline] __do_sys_brk mm/mmap.c:280 [inline] __se_sys_brk+0x7d7/0xeb0 mm/mmap.c:219 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 ffff88802eadcaa8 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 [ffff88802eadcaa8, ffff88802eadcb60) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2eadc memcg:ffff888077c73f01 anon flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000000 ffff888015eefb40 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000001fdffffff ffff888077c73f01 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 5062, tgid 5062 (dhcpcd-run-hook), ts 46952750828, free_ts 43243700186 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1492 prep_new_page mm/page_alloc.c:1500 [inline] get_page_from_freelist+0x2ccb/0x2d80 mm/page_alloc.c:3473 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4731 __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_dup+0x27/0x290 kernel/fork.c:487 dup_mmap kernel/fork.c:696 [inline] dup_mm kernel/fork.c:1674 [inline] copy_mm+0xc7b/0x1f30 kernel/fork.c:1723 copy_process+0x186b/0x3d90 kernel/fork.c:2376 kernel_clone+0x226/0x8f0 kernel/fork.c:2788 __do_sys_clone kernel/fork.c:2931 [inline] __se_sys_clone kernel/fork.c:2915 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2915 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 4949 tgid 4949 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1093 [inline] free_unref_page+0xd22/0xea0 mm/page_alloc.c:2643 __folio_put+0x2c8/0x440 mm/swap.c:128 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_update_tail fs/pipe.c:224 [inline] pipe_read+0x6f2/0x13e0 fs/pipe.c:344 new_sync_read fs/read_write.c:395 [inline] vfs_read+0x9bd/0xbc0 fs/read_write.c:476 ksys_read+0x1a0/0x2c0 fs/read_write.c:619 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: ffff88802eadca00: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ffff88802eadca80: fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 >ffff88802eadcb00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ^ ffff88802eadcb80: fc fc fc fc 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802eadcc00: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc ================================================================== ---------------- Code disassembly (best guess): 0: 8b 3d fc b9 4b 0c mov 0xc4bb9fc(%rip),%edi # 0xc4bba02 6: 48 89 de mov %rbx,%rsi 9: 5b pop %rbx a: e9 13 bb 5b 00 jmp 0x5bbb22 f: 0f 1f 00 nopl (%rax) 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 90 nop 1f: 90 nop 20: 90 nop 21: 90 nop 22: f3 0f 1e fa endbr64 26: 48 8b 04 24 mov (%rsp),%rax * 2a: 65 48 8b 0c 25 40 d7 mov %gs:0x3d740,%rcx <-- trapping instruction 31: 03 00 33: 65 8b 15 20 fe 6f 7e mov %gs:0x7e6ffe20(%rip),%edx # 0x7e6ffe5a 3a: f7 c2 00 01 ff 00 test $0xff0100,%edx