================================================================== BUG: KASAN: use-after-free in tcp_ack_probe net/ipv4/tcp_input.c:3292 [inline] BUG: KASAN: use-after-free in tcp_ack+0x414f/0x4760 net/ipv4/tcp_input.c:3714 Read of size 4 at addr ffff888084b947ec by task ksoftirqd/1/17 CPU: 1 PID: 17 Comm: ksoftirqd/1 Not tainted 4.14.145 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x138/0x197 lib/dump_stack.c:53 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 tcp_ack_probe net/ipv4/tcp_input.c:3292 [inline] tcp_ack+0x414f/0x4760 net/ipv4/tcp_input.c:3714 tcp_rcv_established+0x3e9/0x1650 net/ipv4/tcp_input.c:5555 tcp_v6_do_rcv+0x417/0x1190 net/ipv6/tcp_ipv6.c:1301 tcp_v6_rcv+0x2446/0x2ed0 net/ipv6/tcp_ipv6.c:1519 ip6_input_finish+0x300/0x15a0 net/ipv6/ip6_input.c:284 NF_HOOK include/linux/netfilter.h:250 [inline] NF_HOOK include/linux/netfilter.h:244 [inline] ip6_input+0xd5/0x340 net/ipv6/ip6_input.c:327 dst_input include/net/dst.h:468 [inline] ip6_rcv_finish+0x23f/0x7a0 net/ipv6/ip6_input.c:71 NF_HOOK include/linux/netfilter.h:250 [inline] NF_HOOK include/linux/netfilter.h:244 [inline] ipv6_rcv+0xe4d/0x1d20 net/ipv6/ip6_input.c:208 __netif_receive_skb_core+0x1eae/0x2ca0 net/core/dev.c:4477 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4515 process_backlog+0x21f/0x730 net/core/dev.c:5197 napi_poll net/core/dev.c:5598 [inline] net_rx_action+0x490/0xf80 net/core/dev.c:5664 __do_softirq+0x244/0x9a0 kernel/softirq.c:288 run_ksoftirqd kernel/softirq.c:670 [inline] run_ksoftirqd+0x8c/0x1b0 kernel/softirq.c:662 smpboot_thread_fn+0x5f4/0x960 kernel/smpboot.c:164 kthread+0x319/0x430 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 8069: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc_node+0x144/0x780 mm/slab.c:3642 __alloc_skb+0x9c/0x500 net/core/skbuff.c:193 alloc_skb_fclone include/linux/skbuff.h:1022 [inline] sk_stream_alloc_skb+0xb3/0x780 net/ipv4/tcp.c:855 tcp_sendmsg_locked+0xf61/0x3200 net/ipv4/tcp.c:1301 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1457 inet_sendmsg+0x122/0x500 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 SYSC_sendto+0x206/0x310 net/socket.c:1763 SyS_sendto+0x40/0x50 net/socket.c:1731 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 8069: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x83/0x2b0 mm/slab.c:3758 kfree_skbmem+0x8d/0x120 net/core/skbuff.c:607 __kfree_skb+0x1e/0x30 net/core/skbuff.c:646 sk_wmem_free_skb include/net/sock.h:1416 [inline] tcp_remove_empty_skb.part.0+0x231/0x2e0 net/ipv4/tcp.c:929 tcp_remove_empty_skb net/ipv4/tcp.c:925 [inline] tcp_sendmsg_locked+0x1ced/0x3200 net/ipv4/tcp.c:1435 tcp_sendmsg+0x30/0x50 net/ipv4/tcp.c:1457 inet_sendmsg+0x122/0x500 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 SYSC_sendto+0x206/0x310 net/socket.c:1763 SyS_sendto+0x40/0x50 net/socket.c:1731 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff888084b947c0 which belongs to the cache skbuff_fclone_cache of size 472 The buggy address is located 44 bytes inside of 472-byte region [ffff888084b947c0, ffff888084b94998) The buggy address belongs to the page: page:ffffea000212e500 count:1 mapcount:0 mapping:ffff888084b94040 index:0xffff888084b94cc0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff888084b94040 ffff888084b94cc0 0000000100000005 raw: ffffea000278b5a0 ffffea000228e960 ffff88821b7203c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888084b94680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888084b94700: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888084b94780: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888084b94800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888084b94880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================