================================================================== 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 ffff88006cf4ea80 by task ksoftirqd/0/8 CPU: 0 PID: 8 Comm: ksoftirqd/0 Not tainted 4.13.0-rc7-next-20170901+ #13 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 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: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 e1000_receive_skb drivers/net/ethernet/intel/e1000/e1000_main.c:4018 [inline] e1000_clean_rx_irq+0x58d/0x1330 drivers/net/ethernet/intel/e1000/e1000_main.c:4474 e1000_clean+0xb39/0x2610 drivers/net/ethernet/intel/e1000/e1000_main.c:3819 napi_poll net/core/dev.c:5530 [inline] net_rx_action+0x792/0x1910 net/core/dev.c:5596 __do_softirq+0x2bb/0xbd0 kernel/softirq.c:284 run_ksoftirqd+0x50/0x100 kernel/softirq.c:676 smpboot_thread_fn+0x489/0x850 kernel/smpboot.c:164 kthread+0x39c/0x470 kernel/kthread.c:231 ret_from_fork+0x2a/0x40 arch/x86/entry/entry_64.S:431 Allocated by task 4148: 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 SYSC_setsockopt net/socket.c:1852 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1831 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 4107: 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:246 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 SYSC_exit_group kernel/exit.c:979 [inline] SyS_exit_group+0x1d/0x20 kernel/exit.c:977 entry_SYSCALL_64_fastpath+0x1f/0xbe The buggy address belongs to the object at ffff88006cf4e200 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2176 bytes inside of 4096-byte region [ffff88006cf4e200, ffff88006cf4f200) The buggy address belongs to the page: page:ffffea0001b3d380 count:1 mapcount:0 mapping:ffff88006cf4e200 index:0x0 compound_mapcount: 0 flags: 0x500000000008100(slab|head) raw: 0500000000008100 ffff88006cf4e200 0000000000000000 0000000100000001 raw: ffffea0001b3a920 ffffea0001a7d0a0 ffff88003e800dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88006cf4e980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88006cf4ea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88006cf4ea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88006cf4eb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88006cf4eb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================