================================================================== 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 ffff8881c6307850 by task syz-executor.1/22284 CPU: 0 PID: 22284 Comm: syz-executor.1 Not tainted 4.14.152+ #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 1786: 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 __build_skb+0x30/0x2f0 net/core/skbuff.c:281 __napi_alloc_skb+0x1e1/0x320 net/core/skbuff.c:486 napi_alloc_skb include/linux/skbuff.h:2674 [inline] page_to_skb+0xaf/0x6e0 drivers/net/virtio_net.c:323 receive_mergeable drivers/net/virtio_net.c:719 [inline] receive_buf+0x17a5/0x4310 drivers/net/virtio_net.c:824 virtnet_receive drivers/net/virtio_net.c:1098 [inline] virtnet_poll+0x4e6/0x9f0 drivers/net/virtio_net.c:1189 napi_poll net/core/dev.c:5598 [inline] net_rx_action+0x366/0xcd0 net/core/dev.c:5664 __do_softirq+0x234/0x9ec kernel/softirq.c:288 Freed by task 1786: 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 tcp_rcv_established+0xd77/0x1610 net/ipv4/tcp_input.c:5488 tcp_v4_do_rcv+0x568/0x700 net/ipv4/tcp_ipv4.c:1467 tcp_v4_rcv+0x23e9/0x3230 net/ipv4/tcp_ipv4.c:1741 ip_local_deliver_finish+0x3a3/0xa30 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:250 [inline] ip_local_deliver+0x373/0x450 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:468 [inline] ip_rcv_finish+0x4ed/0x1610 net/ipv4/ip_input.c:396 NF_HOOK include/linux/netfilter.h:250 [inline] ip_rcv+0xa30/0xf55 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x13ad/0x2cf0 net/core/dev.c:4477 __netif_receive_skb+0x66/0x210 net/core/dev.c:4515 netif_receive_skb_internal+0x11f/0x5f0 net/core/dev.c:4588 napi_skb_finish net/core/dev.c:4949 [inline] napi_gro_receive+0x206/0x410 net/core/dev.c:4980 receive_buf+0x503/0x4310 drivers/net/virtio_net.c:852 virtnet_receive drivers/net/virtio_net.c:1098 [inline] virtnet_poll+0x4e6/0x9f0 drivers/net/virtio_net.c:1189 napi_poll net/core/dev.c:5598 [inline] net_rx_action+0x366/0xcd0 net/core/dev.c:5664 __do_softirq+0x234/0x9ec kernel/softirq.c:288 The buggy address belongs to the object at ffff8881c6307780 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 208 bytes inside of 224-byte region [ffff8881c6307780, ffff8881c6307860) The buggy address belongs to the page: page:ffffea000718c1c0 count:1 mapcount:0 mapping: (null) index:0x0 flags: 0x4000000000000200(slab) raw: 4000000000000200 0000000000000000 0000000000000000 00000001800c000c raw: ffffea00072ad800 0000000500000005 ffff8881dab70200 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c6307700: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ffff8881c6307780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881c6307800: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff8881c6307880: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8881c6307900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================