================================================================== 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:4298 Read of size 8 at addr ffffc900042dfa68 by task syz.0.1150/9056 CPU: 0 UID: 0 PID: 9056 Comm: syz.0.1150 Not tainted 6.10.0-syzkaller-11926-g539fbb912321 #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:4298 __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 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 RIP: 0010:lock_release+0x3e5/0x6f0 kernel/locking/lockdep.c:5767 Code: 7e 83 f8 01 0f 85 fd 01 00 00 9c 58 f6 c4 02 0f 85 e8 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 c7 43 08 00 00 00 00 48 8b 84 24 88 RSP: 0018:ffffc900042eed88 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 1ffff9200085ddb3 RCX: ffffc900042eedd8 RDX: 1ffff11004b6415a RSI: ffffffff8b2cd360 RDI: ffffffff8b908120 RBP: 94dc7234791a6449 R08: 0000000000000000 R09: fffffbfff1fcb413 R10: ffffffff8fe5a09f R11: 0000000000000000 R12: 0000000000000006 R13: 0000000000000007 R14: ffff888025b20ad8 R15: ffff888025b20000 rcu_lock_release include/linux/rcupdate.h:336 [inline] rcu_read_unlock include/linux/rcupdate.h:869 [inline] page_ext_put+0x43/0xd0 mm/page_ext.c:560 page_table_check_set mm/page_table_check.c:134 [inline] page_table_check_set+0x8fd/0x9d0 mm/page_table_check.c:102 __page_table_check_ptes_set+0x2d0/0x3e0 mm/page_table_check.c:225 page_table_check_ptes_set include/linux/page_table_check.h:74 [inline] set_ptes include/linux/pgtable.h:267 [inline] set_pte_range+0x30e/0x520 mm/memory.c:4806 filemap_map_order0_folio mm/filemap.c:3594 [inline] filemap_map_pages+0x50e/0x1440 mm/filemap.c:3644 do_fault_around mm/memory.c:5019 [inline] do_read_fault mm/memory.c:5052 [inline] do_fault mm/memory.c:5191 [inline] do_pte_missing mm/memory.c:3947 [inline] handle_pte_fault mm/memory.c:5522 [inline] __handle_mm_fault+0x3896/0x5360 mm/memory.c:5665 handle_mm_fault+0x435/0x770 mm/memory.c:5830 faultin_page mm/gup.c:1194 [inline] __get_user_pages+0x475/0x15c0 mm/gup.c:1493 __get_user_pages_locked mm/gup.c:1760 [inline] get_dump_page+0xfb/0x220 mm/gup.c:2278 dump_user_range+0x135/0x8a0 fs/coredump.c:952 elf_core_dump+0x2b4c/0x3d80 fs/binfmt_elf.c:2116 do_coredump+0x29f9/0x3dd0 fs/coredump.c:767 get_signal+0x237e/0x26e0 kernel/signal.c:2902 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] irqentry_exit_to_user_mode+0x13f/0x280 kernel/entry/common.c:231 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0023:0xf741e579 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:000000000000fd60 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000fd60 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000e80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the virtual mapping at [ffffc900042d8000, ffffc900042e1000) 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:0x6c03f memcg:ffff888020cddc02 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888020cddc02 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 9054, tgid 9054 (syz.0.1150), ts 234627976098, free_ts 234147126846 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 5155 tgid 5155 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 skb_free_frag include/linux/skbuff.h:3383 [inline] skb_free_head+0xa0/0x1d0 net/core/skbuff.c:1094 skb_release_data+0x75c/0x980 net/core/skbuff.c:1123 skb_release_all net/core/skbuff.c:1188 [inline] __kfree_skb+0x4f/0x70 net/core/skbuff.c:1202 tcp_rcv_established+0xd71/0x21c0 net/ipv4/tcp_input.c:6135 tcp_v4_do_rcv+0x5ca/0xa90 net/ipv4/tcp_ipv4.c:1909 sk_backlog_rcv include/net/sock.h:1111 [inline] __release_sock+0x31b/0x400 net/core/sock.c:3004 release_sock+0x5a/0x220 net/core/sock.c:3558 tcp_sendmsg+0x38/0x50 net/ipv4/tcp.c:1355 inet_sendmsg+0xb9/0x140 net/ipv4/af_inet.c:853 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] sock_write_iter+0x4b8/0x5c0 net/socket.c:1160 new_sync_write fs/read_write.c:497 [inline] vfs_write+0x6b6/0x1140 fs/read_write.c:590 ksys_write+0x1f8/0x260 fs/read_write.c:643 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 Memory state around the buggy address: ffffc900042df900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900042df980: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 >ffffc900042dfa00: f1 f1 04 f2 00 00 f2 f2 00 00 00 f3 f3 f3 f3 f3 ^ ffffc900042dfa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900042dfb00: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f2 ================================================================== ---------------- Code disassembly (best guess): 0: 7e 83 jle 0xffffff85 2: f8 clc 3: 01 0f add %ecx,(%rdi) 5: 85 fd test %edi,%ebp 7: 01 00 add %eax,(%rax) 9: 00 9c 58 f6 c4 02 0f add %bl,0xf02c4f6(%rax,%rbx,2) 10: 85 e8 test %ebp,%eax 12: 01 00 add %eax,(%rax) 14: 00 48 f7 add %cl,-0x9(%rax) 17: 04 24 add $0x24,%al 19: 00 02 add %al,(%rdx) 1b: 00 00 add %al,(%rax) 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: c7 43 08 00 00 00 00 movl $0x0,0x8(%rbx) 3b: 48 rex.W 3c: 8b .byte 0x8b 3d: 84 24 88 test %ah,(%rax,%rcx,4)