================================================================== 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:4406 Read of size 2 at addr ffff8801c7edadc0 by task syz-executor0/12684 CPU: 1 PID: 12684 Comm: syz-executor0 Not tainted 4.14.0-rc1+ #1 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __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:4406 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4461 netif_receive_skb_internal+0x10b/0x670 net/core/dev.c:4534 napi_skb_finish net/core/dev.c:4895 [inline] napi_gro_receive+0x3d0/0x500 net/core/dev.c:4926 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:5537 [inline] net_rx_action+0x792/0x1910 net/core/dev.c:5603 __do_softirq+0x2bb/0xbd0 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x1d3/0x210 kernel/softirq.c:405 TCP: request_sock_TCPv6: Possible SYN flooding on port 20021. Sending cookies. Check SNMP counters. exiting_irq arch/x86/include/asm/apic.h:638 [inline] do_IRQ+0xf6/0x190 arch/x86/kernel/irq.c:253 common_interrupt+0x9d/0x9d arch/x86/entry/entry_64.S:598 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:777 [inline] RIP: 0010:lock_release+0x69b/0xd70 kernel/locking/lockdep.c:4024 RSP: 0018:ffff8801b3b46c20 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff1e RAX: dffffc0000000000 RBX: 1ffff10036768d89 RCX: ffff8801c5ebe978 RDX: 1ffffffff0b59335 RSI: 0000000000000002 RDI: 0000000000000282 RBP: ffff8801b3b46dd0 R08: 0000000000000000 R09: 1ffff10036768d95 R10: ffff8801c5ebe080 R11: 0000000000000001 R12: ffff8801b3b46ca8 R13: ffff8801c5ebe080 R14: 16fb0df9f74494d6 R15: 0000000000000003 rcu_lock_release include/linux/rcupdate.h:249 [inline] rcu_read_unlock include/linux/rcupdate.h:686 [inline] __unlock_page_memcg+0x72/0x100 mm/memcontrol.c:1697 unlock_page_memcg+0x2c/0x40 mm/memcontrol.c:1706 page_remove_file_rmap mm/rmap.c:1244 [inline] page_remove_rmap+0x3b7/0xcb0 mm/rmap.c:1295 TCP: request_sock_TCPv6: Possible SYN flooding on port 20021. Sending cookies. Check SNMP counters. zap_pte_range mm/memory.c:1333 [inline] zap_pmd_range mm/memory.c:1437 [inline] zap_pud_range mm/memory.c:1466 [inline] zap_p4d_range mm/memory.c:1487 [inline] unmap_page_range+0xfc3/0x22e0 mm/memory.c:1508 unmap_single_vma+0x15f/0x2d0 mm/memory.c:1553 unmap_vmas+0xf1/0x1b0 mm/memory.c:1583 exit_mmap+0x232/0x530 mm/mmap.c:3003 __mmput kernel/fork.c:924 [inline] mmput+0x223/0x6d0 kernel/fork.c:945 exit_mm kernel/exit.c:544 [inline] do_exit+0x9a1/0x1b40 kernel/exit.c:852 do_group_exit+0x149/0x400 kernel/exit.c:968 SYSC_exit_group kernel/exit.c:979 [inline] SyS_exit_group+0x1d/0x20 kernel/exit.c:977 do_syscall_32_irqs_on arch/x86/entry/common.c:329 [inline] do_fast_syscall_32+0x3f2/0xeed arch/x86/entry/common.c:391 entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 RIP: 0023:0xf7f75c79 RSP: 002b:000000000846f9bc EFLAGS: 00000206 ORIG_RAX: 00000000000000fc RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 12667: 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+0x136/0x750 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 compat_packet_setsockopt+0xe1/0x140 net/packet/af_packet.c:3967 C_SYSC_setsockopt net/compat.c:396 [inline] compat_SyS_setsockopt+0x17c/0x410 net/compat.c:379 do_syscall_32_irqs_on arch/x86/entry/common.c:329 [inline] do_fast_syscall_32+0x3f2/0xeed arch/x86/entry/common.c:391 entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 Freed by task 12671: 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+0x333/0x7f0 fs/file_table.c:210 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x199/0x270 kernel/task_work.c:112 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0xa52/0x1b40 kernel/exit.c:865 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x7e8/0x17e0 kernel/signal.c:2334 do_signal+0x94/0x1ee0 arch/x86/kernel/signal.c:808 exit_to_usermode_loop+0x224/0x300 arch/x86/entry/common.c:158 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:266 [inline] do_syscall_32_irqs_on arch/x86/entry/common.c:335 [inline] do_fast_syscall_32+0x83e/0xeed arch/x86/entry/common.c:391 entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 The buggy address belongs to the object at ffff8801c7eda540 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2176 bytes inside of 4096-byte region [ffff8801c7eda540, ffff8801c7edb540) The buggy address belongs to the page: page:ffffea00071fb680 count:1 mapcount:0 mapping:ffff8801c7eda540 index:0x0 compound_mapcount: 0 flags: 0x200000000008100(slab|head) raw: 0200000000008100 ffff8801c7eda540 0000000000000000 0000000100000001 raw: ffffea000765aca0 ffffea00073ceea0 ffff8801dac00dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c7edac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c7edad00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801c7edad80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801c7edae00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801c7edae80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================