================================================================== BUG: KASAN: use-after-free in ____bpf_clone_redirect net/core/filter.c:1768 [inline] BUG: KASAN: use-after-free in bpf_clone_redirect+0x2a7/0x2b0 net/core/filter.c:1759 Read of size 8 at addr ffff8881a4820850 by task syz-executor.4/31776 CPU: 1 PID: 31776 Comm: syz-executor.4 Not tainted 4.14.149+ #0 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 lib/dump_stack.c:53 print_address_description+0x60/0x226 mm/kasan/report.c:187 __kasan_report.cold+0x1a/0x41 mm/kasan/report.c:316 ____bpf_clone_redirect net/core/filter.c:1768 [inline] bpf_clone_redirect+0x2a7/0x2b0 net/core/filter.c:1759 ___bpf_prog_run+0x2478/0x5510 kernel/bpf/core.c:1095 Allocated by task 30534: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_kmalloc.part.0+0x53/0xc0 mm/kasan/common.c:501 slab_post_alloc_hook mm/slab.h:439 [inline] slab_alloc_node mm/slub.c:2792 [inline] slab_alloc mm/slub.c:2800 [inline] kmem_cache_alloc+0xee/0x360 mm/slub.c:2805 skb_clone+0x124/0x370 net/core/skbuff.c:1282 dev_queue_xmit_nit+0x2f3/0x970 net/core/dev.c:1943 xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0xa3/0x8c0 net/core/dev.c:3025 __dev_queue_xmit+0x11e0/0x1d00 net/core/dev.c:3525 neigh_hh_output include/net/neighbour.h:490 [inline] neigh_output include/net/neighbour.h:498 [inline] ip6_finish_output2+0xcd0/0x1fa0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x64b/0xb40 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1dc/0x680 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:462 [inline] ip6_local_out+0x98/0x170 net/ipv6/output_core.c:178 ip6_send_skb+0x9b/0x2f0 net/ipv6/ip6_output.c:1688 ip6_push_pending_frames+0xaf/0xd0 net/ipv6/ip6_output.c:1708 icmpv6_push_pending_frames+0x328/0x520 net/ipv6/icmp.c:289 icmp6_send+0x1627/0x1cc0 net/ipv6/icmp.c:588 icmpv6_send+0xa8/0x1a0 net/ipv6/ip6_icmp.c:43 ip6_link_failure+0x24/0x430 net/ipv6/route.c:1438 dst_link_failure include/net/dst.h:445 [inline] vti6_xmit net/ipv6/ip6_vti.c:522 [inline] vti6_tnl_xmit+0xa3a/0x1660 net/ipv6/ip6_vti.c:561 __netdev_start_xmit include/linux/netdevice.h:4033 [inline] netdev_start_xmit include/linux/netdevice.h:4042 [inline] xmit_one net/core/dev.c:3009 [inline] dev_hard_start_xmit+0x19f/0x8c0 net/core/dev.c:3025 __dev_queue_xmit+0x11e0/0x1d00 net/core/dev.c:3525 neigh_output include/net/neighbour.h:500 [inline] ip6_finish_output2+0x1018/0x1fa0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x64b/0xb40 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1dc/0x680 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:462 [inline] ip6_local_out+0x98/0x170 net/ipv6/output_core.c:178 ip6_send_skb+0x9b/0x2f0 net/ipv6/ip6_output.c:1688 udp_v6_send_skb+0x4e2/0xe80 net/ipv6/udp.c:1081 udpv6_sendmsg+0x1dfd/0x2500 net/ipv6/udp.c:1353 inet_sendmsg+0x15b/0x520 net/ipv4/af_inet.c:760 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb7/0x100 net/socket.c:656 ___sys_sendmsg+0x368/0x890 net/socket.c:2062 __sys_sendmmsg+0x13c/0x360 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2178 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff Freed by task 30534: save_stack mm/kasan/common.c:76 [inline] set_track mm/kasan/common.c:85 [inline] __kasan_slab_free+0x164/0x210 mm/kasan/common.c:463 slab_free_hook mm/slub.c:1407 [inline] slab_free_freelist_hook mm/slub.c:1458 [inline] slab_free mm/slub.c:3039 [inline] kmem_cache_free+0xd7/0x3b0 mm/slub.c:3055 kfree_skbmem net/core/skbuff.c:586 [inline] kfree_skbmem+0xa0/0x110 net/core/skbuff.c:580 __kfree_skb net/core/skbuff.c:646 [inline] consume_skb+0xe4/0x360 net/core/skbuff.c:705 packet_rcv+0xdf/0x1290 net/packet/af_packet.c:2178 dev_queue_xmit_nit+0x6e1/0x970 net/core/dev.c:1975 xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0xa3/0x8c0 net/core/dev.c:3025 __dev_queue_xmit+0x11e0/0x1d00 net/core/dev.c:3525 neigh_hh_output include/net/neighbour.h:490 [inline] neigh_output include/net/neighbour.h:498 [inline] ip6_finish_output2+0xcd0/0x1fa0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x64b/0xb40 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1dc/0x680 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:462 [inline] ip6_local_out+0x98/0x170 net/ipv6/output_core.c:178 ip6_send_skb+0x9b/0x2f0 net/ipv6/ip6_output.c:1688 ip6_push_pending_frames+0xaf/0xd0 net/ipv6/ip6_output.c:1708 icmpv6_push_pending_frames+0x328/0x520 net/ipv6/icmp.c:289 icmp6_send+0x1627/0x1cc0 net/ipv6/icmp.c:588 icmpv6_send+0xa8/0x1a0 net/ipv6/ip6_icmp.c:43 ip6_link_failure+0x24/0x430 net/ipv6/route.c:1438 dst_link_failure include/net/dst.h:445 [inline] vti6_xmit net/ipv6/ip6_vti.c:522 [inline] vti6_tnl_xmit+0xa3a/0x1660 net/ipv6/ip6_vti.c:561 __netdev_start_xmit include/linux/netdevice.h:4033 [inline] netdev_start_xmit include/linux/netdevice.h:4042 [inline] xmit_one net/core/dev.c:3009 [inline] dev_hard_start_xmit+0x19f/0x8c0 net/core/dev.c:3025 __dev_queue_xmit+0x11e0/0x1d00 net/core/dev.c:3525 neigh_output include/net/neighbour.h:500 [inline] ip6_finish_output2+0x1018/0x1fa0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x64b/0xb40 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1dc/0x680 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:462 [inline] ip6_local_out+0x98/0x170 net/ipv6/output_core.c:178 ip6_send_skb+0x9b/0x2f0 net/ipv6/ip6_output.c:1688 udp_v6_send_skb+0x4e2/0xe80 net/ipv6/udp.c:1081 udpv6_sendmsg+0x1dfd/0x2500 net/ipv6/udp.c:1353 inet_sendmsg+0x15b/0x520 net/ipv4/af_inet.c:760 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb7/0x100 net/socket.c:656 ___sys_sendmsg+0x368/0x890 net/socket.c:2062 __sys_sendmmsg+0x13c/0x360 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2178 do_syscall_64+0x19b/0x520 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 0xffffffffffffffff The buggy address belongs to the object at ffff8881a4820780 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 208 bytes inside of 224-byte region [ffff8881a4820780, ffff8881a4820860) The buggy address belongs to the page: page:ffffea0006920800 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000200(slab) raw: 4000000000000200 0000000000000000 0000000000000000 00000001800c000c raw: 0000000000000000 0000000100000001 ffff8881dab70200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881a4820700: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ffff8881a4820780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881a4820800: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff8881a4820880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8881a4820900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================