==================================================================
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+0x160/0x240 net/core/filter.c:4305
Read of size 8 at addr ffffc90004427820 by task syz.3.1995/13606
CPU: 0 UID: 0 PID: 13606 Comm: syz.3.1995 Not tainted 6.11.0-rc1-syzkaller-00043-g94ede2a3e913 #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
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+0x160/0x240 net/core/filter.c:4305
__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:rcu_dynticks_curr_cpu_in_eqs include/linux/context_tracking.h:122 [inline]
RIP: 0010:rcu_is_watching+0x17/0xb0 kernel/rcu/tree.c:726
Code: 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 53 65 ff 05 a8 36 8a 7e e8 3b 32 33 0a 89 c3 <83> f8 08 73 7a 49 bf 00 00 00 00 00 fc ff df 4c 8d 34 dd 40 da 07
RSP: 0018:ffffc90004427470 EFLAGS: 00000286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff888057945a00
RDX: ffff888057945a00 RSI: ffffffff8c3f9260 RDI: ffffffff8c3f9220
RBP: 0000000000000001 R08: ffffffff8202adf1 R09: 1ffffffff269d300
R10: dffffc0000000000 R11: fffffbfff269d301 R12: 0000000000102dc2
R13: 0000000000000001 R14: ffffffff8202adc0 R15: dffffc0000000000
rcu_read_lock include/linux/rcupdate.h:839 [inline]
page_ext_get+0x5a/0x2a0 mm/page_ext.c:535
__set_page_owner+0x9e/0x800 mm/page_owner.c:322
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:3442
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700
alloc_pages_mpol_noprof+0x3e8/0x680 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+0x971/0x1460 mm/vmalloc.c:3841
vmalloc_user_noprof+0x74/0x80 mm/vmalloc.c:3995
xskq_create+0xb6/0x170 net/xdp/xsk_queue.c:49
xsk_init_queue+0xa1/0x100 net/xdp/xsk.c:1017
xsk_setsockopt+0x4ea/0x950 net/xdp/xsk.c:1419
do_sock_setsockopt+0x3af/0x720 net/socket.c:2324
__sys_setsockopt+0x1ae/0x250 net/socket.c:2347
__do_sys_setsockopt net/socket.c:2356 [inline]
__se_sys_setsockopt net/socket.c:2353 [inline]
__x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2353
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
RIP: 0033:0x7fe1c3577299
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:00007fe1c433f048 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007fe1c3705f80 RCX: 00007fe1c3577299
RDX: 0000000000000005 RSI: 000000000000011b RDI: 0000000000000008
RBP: 00007fe1c35e48e6 R08: 000000000000002c R09: 0000000000000000
R10: 00000000200000c0 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fe1c3705f80 R15: 00007ffe3b4d2248
The buggy address belongs to stack of task syz.3.1995/13606
and is located at offset 0 in frame:
__alloc_pages_noprof+0x0/0x6c0
This frame has 3 objects:
[32, 36) 'alloc_flags'
[48, 52) 'alloc_gfp'
[64, 104) 'ac'
The buggy address belongs to the virtual mapping at
[ffffc90004420000, ffffc90004429000) created by:
copy_process+0x5d1/0x3dc0 kernel/fork.c:2204
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x8 pfn:0x5cc51
memcg:ffff88807a38c402
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000008 0000000000000000 00000001ffffffff ffff88807a38c402
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 2, tgid 2 (kthreadd), ts 617955403931, free_ts 615300314861
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:3442
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700
alloc_pages_mpol_noprof+0x3e8/0x680 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+0x971/0x1460 mm/vmalloc.c:3841
alloc_thread_stack_node kernel/fork.c:313 [inline]
dup_task_struct+0x444/0x8c0 kernel/fork.c:1113
copy_process+0x5d1/0x3dc0 kernel/fork.c:2204
kernel_clone+0x223/0x870 kernel/fork.c:2781
kernel_thread+0x1bc/0x240 kernel/fork.c:2843
create_kthread kernel/kthread.c:412 [inline]
kthreadd+0x60d/0x810 kernel/kthread.c:765
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
page last free pid 13260 tgid 13260 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1094 [inline]
free_unref_page+0xd19/0xea0 mm/page_alloc.c:2612
__slab_free+0x31b/0x3d0 mm/slub.c:4384
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x23/0x80 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]
__do_kmalloc_node mm/slub.c:4157 [inline]
__kmalloc_node_track_caller_noprof+0x1cd/0x440 mm/slub.c:4177
kstrdup+0x3a/0x80 mm/util.c:64
kobject_set_name_vargs+0x61/0x120 lib/kobject.c:274
dev_set_name+0xd5/0x120 drivers/base/core.c:3482
netdev_register_kobject+0xb7/0x320 net/core/net-sysfs.c:2123
register_netdevice+0x12c5/0x1b00 net/core/dev.c:10435
__ip_tunnel_create+0x2b4/0x380 net/ipv4/ip_tunnel.c:266
ip_tunnel_init_net+0x21c/0x710 net/ipv4/ip_tunnel.c:1159
ops_init+0x359/0x610 net/core/net_namespace.c:139
setup_net+0x515/0xca0 net/core/net_namespace.c:343
copy_net_ns+0x4e2/0x7b0 net/core/net_namespace.c:508
Memory state around the buggy address:
ffffc90004427700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90004427780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90004427800: 00 00 00 00 f1 f1 f1 f1 04 f2 04 f2 00 00 00 00
^
ffffc90004427880: 00 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00
ffffc90004427900: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 40 00 90 90 90 90 90 rex add %dl,-0x6f6f6f70(%rax)
7: 90 nop
8: 90 nop
9: 90 nop
a: 90 nop
b: 90 nop
c: 90 nop
d: 90 nop
e: 90 nop
f: 90 nop
10: 90 nop
11: 90 nop
12: f3 0f 1e fa endbr64
16: 41 57 push %r15
18: 41 56 push %r14
1a: 53 push %rbx
1b: 65 ff 05 a8 36 8a 7e incl %gs:0x7e8a36a8(%rip) # 0x7e8a36ca
22: e8 3b 32 33 0a call 0xa333262
27: 89 c3 mov %eax,%ebx
* 29: 83 f8 08 cmp $0x8,%eax <-- trapping instruction
2c: 73 7a jae 0xa8
2e: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15
35: fc ff df
38: 4c rex.WR
39: 8d .byte 0x8d
3a: 34 dd xor $0xdd,%al
3c: 40 da 07 rex fiaddl (%rdi)