dev_remove_pack: ffff8801d0e295c0 not found ================================================================== BUG: KASAN: use-after-free in packet_rcv_fanout+0x78a/0x7d0 net/packet/af_packet.c:1490 Read of size 8 at addr ffff8801d4210850 by task syz-executor0/7857 CPU: 1 PID: 7857 Comm: syz-executor0 Not tainted 4.13.0-next-20170911+ #19 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_load8_noabort+0x14/0x20 mm/kasan/report.c:430 packet_rcv_fanout+0x78a/0x7d0 net/packet/af_packet.c:1490 deliver_skb net/core/dev.c:1859 [inline] dev_queue_xmit_nit+0x2d4/0xae0 net/core/dev.c:1915 xmit_one net/core/dev.c:2971 [inline] dev_hard_start_xmit+0x16b/0xac0 net/core/dev.c:2991 sch_direct_xmit+0x31d/0x6d0 net/sched/sch_generic.c:186 __dev_xmit_skb net/core/dev.c:3173 [inline] __dev_queue_xmit+0x15fe/0x1e40 net/core/dev.c:3440 dev_queue_xmit+0x17/0x20 net/core/dev.c:3505 neigh_hh_output include/net/neighbour.h:471 [inline] neigh_output include/net/neighbour.h:479 [inline] ip6_finish_output2+0x13c4/0x22a0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x2f9/0x920 net/ipv6/ip6_output.c:146 NF_HOOK_COND include/linux/netfilter.h:238 [inline] ip6_output+0x1f4/0x850 net/ipv6/ip6_output.c:163 dst_output include/net/dst.h:472 [inline] NF_HOOK include/linux/netfilter.h:249 [inline] ndisc_send_skb+0x8fd/0x1180 net/ipv6/ndisc.c:483 ndisc_send_rs+0x12a/0x550 net/ipv6/ndisc.c:672 addrconf_rs_timer+0x32e/0x650 net/ipv6/addrconf.c:3744 call_timer_fn+0x246/0x850 kernel/time/timer.c:1281 expire_timers kernel/time/timer.c:1320 [inline] __run_timers+0x7fd/0xb90 kernel/time/timer.c:1620 run_timer_softirq+0x4c/0xb0 kernel/time/timer.c:1646 __do_softirq+0x2bb/0xbd0 kernel/softirq.c:284 invoke_softirq kernel/softirq.c:364 [inline] irq_exit+0x1d3/0x210 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x177/0x710 arch/x86/kernel/apic/apic.c:1048 apic_timer_interrupt+0x9d/0xb0 arch/x86/entry/entry_64.S:770 RIP: 0010:clear_page_erms+0x7/0x10 arch/x86/lib/clear_page_64.S:49 RSP: 0000:ffff8801d7577708 EFLAGS: 00010246 ORIG_RAX: ffffffffffffff10 RAX: 0000000000000000 RBX: 000000000000016a RCX: 0000000000000840 RDX: 0000000000000000 RSI: ffff8801caafc080 RDI: ffff8801bbf6a7c0 RBP: ffff8801d7577770 R08: 0000160000000000 R09: 0000000000000000 R10: ffffffffffffffe8 R11: 0000000000000000 R12: dffffc0000000000 R13: ffff8801caafc080 R14: ffff8801caafc080 R15: ffff8801caafc080 __do_huge_pmd_anonymous_page mm/huge_memory.c:570 [inline] do_huge_pmd_anonymous_page+0x59c/0x1ba0 mm/huge_memory.c:728 create_huge_pmd mm/memory.c:3802 [inline] __handle_mm_fault+0x1827/0x39c0 mm/memory.c:4005 handle_mm_fault+0x334/0x8d0 mm/memory.c:4071 __do_page_fault+0x4f6/0xb60 arch/x86/mm/fault.c:1445 do_page_fault+0xee/0x720 arch/x86/mm/fault.c:1520 page_fault+0x22/0x30 arch/x86/entry/entry_64.S:1066 RIP: 0033:0x405424 RSP: 002b:00007ffc05fd2a90 EFLAGS: 00010246 RAX: 0000000020d87000 RBX: 0000000000000004 RCX: 0000000000000004 RDX: 0b560e42c11b4dad RSI: 0000000000000000 RDI: 00000000016c7848 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 00007ffc05fd2b30 R11: 0000000000000206 R12: fffffffffffffffe R13: 0000000000718000 R14: 0000000020d87000 R15: 0000000000000016 Allocated by task 6371: 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 __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x162/0x760 mm/slab.c:3734 kmalloc include/linux/slab.h:498 [inline] sk_prot_alloc+0x101/0x2a0 net/core/sock.c:1469 sk_alloc+0x89/0x700 net/core/sock.c:1525 packet_create+0x169/0xb00 net/packet/af_packet.c:3211 __sock_create+0x4d4/0x850 net/socket.c:1262 sock_create net/socket.c:1302 [inline] SYSC_socket net/socket.c:1332 [inline] SyS_socket+0xeb/0x200 net/socket.c:1312 entry_SYSCALL_64_fastpath+0x1f/0xbe Freed by task 6371: 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 sk_prot_free net/core/sock.c:1508 [inline] __sk_destruct+0x74a/0x910 net/core/sock.c:1587 sk_destruct+0x47/0x80 net/core/sock.c:1595 __sk_free+0x57/0x230 net/core/sock.c:1603 sk_free+0x2a/0x40 net/core/sock.c:1614 sock_put include/net/sock.h:1649 [inline] packet_release+0x859/0xd70 net/packet/af_packet.c:3047 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+0x42f/0x500 arch/x86/entry/common.c:266 entry_SYSCALL_64_fastpath+0xbc/0xbe The buggy address belongs to the object at ffff8801d4210080 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 2000 bytes inside of 2048-byte region [ffff8801d4210080, ffff8801d4210880) The buggy address belongs to the page: page:ffffea0007508400 count:1 mapcount:0 mapping:ffff8801d4210080 index:0x0 compound_mapcount: 0 flags: 0x200000000008100(slab|head) raw: 0200000000008100 ffff8801d4210080 0000000000000000 0000000100000003 raw: ffffea00075375a0 ffffea00075014a0 ffff8801dac00c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d4210700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d4210780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801d4210800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801d4210880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801d4210900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================