================================================================== BUG: KASAN: use-after-free in ____bpf_clone_redirect net/core/filter.c:1768 [inline] BUG: KASAN: use-after-free in bpf_clone_redirect+0x2de/0x2f0 net/core/filter.c:1759 Read of size 8 at addr ffff888097cb7610 by task syz-executor.5/1390 CPU: 1 PID: 1390 Comm: syz-executor.5 Not tainted 4.14.152 #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_load8_noabort+0x14/0x20 mm/kasan/report.c:430 ____bpf_clone_redirect net/core/filter.c:1768 [inline] bpf_clone_redirect+0x2de/0x2f0 net/core/filter.c:1759 bpf_prog_3c8dfff8b3098609+0x679/0x1000 Allocated by task 1308: 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+0x12e/0x780 mm/slab.c:3552 skb_clone+0x129/0x320 net/core/skbuff.c:1282 ____bpf_clone_redirect net/core/filter.c:1772 [inline] bpf_clone_redirect+0xa3/0x2f0 net/core/filter.c:1759 bpf_prog_3c8dfff8b3098609+0xb66/0x1000 Freed by task 1308: 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 net/core/skbuff.c:586 [inline] kfree_skbmem+0xac/0x120 net/core/skbuff.c:580 __kfree_skb net/core/skbuff.c:646 [inline] kfree_skb+0xbd/0x340 net/core/skbuff.c:663 kfree_skb_list+0x44/0x60 net/core/skbuff.c:672 __dev_xmit_skb net/core/dev.c:3240 [inline] __dev_queue_xmit+0x159b/0x25e0 net/core/dev.c:3493 dev_queue_xmit+0x18/0x20 net/core/dev.c:3558 __bpf_tx_skb net/core/filter.c:1708 [inline] __bpf_redirect_common net/core/filter.c:1747 [inline] __bpf_redirect+0x62b/0xab0 net/core/filter.c:1754 ____bpf_clone_redirect net/core/filter.c:1787 [inline] bpf_clone_redirect+0x1fd/0x2f0 net/core/filter.c:1759 bpf_prog_3c8dfff8b3098609+0xb66/0x1000 The buggy address belongs to the object at ffff888097cb7580 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 144 bytes inside of 232-byte region [ffff888097cb7580, ffff888097cb7668) The buggy address belongs to the page: page:ffffea00025f2dc0 count:1 mapcount:0 mapping:ffff888097cb7080 index:0xffff888097cb76c0 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff888097cb7080 ffff888097cb76c0 000000010000000b raw: ffffea0002a3b6a0 ffffea0001581d20 ffff88821b75f3c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888097cb7500: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff888097cb7580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888097cb7600: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ^ ffff888097cb7680: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff888097cb7700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================