================================================================== BUG: KASAN: use-after-free in ccid_hc_tx_delete+0xde/0x100 net/dccp/ccid.c:188 Read of size 8 at addr ffff8880a7ccb0c0 by task syz-executor.5/26772 CPU: 1 PID: 26772 Comm: syz-executor.5 Not tainted 5.1.0-rc2 #36 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+0x172/0x1f0 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_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132 ccid_hc_tx_delete+0xde/0x100 net/dccp/ccid.c:188 dccp_sk_destruct+0x3f/0x90 net/dccp/proto.c:181 __sk_destruct+0x55/0x6d0 net/core/sock.c:1699 __rcu_reclaim kernel/rcu/rcu.h:227 [inline] rcu_do_batch kernel/rcu/tree.c:2475 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2788 [inline] rcu_core+0x928/0x1390 kernel/rcu/tree.c:2769 __do_softirq+0x266/0x95a kernel/softirq.c:293 invoke_softirq kernel/softirq.c:374 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:414 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x14a/0x570 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 RIP: 0010:__sanitizer_cov_trace_pc+0x26/0x50 kernel/kcov.c:102 Code: 90 90 90 90 55 48 89 e5 48 8b 75 08 65 48 8b 04 25 00 ee 01 00 65 8b 15 f8 7b 91 7e 81 e2 00 01 1f 00 75 2b 8b 90 e0 12 00 00 <83> fa 02 75 20 48 8b 88 e8 12 00 00 8b 80 e4 12 00 00 48 8b 11 48 RSP: 0018:ffff8880aa3ff6a8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: ffff88805b7ce500 RBX: 0000000000000000 RCX: ffffffff819fb0e7 RDX: 0000000000000000 RSI: ffffffff819fb0f5 RDI: 0000000000000001 RBP: ffff8880aa3ff6a8 R08: ffff88805b7ce500 R09: fffff940002f5ecf R10: fffff940002f5ece R11: ffffea00017af673 R12: ffffea00017af680 R13: ffffea00017af688 R14: 0000000000000000 R15: dead000000000100 page_remove_file_rmap mm/rmap.c:1217 [inline] page_remove_rmap+0x535/0x12c0 mm/rmap.c:1302 zap_pte_range mm/memory.c:1091 [inline] zap_pmd_range mm/memory.c:1193 [inline] zap_pud_range mm/memory.c:1222 [inline] zap_p4d_range mm/memory.c:1243 [inline] unmap_page_range+0xd70/0x2330 mm/memory.c:1264 unmap_single_vma+0x19d/0x300 mm/memory.c:1309 unmap_vmas+0x115/0x250 mm/memory.c:1340 exit_mmap+0x2c2/0x530 mm/mmap.c:3138 __mmput kernel/fork.c:1046 [inline] mmput+0x15f/0x4c0 kernel/fork.c:1067 exit_mm kernel/exit.c:546 [inline] do_exit+0x816/0x2fa0 kernel/exit.c:863 do_group_exit+0x135/0x370 kernel/exit.c:980 get_signal+0x399/0x1d50 kernel/signal.c:2577 do_signal+0x87/0x1940 arch/x86/kernel/signal.c:816 exit_to_usermode_loop+0x244/0x2c0 arch/x86/entry/common.c:162 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x52d/0x610 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458209 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:00007fb879e3fcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 000000000073c048 RCX: 0000000000458209 RDX: 00000000004f1c47 RSI: 0000000000000081 RDI: 000000000073c04c RBP: 000000000073c040 R08: 000000000000000e R09: 0000000000000000 R10: ffffffffffffffff R11: 0000000000000246 R12: 000000000073c04c R13: 0000000000a4fb5f R14: 00007fb879e409c0 R15: 000000000073c04c Allocated by task 26704: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_kmalloc mm/kasan/common.c:497 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:505 slab_post_alloc_hook mm/slab.h:436 [inline] slab_alloc mm/slab.c:3392 [inline] kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3554 ccid_new+0x256/0x3f0 net/dccp/ccid.c:151 dccp_hdlr_ccid+0x27/0x150 net/dccp/feat.c:44 __dccp_feat_activate+0x17a/0x270 net/dccp/feat.c:344 dccp_feat_activate_values+0x33a/0x766 net/dccp/feat.c:1538 dccp_create_openreq_child+0x40c/0x570 net/dccp/minisocks.c:127 dccp_v6_request_recv_sock+0x214/0x1da0 net/dccp/ipv6.c:469 dccp_check_req+0x35c/0x6f0 net/dccp/minisocks.c:196 dccp_v6_rcv+0x6d7/0x191e net/dccp/ipv6.c:747 ip6_protocol_deliver_rcu+0x303/0x16c0 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+0xe4/0x3f0 net/ipv6/ip6_input.c:443 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x1e7/0x320 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ipv6_rcv+0x10e/0x420 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x115/0x1a0 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+0x4fa/0x1070 net/core/dev.c:6412 __do_softirq+0x266/0x95a kernel/softirq.c:293 Freed by task 26769: save_stack+0x45/0xd0 mm/kasan/common.c:75 set_track mm/kasan/common.c:87 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:459 kasan_slab_free+0xe/0x10 mm/kasan/common.c:467 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x86/0x260 mm/slab.c:3764 ccid_hc_tx_delete+0xc1/0x100 net/dccp/ccid.c:190 dccp_hdlr_ccid+0x7d/0x150 net/dccp/feat.c:53 __dccp_feat_activate+0x17a/0x270 net/dccp/feat.c:344 dccp_feat_activate_values+0x33a/0x766 net/dccp/feat.c:1538 dccp_create_openreq_child+0x40c/0x570 net/dccp/minisocks.c:127 dccp_v6_request_recv_sock+0x214/0x1da0 net/dccp/ipv6.c:469 dccp_check_req+0x35c/0x6f0 net/dccp/minisocks.c:196 dccp_v6_rcv+0x6d7/0x191e net/dccp/ipv6.c:747 ip6_protocol_deliver_rcu+0x303/0x16c0 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+0xe4/0x3f0 net/ipv6/ip6_input.c:443 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x1e7/0x320 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] NF_HOOK include/linux/netfilter.h:283 [inline] ipv6_rcv+0x10e/0x420 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x115/0x1a0 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+0x4fa/0x1070 net/core/dev.c:6412 __do_softirq+0x266/0x95a kernel/softirq.c:293 The buggy address belongs to the object at ffff8880a7ccb0c0 which belongs to the cache ccid2_hc_tx_sock of size 1240 The buggy address is located 0 bytes inside of 1240-byte region [ffff8880a7ccb0c0, ffff8880a7ccb598) The buggy address belongs to the page: page:ffffea00029f3280 count:1 mapcount:0 mapping:ffff88809ac95900 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000010200(slab|head) raw: 01fffc0000010200 ffff88809ad31948 ffffea00028d2f08 ffff88809ac95900 raw: 0000000000000000 ffff8880a7cca040 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a7ccaf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a7ccb000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a7ccb080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8880a7ccb100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a7ccb180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================