================================================================== BUG: KASAN: stack-out-of-bounds in bq_xmit_all+0xbd8/0xdd0 kernel/bpf/devmap.c:385 Read of size 8 at addr ffffc9000351fae0 by task syz.3.772/8416 CPU: 1 UID: 0 PID: 8416 Comm: syz.3.772 Not tainted 6.11.0-rc1-syzkaller-00063-g21b136cc63d2 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 bq_xmit_all+0xbd8/0xdd0 kernel/bpf/devmap.c:385 __dev_flush+0x85/0x1e0 kernel/bpf/devmap.c:425 xdp_do_check_flushed+0x40a/0x4e0 net/core/filter.c:4307 __napi_poll.constprop.0+0xd1/0x550 net/core/dev.c:6774 napi_poll net/core/dev.c:6840 [inline] net_rx_action+0xa92/0x1010 net/core/dev.c:6962 handle_softirqs+0x216/0x8f0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 common_interrupt+0xb0/0xd0 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:26 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:173 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0xc/0x60 kernel/kcov.c:207 Code: c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 65 48 8b 15 c4 5f 79 7e <65> 8b 05 c5 5f 79 7e a9 00 01 ff 00 48 8b 34 24 74 0f f6 c4 01 74 RSP: 0018:ffffc9000351f9d8 EFLAGS: 00000293 RAX: 0000000000000000 RBX: ffff88804a575800 RCX: ffffffff8b000aee RDX: ffff88802af44880 RSI: ffffffff8b000f41 RDI: 0000000000000005 RBP: 0000000000000008 R08: 0000000000000005 R09: 0000000000000003 R10: 0000000000000001 R11: 0000000000000000 R12: ffff88804a575880 R13: 00007f3916601fff R14: ffffc9000351fb40 R15: ffffc9000351fb7d mas_next_slot+0x390/0x21d0 lib/maple_tree.c:4686 mas_find+0x2c6/0x530 lib/maple_tree.c:6065 vma_next include/linux/mm.h:993 [inline] acct_collect+0x671/0x8e0 kernel/acct.c:564 do_exit+0x1a20/0x2bb0 kernel/exit.c:861 do_group_exit+0xd3/0x2a0 kernel/exit.c:1031 get_signal+0x25fd/0x2770 kernel/signal.c:2917 arch_do_signal_or_restart+0x90/0x7e0 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+0x150/0x2a0 kernel/entry/common.c:218 do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f39175773b9 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:00007f39183bc0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f3917705f88 RCX: 00007f39175773b9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f3917705f88 RBP: 00007f3917705f80 R08: 00007f39183bc6c0 R09: 00007f39183bc6c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3917705f8c R13: 000000000000000b R14: 00007ffdd9e19c20 R15: 00007ffdd9e19d08 The buggy address belongs to stack of task syz.3.772/8416 and is located at offset 0 in frame: acct_collect+0x0/0x8e0 kernel/acct.c:318 This frame has 3 objects: [32, 40) 'utime' [64, 72) 'stime' [96, 160) 'vmi' The buggy address belongs to the virtual mapping at [ffffc90003518000, ffffc90003521000) created by: kernel_clone+0xfd/0x980 kernel/fork.c:2781 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888012e838b8 pfn:0x12e83 memcg:ffff888044da1682 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff888012e838b8 0000000000000000 00000001ffffffff ffff888044da1682 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 8415, tgid 8415 (syz.3.772), ts 161352592631, free_ts 161312476348 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3442 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4700 alloc_pages_mpol_noprof+0x275/0x610 mm/mempolicy.c:2263 vm_area_alloc_pages mm/vmalloc.c:3584 [inline] __vmalloc_area_node mm/vmalloc.c:3660 [inline] __vmalloc_node_range_noprof+0xa6a/0x1520 mm/vmalloc.c:3841 alloc_thread_stack_node kernel/fork.c:313 [inline] dup_task_struct kernel/fork.c:1113 [inline] copy_process+0x2f3b/0x8de0 kernel/fork.c:2204 kernel_clone+0xfd/0x980 kernel/fork.c:2781 __do_sys_clone3+0x1f5/0x270 kernel/fork.c:3085 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 39 tgid 39 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2612 __folio_put+0x31c/0x3e0 mm/swap.c:128 folio_put include/linux/mm.h:1486 [inline] free_page_and_swap_cache+0x249/0x2c0 mm/swap_state.c:308 __tlb_remove_table arch/x86/include/asm/tlb.h:34 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0x89/0xe0 mm/mmu_gather.c:282 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0x828/0x16b0 kernel/rcu/tree.c:2843 handle_softirqs+0x216/0x8f0 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:637 [inline] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 Memory state around the buggy address: ffffc9000351f980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000351fa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000351fa80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ^ ffffc9000351fb00: 00 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00 00 00 ffffc9000351fb80: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: c3 ret 1: cc int3 2: cc int3 3: cc int3 4: cc int3 5: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) c: 00 00 e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 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: f3 0f 1e fa endbr64 22: 65 48 8b 15 c4 5f 79 mov %gs:0x7e795fc4(%rip),%rdx # 0x7e795fee 29: 7e * 2a: 65 8b 05 c5 5f 79 7e mov %gs:0x7e795fc5(%rip),%eax # 0x7e795ff6 <-- trapping instruction 31: a9 00 01 ff 00 test $0xff0100,%eax 36: 48 8b 34 24 mov (%rsp),%rsi 3a: 74 0f je 0x4b 3c: f6 c4 01 test $0x1,%ah 3f: 74 .byte 0x74