================================================================== BUG: KASAN: use-after-free in ____bpf_clone_redirect net/core/filter.c:1767 [inline] BUG: KASAN: use-after-free in bpf_clone_redirect+0x29a/0x2b0 net/core/filter.c:1758 Read of size 8 at addr ffff8801c13a4bd0 by task syz-executor2/5323 CPU: 0 PID: 5323 Comm: syz-executor2 Not tainted 4.14.78+ #26 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_address_description+0x60/0x22b mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409 ____bpf_clone_redirect net/core/filter.c:1767 [inline] bpf_clone_redirect+0x29a/0x2b0 net/core/filter.c:1758 ___bpf_prog_run+0x248e/0x5c70 kernel/bpf/core.c:1012 Allocated by task 5316: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x4f/0xd0 mm/kasan/kasan.c:551 slab_post_alloc_hook mm/slab.h:442 [inline] slab_alloc_node mm/slub.c:2723 [inline] slab_alloc mm/slub.c:2731 [inline] kmem_cache_alloc+0xe4/0x2b0 mm/slub.c:2736 kmem_cache_alloc_node include/linux/slab.h:361 [inline] __alloc_skb+0xd8/0x550 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:980 [inline] __tcp_send_ack.part.9+0x64/0x570 net/ipv4/tcp_output.c:3576 __tcp_send_ack net/ipv4/tcp_output.c:3603 [inline] tcp_send_ack+0x6f/0x90 net/ipv4/tcp_output.c:3603 __tcp_ack_snd_check+0xf6/0x380 net/ipv4/tcp_input.c:5126 tcp_ack_snd_check net/ipv4/tcp_input.c:5139 [inline] tcp_rcv_state_process+0xd93/0x48d9 net/ipv4/tcp_input.c:6146 tcp_v4_do_rcv+0x2e8/0x6f0 net/ipv4/tcp_ipv4.c:1488 sk_backlog_rcv include/net/sock.h:902 [inline] __release_sock+0x135/0x350 net/core/sock.c:2261 release_sock+0x54/0x1b0 net/core/sock.c:2773 inet_shutdown+0x1af/0x350 net/ipv4/af_inet.c:870 SYSC_shutdown net/socket.c:1916 [inline] SyS_shutdown+0xf5/0x1a0 net/socket.c:1907 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 5316: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xac/0x190 mm/kasan/kasan.c:524 slab_free_hook mm/slub.c:1389 [inline] slab_free_freelist_hook mm/slub.c:1410 [inline] slab_free mm/slub.c:2966 [inline] kmem_cache_free+0x12d/0x350 mm/slub.c:2988 kfree_skbmem+0x9e/0x100 net/core/skbuff.c:582 tcp_data_queue+0x133b/0x3190 net/ipv4/tcp_input.c:4656 tcp_rcv_state_process+0xc84/0x48d9 net/ipv4/tcp_input.c:6138 tcp_v4_do_rcv+0x2e8/0x6f0 net/ipv4/tcp_ipv4.c:1488 sk_backlog_rcv include/net/sock.h:902 [inline] __release_sock+0x135/0x350 net/core/sock.c:2261 release_sock+0x54/0x1b0 net/core/sock.c:2773 inet_shutdown+0x1af/0x350 net/ipv4/af_inet.c:870 SYSC_shutdown net/socket.c:1916 [inline] SyS_shutdown+0xf5/0x1a0 net/socket.c:1907 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8801c13a4b40 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 144 bytes inside of 224-byte region [ffff8801c13a4b40, ffff8801c13a4c20) The buggy address belongs to the page: page:ffffea000704e900 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000100(slab) raw: 4000000000000100 0000000000000000 0000000000000000 00000001800c000c raw: dead000000000100 dead000000000200 ffff8801d6770200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c13a4a80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801c13a4b00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff8801c13a4b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c13a4c00: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c13a4c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================