==================================================================
BUG: KASAN: use-after-free in deliver_ptype_list_skb net/core/dev.c:1871 [inline]
BUG: KASAN: use-after-free in __netif_receive_skb_core+0x2be3/0x33d0 net/core/dev.c:4401
Read of size 2 at addr ffff8801c6c27680 by task syzkaller045818/28464

CPU: 0 PID: 28464 Comm: syzkaller045818 Not tainted 4.13.0-rc7+ #35
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:16 [inline]
 dump_stack+0x194/0x257 lib/dump_stack.c:52
 print_address_description+0x73/0x250 mm/kasan/report.c:252
 kasan_report_error mm/kasan/report.c:351 [inline]
 kasan_report+0x24e/0x340 mm/kasan/report.c:409
 __asan_report_load2_noabort+0x14/0x20 mm/kasan/report.c:428
 deliver_ptype_list_skb net/core/dev.c:1871 [inline]
 __netif_receive_skb_core+0x2be3/0x33d0 net/core/dev.c:4401
 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4456
 netif_receive_skb_internal+0x10b/0x5e0 net/core/dev.c:4527
 napi_skb_finish net/core/dev.c:4888 [inline]
 napi_gro_receive+0x3d0/0x500 net/core/dev.c:4919
 receive_buf+0xcc5/0x51f0 drivers/net/virtio_net.c:841
 virtnet_receive drivers/net/virtio_net.c:1087 [inline]
 virtnet_poll+0x304/0xad0 drivers/net/virtio_net.c:1168
 napi_poll net/core/dev.c:5530 [inline]
 net_rx_action+0x792/0x1910 net/core/dev.c:5596
 __do_softirq+0x2f5/0xba3 kernel/softirq.c:284
 invoke_softirq kernel/softirq.c:364 [inline]
 irq_exit+0x1cc/0x200 kernel/softirq.c:405
 exiting_irq arch/x86/include/asm/apic.h:638 [inline]
 do_IRQ+0xf6/0x190 arch/x86/kernel/irq.c:256
 common_interrupt+0x93/0x93 arch/x86/entry/entry_64.S:513
RIP: 0010:__handle_mm_fault+0x5ad/0x3860 mm/memory.c:3797
RSP: 0000:ffff8801d33ffbe8 EFLAGS: 00000207 ORIG_RAX: ffffffffffffff6e
RAX: 0000000000000000 RBX: ffff8801d529de08 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffffed003a67ffb8
RBP: ffff8801d33ffe08 R08: 0000000000000001 R09: 1ffff1003a67ff5b
R10: 0000000000000000 R11: 0000000000000001 R12: ffff8801c6563000
R13: 1ffff1003a67ff88 R14: ffff8801d33ffd40 R15: ffff8801d33ffde0
 </IRQ>
 handle_mm_fault+0x3bb/0x860 mm/memory.c:3906
 __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1445
 do_page_fault+0x54/0x70 arch/x86/mm/fault.c:1508
 page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1007
RIP: 0033:0x4490cd
RSP: 002b:00007ffdabbffd48 EFLAGS: 00010202
RAX: ffffffffffffffea RBX: 00007fbc335c2700 RCX: 00007fbc335c2700
RDX: 00000000003d0f00 RSI: 00007fbc335c1e70 RDI: 00000000004028e0
RBP: 00007ffdabbffe00 R08: 00007fbc335c29d0 R09: 00007fbc335c2700
R10: 00007fbc335c1e80 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdabbffdff R14: 00007fbc335c29c0 R15: 0000000000000000

Allocated by task 28325:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551
 kmem_cache_alloc_trace+0x12f/0x740 mm/slab.c:3627
 kmalloc include/linux/slab.h:493 [inline]
 kzalloc include/linux/slab.h:666 [inline]
 fanout_add+0xa50/0x1190 net/packet/af_packet.c:1733
 packet_setsockopt+0xfdc/0x1e80 net/packet/af_packet.c:3795
 SYSC_setsockopt net/socket.c:1852 [inline]
 SyS_setsockopt+0x189/0x360 net/socket.c:1831
 entry_SYSCALL_64_fastpath+0x1f/0xbe

Freed by task 28424:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
 save_stack+0x43/0xd0 mm/kasan/kasan.c:447
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xca/0x250 mm/slab.c:3820
 packet_release+0xa8f/0xd70 net/packet/af_packet.c:3033
 sock_release+0x8d/0x1e0 net/socket.c:597
 sock_close+0x16/0x20 net/socket.c:1126
 __fput+0x327/0x7e0 fs/file_table.c:210
 ____fput+0x15/0x20 fs/file_table.c:246
 task_work_run+0x18a/0x260 kernel/task_work.c:116
 exit_task_work include/linux/task_work.h:21 [inline]
 do_exit+0xa3a/0x1b10 kernel/exit.c:865
 do_group_exit+0x149/0x400 kernel/exit.c:969
 SYSC_exit_group kernel/exit.c:980 [inline]
 SyS_exit_group+0x1d/0x20 kernel/exit.c:978
 entry_SYSCALL_64_fastpath+0x1f/0xbe

The buggy address belongs to the object at ffff8801c6c26e00
 which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 2176 bytes inside of
 4096-byte region [ffff8801c6c26e00, ffff8801c6c27e00)
The buggy address belongs to the page:
page:ffffea00071b0980 count:1 mapcount:0 mapping:ffff8801c6c26e00 index:0x0 compound_mapcount: 0
flags: 0x200000000008100(slab|head)
raw: 0200000000008100 ffff8801c6c26e00 0000000000000000 0000000100000001
raw: ffffea00071cb220 ffffea00071b76a0 ffff8801dac00dc0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801c6c27580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8801c6c27600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8801c6c27680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8801c6c27700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8801c6c27780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================