================================================================== BUG: KASAN: slab-use-after-free in dccp_ackvec_runlen net/dccp/ackvec.h:43 [inline] BUG: KASAN: slab-use-after-free in ccid2_hc_tx_packet_recv+0x1902/0x2070 net/dccp/ccids/ccid2.c:593 Read of size 1 at addr ffff88806739b494 by task syz-executor/6944 CPU: 0 UID: 0 PID: 6944 Comm: syz-executor Not tainted 6.12.0-rc3-syzkaller-g2f87d0916ce0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 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 dccp_ackvec_runlen net/dccp/ackvec.h:43 [inline] ccid2_hc_tx_packet_recv+0x1902/0x2070 net/dccp/ccids/ccid2.c:593 ccid_hc_tx_packet_recv net/dccp/ccid.h:189 [inline] dccp_deliver_input_to_ccids net/dccp/input.c:182 [inline] dccp_rcv_established+0x295/0x320 net/dccp/input.c:374 dccp_v4_do_rcv+0xff/0x1f0 net/dccp/ipv4.c:680 sk_backlog_rcv include/net/sock.h:1115 [inline] __release_sock+0x243/0x350 net/core/sock.c:3072 release_sock+0x61/0x1f0 net/core/sock.c:3626 dccp_sendmsg+0x4f0/0xba0 net/dccp/proto.c:803 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:744 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607 ___sys_sendmsg net/socket.c:2661 [inline] __sys_sendmmsg+0x3ab/0x730 net/socket.c:2747 __do_sys_sendmmsg net/socket.c:2776 [inline] __se_sys_sendmmsg net/socket.c:2773 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2773 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:0x44db49 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 b4 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f565dee50f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 000000000050bea0 RCX: 000000000044db49 RDX: 04000000000001e6 RSI: 0000000020000c00 RDI: 0000000000000005 RBP: 000000000000057a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f565dee5674 R13: 00000000004d5100 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 6944: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:257 [inline] __do_kmalloc_node mm/slub.c:4264 [inline] __kmalloc_node_track_caller_noprof+0x225/0x440 mm/slub.c:4283 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:609 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:678 alloc_skb include/linux/skbuff.h:1322 [inline] dccp_send_ack+0xaa/0x310 net/dccp/output.c:585 ccid2_hc_rx_packet_recv+0x10c/0x1c0 net/dccp/ccids/ccid2.c:772 ccid_hc_rx_packet_recv net/dccp/ccid.h:182 [inline] dccp_deliver_input_to_ccids net/dccp/input.c:176 [inline] dccp_rcv_established+0x1bb/0x320 net/dccp/input.c:374 dccp_v4_do_rcv+0xff/0x1f0 net/dccp/ipv4.c:680 sk_backlog_rcv include/net/sock.h:1115 [inline] __sk_receive_skb+0x82b/0x8b0 net/core/sock.c:570 ip_protocol_deliver_rcu+0x2e9/0x440 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x341/0x5f0 net/ipv4/ip_input.c:233 NF_HOOK+0x3a4/0x450 include/linux/netfilter.h:314 NF_HOOK+0x3a4/0x450 include/linux/netfilter.h:314 __netif_receive_skb_one_core net/core/dev.c:5666 [inline] __netif_receive_skb+0x2bf/0x650 net/core/dev.c:5779 process_backlog+0x662/0x15b0 net/core/dev.c:6111 __napi_poll+0xcb/0x490 net/core/dev.c:6775 napi_poll net/core/dev.c:6844 [inline] net_rx_action+0x89b/0x1240 net/core/dev.c:6966 handle_softirqs+0x2c5/0x980 kernel/softirq.c:554 do_softirq+0x11b/0x1e0 kernel/softirq.c:455 __local_bh_enable_ip+0x1bb/0x200 kernel/softirq.c:382 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:919 [inline] __dev_queue_xmit+0x171d/0x3ed0 net/core/dev.c:4455 dev_queue_xmit include/linux/netdevice.h:3094 [inline] neigh_hh_output include/net/neighbour.h:526 [inline] neigh_output include/net/neighbour.h:540 [inline] ip_finish_output2+0xd41/0x1390 net/ipv4/ip_output.c:236 ip_local_out net/ipv4/ip_output.c:130 [inline] __ip_queue_xmit+0x118c/0x1b80 net/ipv4/ip_output.c:536 dccp_transmit_skb+0xf41/0x16a0 net/dccp/output.c:138 dccp_xmit_packet+0x376/0x610 net/dccp/output.c:281 dccp_write_xmit+0x138/0x220 net/dccp/output.c:366 dccp_sendmsg+0x76f/0xba0 net/dccp/proto.c:801 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:744 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607 ___sys_sendmsg net/socket.c:2661 [inline] __sys_sendmmsg+0x3ab/0x730 net/socket.c:2747 __do_sys_sendmmsg net/socket.c:2776 [inline] __se_sys_sendmmsg net/socket.c:2773 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2773 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 Freed by task 6944: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4579 [inline] kfree+0x1a0/0x440 mm/slub.c:4727 skb_kfree_head net/core/skbuff.c:1086 [inline] skb_free_head net/core/skbuff.c:1098 [inline] skb_release_data+0x6a0/0x8a0 net/core/skbuff.c:1125 skb_release_all net/core/skbuff.c:1190 [inline] __kfree_skb net/core/skbuff.c:1204 [inline] sk_skb_reason_drop+0x1c9/0x380 net/core/skbuff.c:1242 kfree_skb_reason include/linux/skbuff.h:1262 [inline] kfree_skb include/linux/skbuff.h:1271 [inline] dccp_v4_do_rcv+0x145/0x1f0 net/dccp/ipv4.c:715 sk_backlog_rcv include/net/sock.h:1115 [inline] __release_sock+0x243/0x350 net/core/sock.c:3072 release_sock+0x61/0x1f0 net/core/sock.c:3626 dccp_sendmsg+0x4f0/0xba0 net/dccp/proto.c:803 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:744 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607 ___sys_sendmsg net/socket.c:2661 [inline] __sys_sendmmsg+0x3ab/0x730 net/socket.c:2747 __do_sys_sendmmsg net/socket.c:2776 [inline] __se_sys_sendmmsg net/socket.c:2773 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2773 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 The buggy address belongs to the object at ffff88806739b000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1172 bytes inside of freed 2048-byte region [ffff88806739b000, ffff88806739b800) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x67398 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801ac42000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000080008 00000001f5000000 0000000000000000 head: 00fff00000000040 ffff88801ac42000 dead000000000122 0000000000000000 head: 0000000000000000 0000000000080008 00000001f5000000 0000000000000000 head: 00fff00000000003 ffffea00019ce601 ffffffffffffffff 0000000000000000 head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 6944, tgid 6943 (syz-executor), ts 110238542470, free_ts 13364593821 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x3045/0x3190 mm/page_alloc.c:3457 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 alloc_slab_page+0x6a/0x120 mm/slub.c:2412 allocate_slab+0x5a/0x2f0 mm/slub.c:2578 new_slab mm/slub.c:2631 [inline] ___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818 __slab_alloc+0x58/0xa0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] __do_kmalloc_node mm/slub.c:4263 [inline] __kmalloc_node_track_caller_noprof+0x281/0x440 mm/slub.c:4283 kmalloc_reserve+0x111/0x2a0 net/core/skbuff.c:609 __alloc_skb+0x1f3/0x440 net/core/skbuff.c:678 alloc_skb include/linux/skbuff.h:1322 [inline] alloc_skb_with_frags+0xc3/0x820 net/core/skbuff.c:6612 sock_alloc_send_pskb+0x91a/0xa60 net/core/sock.c:2883 sock_alloc_send_skb include/net/sock.h:1782 [inline] dccp_sendmsg+0x3f1/0xba0 net/dccp/proto.c:764 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:744 ____sys_sendmsg+0x52a/0x7e0 net/socket.c:2607 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_page+0xcfb/0xf20 mm/page_alloc.c:2638 free_contig_range+0x152/0x550 mm/page_alloc.c:6748 destroy_args+0x8a/0x840 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x4be/0x550 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x248/0x880 init/main.c:1269 do_initcall_level+0x157/0x210 init/main.c:1331 do_initcalls+0x3f/0x80 init/main.c:1347 kernel_init_freeable+0x435/0x5d0 init/main.c:1580 kernel_init+0x1d/0x2b0 init/main.c:1469 ret_from_fork+0x4b/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: ffff88806739b380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806739b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88806739b480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806739b500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806739b580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================