TCP: request_sock_TCP: Possible SYN flooding on port [::]:20002. Sending cookies. ================================================================== 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 ffffc9000338fa78 by task syz.3.4005/20308 CPU: 0 UID: 0 PID: 20308 Comm: syz.3.4005 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 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:455 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:442 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:382 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:908 [inline] __dev_queue_xmit+0x882/0x4300 net/core/dev.c:4450 dev_queue_xmit include/linux/netdevice.h:3105 [inline] neigh_hh_output include/net/neighbour.h:526 [inline] neigh_output include/net/neighbour.h:540 [inline] ip_finish_output2+0x16fe/0x25e0 net/ipv4/ip_output.c:235 __ip_finish_output net/ipv4/ip_output.c:313 [inline] __ip_finish_output+0x49e/0x950 net/ipv4/ip_output.c:295 ip_finish_output+0x31/0x310 net/ipv4/ip_output.c:323 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0x13b/0x2a0 net/ipv4/ip_output.c:433 dst_output include/net/dst.h:450 [inline] ip_local_out+0x33e/0x4a0 net/ipv4/ip_output.c:129 __ip_queue_xmit+0x747/0x1940 net/ipv4/ip_output.c:535 __tcp_transmit_skb+0x2a4c/0x3dc0 net/ipv4/tcp_output.c:1466 __tcp_send_ack.part.0+0x390/0x720 net/ipv4/tcp_output.c:4268 __tcp_send_ack net/ipv4/tcp_output.c:4274 [inline] tcp_send_ack+0x82/0xa0 net/ipv4/tcp_output.c:4274 tcp_rcv_synsent_state_process net/ipv4/tcp_input.c:6537 [inline] tcp_rcv_state_process+0x4332/0x4f30 net/ipv4/tcp_input.c:6724 tcp_v4_do_rcv+0x1ad/0xa90 net/ipv4/tcp_ipv4.c:1932 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 mptcp_connect+0xabd/0xd20 net/mptcp/protocol.c:3773 __inet_stream_connect+0x3c7/0x1020 net/ipv4/af_inet.c:679 inet_stream_connect+0x57/0xa0 net/ipv4/af_inet.c:750 __sys_connect_file+0x15f/0x1a0 net/socket.c:2061 __sys_connect+0x149/0x170 net/socket.c:2078 __do_sys_connect net/socket.c:2088 [inline] __se_sys_connect net/socket.c:2085 [inline] __x64_sys_connect+0x72/0xb0 net/socket.c:2085 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 RIP: 0033:0x7f97dfd773b9 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:00007f97e0ac1048 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007f97dff05f80 RCX: 00007f97dfd773b9 RDX: 0000000000000010 RSI: 0000000020000000 RDI: 0000000000000008 RBP: 00007f97dfde48e6 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f97dff05f80 R15: 00007fffc4ec1ca8 The buggy address belongs to stack of task syz.3.4005/20308 and is located at offset 104 in frame: tcp_rcv_state_process+0x0/0x4f30 include/net/tcp.h:1649 This frame has 3 objects: [48, 49) 'req_stolen' [64, 88) 'opt' [128, 152) 'foc' The buggy address belongs to the virtual mapping at [ffffc90003388000, ffffc90003391000) 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:0x41dd2 memcg:ffff888045403b82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888045403b82 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 20231, tgid 20231 (syz.1.3978), ts 828718221499, free_ts 826341534322 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 20183 tgid 20182 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_lru_noprof+0x121/0x2f0 mm/slub.c:4056 __d_alloc+0x31/0xaa0 fs/dcache.c:1631 d_alloc_pseudo+0x1c/0xc0 fs/dcache.c:1763 alloc_path_pseudo fs/file_table.c:330 [inline] alloc_file_pseudo+0xdc/0x210 fs/file_table.c:346 sock_alloc_file+0x50/0x1d0 net/socket.c:469 sock_map_fd net/socket.c:494 [inline] __sys_socket+0x1c2/0x260 net/socket.c:1715 __do_sys_socket net/socket.c:1720 [inline] __se_sys_socket net/socket.c:1718 [inline] __x64_sys_socket+0x72/0xb0 net/socket.c:1718 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: ffffc9000338f900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000338f980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000338fa00: 00 00 f1 f1 f1 f1 f1 f1 01 f2 00 00 00 f2 f2 f2 ^ ffffc9000338fa80: f2 f2 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 00 ffffc9000338fb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================