================================================================== BUG: KASAN: use-after-free in ccid2_hc_tx_packet_recv+0x2303/0x2673 net/dccp/ccids/ccid2.c:600 Read of size 1 at addr ffff8880a81a798d by task syz-executor5/8278 CPU: 0 PID: 8278 Comm: syz-executor5 Not tainted 5.0.0-rc4+ #54 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1db/0x2d0 lib/dump_stack.c:113 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187 kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317 __asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:132 ccid2_hc_tx_packet_recv+0x2303/0x2673 net/dccp/ccids/ccid2.c:600 dccp_close: ABORT with 4697 bytes unread ccid_hc_tx_packet_recv net/dccp/ccid.h:192 [inline] dccp_deliver_input_to_ccids+0x202/0x280 net/dccp/input.c:186 dccp_rcv_established net/dccp/input.c:378 [inline] dccp_rcv_established+0x83/0xb0 net/dccp/input.c:368 dccp_v6_do_rcv+0x9a9/0xbf0 net/dccp/ipv6.c:609 sk_backlog_rcv include/net/sock.h:936 [inline] __release_sock+0x12e/0x3a0 net/core/sock.c:2284 release_sock+0xac/0x2b0 net/core/sock.c:2800 dccp_sendmsg+0x70e/0xf60 net/dccp/proto.c:818 inet_sendmsg+0x1af/0x740 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xdd/0x130 net/socket.c:631 ___sys_sendmsg+0x7ec/0x910 net/socket.c:2116 __sys_sendmsg+0x112/0x270 net/socket.c:2154 __do_sys_sendmsg net/socket.c:2163 [inline] __se_sys_sendmsg net/socket.c:2161 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2161 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457e39 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fe94cee2c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457e39 RDX: 0000000000000004 RSI: 0000000020000700 RDI: 000000000000000a RBP: 000000000073bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe94cee36d4 R13: 00000000004c5452 R14: 00000000004d91e8 R15: 00000000ffffffff Allocated by task 8291: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc mm/kasan/common.c:496 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:504 __do_kmalloc_node mm/slab.c:3673 [inline] __kmalloc_node_track_caller+0x4e/0x70 mm/slab.c:3687 __kmalloc_reserve.isra.0+0x40/0xe0 net/core/skbuff.c:140 __alloc_skb+0x12d/0x730 net/core/skbuff.c:208 alloc_skb include/linux/skbuff.h:1011 [inline] dccp_send_ack+0xd6/0x360 net/dccp/output.c:580 dccp_rcv_request_sent_state_process net/dccp/input.c:501 [inline] dccp_rcv_state_process+0x14a9/0x1af6 net/dccp/input.c:680 dccp_v6_do_rcv+0x269/0xbf0 net/dccp/ipv6.c:641 sk_backlog_rcv include/net/sock.h:936 [inline] __release_sock+0x12e/0x3a0 net/core/sock.c:2284 release_sock+0xac/0x2b0 net/core/sock.c:2800 inet_wait_for_connect net/ipv4/af_inet.c:588 [inline] __inet_stream_connect+0x694/0x11b0 net/ipv4/af_inet.c:680 inet_stream_connect+0x58/0xa0 net/ipv4/af_inet.c:719 __sys_connect+0x357/0x490 net/socket.c:1664 __do_sys_connect net/socket.c:1675 [inline] __se_sys_connect net/socket.c:1672 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:1672 do_syscall_64+0x1a3/0x800 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8291: save_stack+0x45/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:458 kasan_slab_free+0xe/0x10 mm/kasan/common.c:466 __cache_free mm/slab.c:3487 [inline] kfree+0xcf/0x230 mm/slab.c:3806 skb_free_head+0x93/0xb0 net/core/skbuff.c:553 skb_release_data+0x6ea/0x970 net/core/skbuff.c:573 skb_release_all+0x4d/0x60 net/core/skbuff.c:627 __kfree_skb+0x16/0x30 net/core/skbuff.c:641 dccp_rcv_state_process+0x43a/0x1af6 net/dccp/input.c:713 dccp_child_process+0x1d4/0x9e0 net/dccp/minisocks.c:228 dccp_v6_rcv+0x87d/0x1cef net/dccp/ipv6.c:754 ip6_protocol_deliver_rcu+0x3aa/0x1940 net/ipv6/ip6_input.c:394 ip6_input_finish+0x84/0x170 net/ipv6/ip6_input.c:434 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ip6_input+0xf9/0x600 net/ipv6/ip6_input.c:443 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x177/0x330 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ipv6_rcv+0x113/0x650 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x160/0x210 net/core/dev.c:4973 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5083 process_backlog+0x206/0x750 net/core/dev.c:5923 napi_poll net/core/dev.c:6346 [inline] net_rx_action+0x76d/0x1930 net/core/dev.c:6412 __do_softirq+0x30b/0xb11 kernel/softirq.c:292 The buggy address belongs to the object at ffff8880a81a7500 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1165 bytes inside of 2048-byte region [ffff8880a81a7500, ffff8880a81a7d00) The buggy address belongs to the page: page:ffffea0002a06980 count:1 mapcount:0 mapping:ffff88812c3f0c40 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffffea000162af08 ffffea000142ca88 ffff88812c3f0c40 raw: 0000000000000000 ffff8880a81a6400 0000000100000003 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a81a7880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a81a7900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880a81a7980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a81a7a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a81a7a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================