==================================================================
BUG: KASAN: stack-out-of-bounds in bpf_net_ctx_get_all_used_flush_lists include/linux/filter.h:837 [inline]
BUG: KASAN: stack-out-of-bounds in xdp_do_check_flushed+0x41c/0x4e0 net/core/filter.c:4305
Read of size 4 at addr ffffc9000467fa50 by task syz.3.1754/12206
CPU: 1 UID: 0 PID: 12206 Comm: syz.3.1754 Not tainted 6.11.0-rc1-syzkaller-00062-ge4fc196f5ba3 #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
bpf_net_ctx_get_all_used_flush_lists include/linux/filter.h:837 [inline]
xdp_do_check_flushed+0x41c/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:lock_acquire+0x1f2/0x560 kernel/locking/lockdep.c:5727
Code: c1 05 5a 14 9a 7e 83 f8 01 0f 85 ea 02 00 00 9c 58 f6 c4 02 0f 85 d5 02 00 00 48 85 ed 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24
RSP: 0018:ffffc9000467f518 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff920008cfea5 RCX: 0000000000000001
RDX: 0000000000000001 RSI: ffffffff8b4cc880 RDI: ffffffff8bb08480
RBP: 0000000000000200 R08: 0000000000000000 R09: fffffbfff28c50d8
R10: ffffffff946286c7 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffffffff8ddb52e0 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
rcu_read_lock_sched include/linux/rcupdate.h:930 [inline]
pfn_valid include/linux/mmzone.h:2024 [inline]
page_table_check_clear mm/page_table_check.c:70 [inline]
__page_table_check_pte_clear+0x1c0/0x580 mm/page_table_check.c:169
page_table_check_pte_clear include/linux/page_table_check.h:49 [inline]
ptep_get_and_clear_full arch/x86/include/asm/pgtable.h:1284 [inline]
get_and_clear_full_ptes include/linux/pgtable.h:678 [inline]
zap_present_folio_ptes mm/memory.c:1493 [inline]
zap_present_ptes mm/memory.c:1576 [inline]
zap_pte_range mm/memory.c:1618 [inline]
zap_pmd_range mm/memory.c:1736 [inline]
zap_pud_range mm/memory.c:1765 [inline]
zap_p4d_range mm/memory.c:1786 [inline]
unmap_page_range+0x21ac/0x3c10 mm/memory.c:1807
unmap_single_vma+0x194/0x2b0 mm/memory.c:1853
unmap_vmas+0x22f/0x490 mm/memory.c:1897
exit_mmap+0x1b8/0xb20 mm/mmap.c:3412
__mmput+0x12a/0x480 kernel/fork.c:1345
mmput+0x62/0x70 kernel/fork.c:1367
exit_mm kernel/exit.c:571 [inline]
do_exit+0x9bf/0x2bb0 kernel/exit.c:869
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:0x7ff35c9773b9
Code: Unable to access opcode bytes at 0x7ff35c97738f.
RSP: 002b:00007ff35d7c80f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007ff35cb05f88 RCX: 00007ff35c9773b9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007ff35cb05f88
RBP: 00007ff35cb05f80 R08: 00007ff35d7c86c0 R09: 00007ff35d7c86c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff35cb05f8c
R13: 000000000000000b R14: 00007ffe10c3ae70 R15: 00007ffe10c3af58
The buggy address belongs to stack of task syz.3.1754/12206
and is located at offset 24 in frame:
exit_mmap+0x0/0xb20 mm/mmap.c:3232
This frame has 2 objects:
[32, 96) 'vmi'
[128, 256) 'tlb'
The buggy address belongs to the virtual mapping at
[ffffc90004678000, ffffc90004681000) 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:0xffff88803c4f6600 pfn:0x3c4f0
memcg:ffff8880247e0602
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: ffff88803c4f6600 0000000000000000 00000001ffffffff ffff8880247e0602
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 64, tgid 64 (kworker/u32:3), ts 305290412900, free_ts 304774234767
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
user_mode_thread+0xb4/0xf0 kernel/fork.c:2859
call_usermodehelper_exec_work kernel/umh.c:172 [inline]
call_usermodehelper_exec_work+0xcb/0x170 kernel/umh.c:158
process_one_work+0x9c5/0x1b40 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xf20 kernel/workqueue.c:3390
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
page last free pid 5368 tgid 5368 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
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
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_node_noprof+0x153/0x310 mm/slub.c:4080
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:664
alloc_skb include/linux/skbuff.h:1320 [inline]
nlmsg_new include/net/netlink.h:1015 [inline]
genlmsg_new include/net/genetlink.h:608 [inline]
reset_per_cpu_data+0x26/0x240 net/core/drop_monitor.c:146
send_dm_alert+0x1e/0xf0 net/core/drop_monitor.c:197
process_one_work+0x9c5/0x1b40 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xf20 kernel/workqueue.c:3390
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 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:
ffffc9000467f900: 00 f2 f2 f2 00 f2 f2 f2 00 00 f2 f2 00 00 00 00
ffffc9000467f980: 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
>ffffc9000467fa00: 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00
^
ffffc9000467fa80: 00 00 00 f2 f2 f2 f2 00 00 00 00 00 00 00 00 00
ffffc9000467fb00: 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: c1 05 5a 14 9a 7e 83 roll $0x83,0x7e9a145a(%rip) # 0x7e9a1461
7: f8 clc
8: 01 0f add %ecx,(%rdi)
a: 85 ea test %ebp,%edx
c: 02 00 add (%rax),%al
e: 00 9c 58 f6 c4 02 0f add %bl,0xf02c4f6(%rax,%rbx,2)
15: 85 d5 test %edx,%ebp
17: 02 00 add (%rax),%al
19: 00 48 85 add %cl,-0x7b(%rax)
1c: ed in (%dx),%eax
1d: 74 01 je 0x20
1f: fb sti
20: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
27: fc ff df
* 2a: 48 01 c3 add %rax,%rbx <-- trapping instruction
2d: 48 c7 03 00 00 00 00 movq $0x0,(%rbx)
34: 48 c7 43 08 00 00 00 movq $0x0,0x8(%rbx)
3b: 00
3c: 48 rex.W
3d: 8b .byte 0x8b
3e: 84 .byte 0x84
3f: 24 .byte 0x24