==================================================================
BUG: KASAN: stack-out-of-bounds in list_empty include/linux/list.h:373 [inline]
BUG: KASAN: stack-out-of-bounds in bpf_net_ctx_get_all_used_flush_lists include/linux/filter.h:855 [inline]
BUG: KASAN: stack-out-of-bounds in xdp_do_check_flushed+0x47c/0x4e0 net/core/filter.c:4305
Read of size 8 at addr ffffc9000329fa68 by task syz.3.32/5503
CPU: 2 UID: 0 PID: 5503 Comm: syz.3.32 Not tainted 6.10.0-syzkaller-12562-g1722389b0d86 #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
list_empty include/linux/list.h:373 [inline]
bpf_net_ctx_get_all_used_flush_lists include/linux/filter.h:855 [inline]
xdp_do_check_flushed+0x47c/0x4e0 net/core/filter.c:4305
__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:__sanitizer_cov_trace_pc+0x4c/0x60 kernel/kcov.c:213
Code: 35 8b 82 1c 16 00 00 85 c0 74 2b 8b 82 f8 15 00 00 83 f8 02 75 20 48 8b 8a 00 16 00 00 8b 92 fc 15 00 00 48 8b 01 48 83 c0 01 <48> 39 d0 73 07 48 89 01 48 89 34 c1 c3 cc cc cc cc 0f 1f 00 90 90
RSP: 0018:ffffc9000329ed90 EFLAGS: 00000206
RAX: 0000000000001488 RBX: ffffc9000329ee70 RCX: ffffc9000c001000
RDX: 0000000000040000 RSI: ffffffff813c94e6 RDI: 0000000000000001
RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000009
R10: 0000000000000004 R11: dffffc0000000000 R12: ffffffff909e8210
R13: 0000000000000004 R14: ffffffff909e8214 R15: ffffc9000329eea5
unwind_next_frame+0x16d6/0x23a0 arch/x86/kernel/unwind_orc.c:521
__unwind_start arch/x86/kernel/unwind_orc.c:760 [inline]
__unwind_start+0x57e/0x850 arch/x86/kernel/unwind_orc.c:685
unwind_start arch/x86/include/asm/unwind.h:64 [inline]
arch_stack_walk+0xb2/0x170 arch/x86/kernel/stacktrace.c:24
stack_trace_save+0x95/0xd0 kernel/stacktrace.c:122
save_stack+0x162/0x1f0 mm/page_owner.c:156
__set_page_owner+0x8f/0x790 mm/page_owner.c:320
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:3438
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4696
alloc_pages_bulk_noprof+0x742/0x14f0 mm/page_alloc.c:4644
alloc_pages_bulk_array_mempolicy_noprof+0x25b/0x1220 mm/mempolicy.c:2554
vm_area_alloc_pages mm/vmalloc.c:3550 [inline]
__vmalloc_area_node mm/vmalloc.c:3660 [inline]
__vmalloc_node_range_noprof+0x550/0x1520 mm/vmalloc.c:3841
__vmalloc_node_noprof mm/vmalloc.c:3906 [inline]
__vmalloc_noprof+0x6d/0x90 mm/vmalloc.c:3920
bpf_prog_alloc_no_stats+0x54/0x5e0 kernel/bpf/core.c:104
bpf_prog_alloc+0x3b/0x240 kernel/bpf/core.c:145
bpf_prog_load+0x1b4e/0x2670 kernel/bpf/syscall.c:2818
__sys_bpf+0x9e0/0x5600 kernel/bpf/syscall.c:5710
__do_sys_bpf kernel/bpf/syscall.c:5817 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5815 [inline]
__ia32_sys_bpf+0x76/0xe0 kernel/bpf/syscall.c:5815
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386
do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf748e579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f57a657c EFLAGS: 00000292 ORIG_RAX: 0000000000000165
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00000000200000c0
RDX: 0000000000000090 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
The buggy address belongs to stack of task syz.3.32/5503
and is located at offset 8 in frame:
bpf_prog_load+0x0/0x2670 kernel/bpf/syscall.c:2408
This frame has 4 objects:
[48, 52) 'err'
[64, 72) 'prog'
[96, 112) 'uattr'
[128, 256) 'license'
The buggy address belongs to the virtual mapping at
[ffffc90003298000, ffffc900032a1000) 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:0x0 pfn:0x29fa3
memcg:ffff88802b72e682
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88802b72e682
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 5449, tgid 5449 (syz.3.15), ts 62728418893, free_ts 62711876382
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:3438
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4696
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+0x29f5/0x6f50 kernel/fork.c:2204
kernel_clone+0xfd/0x980 kernel/fork.c:2781
__do_sys_clone3+0x1f5/0x270 kernel/fork.c:3085
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
do_int80_emulation+0x104/0x200 arch/x86/entry/common.c:253
asm_int80_emulation+0x1a/0x20 arch/x86/include/asm/idtentry.h:626
page last free pid 4835 tgid 4835 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:2608
__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:
ffffc9000329f900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000329f980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000329fa00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
^
ffffc9000329fa80: f1 f1 04 f2 00 f2 f2 f2 00 00 f2 f2 00 00 00 00
ffffc9000329fb00: 00 00 00 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3
==================================================================
----------------
Code disassembly (best guess):
0: 35 8b 82 1c 16 xor $0x161c828b,%eax
5: 00 00 add %al,(%rax)
7: 85 c0 test %eax,%eax
9: 74 2b je 0x36
b: 8b 82 f8 15 00 00 mov 0x15f8(%rdx),%eax
11: 83 f8 02 cmp $0x2,%eax
14: 75 20 jne 0x36
16: 48 8b 8a 00 16 00 00 mov 0x1600(%rdx),%rcx
1d: 8b 92 fc 15 00 00 mov 0x15fc(%rdx),%edx
23: 48 8b 01 mov (%rcx),%rax
26: 48 83 c0 01 add $0x1,%rax
* 2a: 48 39 d0 cmp %rdx,%rax <-- trapping instruction
2d: 73 07 jae 0x36
2f: 48 89 01 mov %rax,(%rcx)
32: 48 89 34 c1 mov %rsi,(%rcx,%rax,8)
36: c3 ret
37: cc int3
38: cc int3
39: cc int3
3a: cc int3
3b: 0f 1f 00 nopl (%rax)
3e: 90 nop
3f: 90 nop