================================================================== BUG: KASAN: use-after-free in ccid_hc_tx_delete+0xe0/0x100 net/dccp/ccid.c:188 Read of size 8 at addr ffff8881c0d0ee00 by task swapper/1/0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.20.0-rc6-next-20181217+ #172 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+0x244/0x39d lib/dump_stack.c:113 print_address_description.cold.4+0x9/0x1ff mm/kasan/report.c:187 kasan_report.cold.5+0x1b/0x39 mm/kasan/report.c:317 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 ccid_hc_tx_delete+0xe0/0x100 net/dccp/ccid.c:188 dccp_sk_destruct+0x3c/0x80 net/dccp/proto.c:181 __sk_destruct+0x107/0xa80 net/core/sock.c:1569 __rcu_reclaim kernel/rcu/rcu.h:240 [inline] rcu_do_batch kernel/rcu/tree.c:2452 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2773 [inline] rcu_process_callbacks+0xc5b/0x15f0 kernel/rcu/tree.c:2754 __do_softirq+0x308/0xb7e kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1cb/0x760 arch/x86/kernel/apic/apic.c:1062 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807 RIP: 0010:native_safe_halt+0x6/0x10 arch/x86/include/asm/irqflags.h:58 Code: e9 2c ff ff ff 48 89 c7 48 89 45 d8 e8 73 e1 e2 f9 48 8b 45 d8 e9 ca fe ff ff 48 89 df e8 62 e1 e2 f9 eb 82 55 48 89 e5 fb f4 <5d> c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 5d c3 90 90 90 90 90 RSP: 0018:ffff8881d9b07cb8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 1ffff1103b360f9b RCX: 0000000000000000 RDX: 1ffffffff12e4949 RSI: 0000000000000001 RDI: ffffffff89724a48 RBP: ffff8881d9b07cb8 R08: ffff8881d9af2340 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8881d9b07d78 R13: ffffffff8a3754e0 R14: 0000000000000000 R15: 0000000000000001 arch_safe_halt arch/x86/include/asm/paravirt.h:156 [inline] default_idle+0xbf/0x490 arch/x86/kernel/process.c:564 arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:555 default_idle_call+0x6d/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x49b/0x5c0 kernel/sched/idle.c:262 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:353 start_secondary+0x487/0x5f0 arch/x86/kernel/smpboot.c:271 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 Allocated by task 20546: save_stack+0x43/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] kasan_kmalloc+0xcb/0xd0 mm/kasan/common.c:482 kasan_slab_alloc+0x12/0x20 mm/kasan/common.c:397 kmem_cache_alloc+0x130/0x730 mm/slab.c:3541 ccid_new+0x25b/0x3e0 net/dccp/ccid.c:151 dccp_hdlr_ccid+0x27/0x150 net/dccp/feat.c:44 __dccp_feat_activate+0x188/0x280 net/dccp/feat.c:344 dccp_feat_activate_values+0x3c1/0x80a net/dccp/feat.c:1538 dccp_rcv_request_sent_state_process net/dccp/input.c:472 [inline] dccp_rcv_state_process+0x1320/0x1b7e net/dccp/input.c:680 dccp_v6_do_rcv+0x271/0xbf0 net/dccp/ipv6.c:641 sk_backlog_rcv include/net/sock.h:932 [inline] __release_sock+0x12f/0x3a0 net/core/sock.c:2284 release_sock+0xad/0x2c0 net/core/sock.c:2797 inet_wait_for_connect net/ipv4/af_inet.c:588 [inline] __inet_stream_connect+0x641/0x1150 net/ipv4/af_inet.c:680 inet_stream_connect+0x58/0xa0 net/ipv4/af_inet.c:719 __sys_connect+0x37d/0x4c0 net/socket.c:1665 __do_sys_connect net/socket.c:1676 [inline] __se_sys_connect net/socket.c:1673 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:1673 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 20548: save_stack+0x43/0xd0 mm/kasan/common.c:73 set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:444 kasan_slab_free+0xe/0x10 mm/kasan/common.c:452 __cache_free mm/slab.c:3485 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3747 ccid_hc_tx_delete+0xc3/0x100 net/dccp/ccid.c:190 dccp_hdlr_ccid+0x7d/0x150 net/dccp/feat.c:53 __dccp_feat_activate+0x188/0x280 net/dccp/feat.c:344 dccp_feat_activate_values+0x3c1/0x80a net/dccp/feat.c:1538 dccp_create_openreq_child+0x47a/0x630 net/dccp/minisocks.c:127 dccp_v6_request_recv_sock+0x278/0x2020 net/dccp/ipv6.c:469 dccp_check_req+0x47d/0x6d0 net/dccp/minisocks.c:196 dccp_v6_rcv+0x874/0x1ce9 net/dccp/ipv6.c:747 ip6_protocol_deliver_rcu+0x381/0x1950 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] ip6_input+0xe9/0x600 net/ipv6/ip6_input.c:443 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x17a/0x330 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] ipv6_rcv+0x115/0x640 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4971 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5081 process_backlog+0x24e/0x7a0 net/core/dev.c:5911 napi_poll net/core/dev.c:6334 [inline] net_rx_action+0x7fa/0x19b0 net/core/dev.c:6400 __do_softirq+0x308/0xb7e kernel/softirq.c:292 The buggy address belongs to the object at ffff8881c0d0ee00 which belongs to the cache ccid2_hc_tx_sock of size 1240 The buggy address is located 0 bytes inside of 1240-byte region [ffff8881c0d0ee00, ffff8881c0d0f2d8) The buggy address belongs to the page: page:ffffea0007034380 count:1 mapcount:0 mapping:ffff8881c5d68380 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000010200(slab|head) raw: 02fffc0000010200 ffffea0006fd7b88 ffffea0006fb0f88 ffff8881c5d68380 raw: 0000000000000000 ffff8881c0d0e300 0000000100000005 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c0d0ed00: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff8881c0d0ed80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881c0d0ee00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881c0d0ee80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c0d0ef00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================