dev_remove_pack: ffff8801d8e87600 not found ================================================================== BUG: KASAN: use-after-free in fanout_demux_rollover+0x49b/0x4d0 net/packet/af_packet.c:1387 at addr ffff8801d8e875b8 Read of size 8 by task syz-executor1/3302 CPU: 0 PID: 3302 Comm: syz-executor1 Not tainted 4.9.49-g5316da5 #45 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801db2077e0 ffffffff81d92f89 ffff8801da002000 ffff8801d8e86e80 ffff8801d8e87680 ffffed003b1d0eb7 ffff8801d8e875b8 ffff8801db207808 ffffffff8153cbcc ffffed003b1d0eb7 ffff8801da002000 0000000000000000 Call Trace: [ 187.694789] [] __dump_stack lib/dump_stack.c:15 [inline] [ 187.694789] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:330 [inline] [] __asan_report_load8_noabort+0x29/0x30 mm/kasan/report.c:330 [] fanout_demux_rollover+0x49b/0x4d0 net/packet/af_packet.c:1387 [] packet_rcv_fanout+0x3e6/0x620 net/packet/af_packet.c:1473 [] deliver_skb net/core/dev.c:1834 [inline] [] deliver_ptype_list_skb net/core/dev.c:1849 [inline] [] __netif_receive_skb_core+0x887/0x29e0 net/core/dev.c:4220 [] __netif_receive_skb+0x5b/0x1c0 net/core/dev.c:4275 [] netif_receive_skb_internal+0xff/0x390 net/core/dev.c:4303 [] napi_skb_finish net/core/dev.c:4661 [inline] [] napi_gro_receive+0x1fb/0x400 net/core/dev.c:4691 [] receive_buf drivers/net/virtio_net.c:508 [inline] [] virtnet_receive+0xe1c/0x1cf0 drivers/net/virtio_net.c:723 [] virtnet_poll+0x26/0x140 drivers/net/virtio_net.c:741 [] napi_poll net/core/dev.c:5197 [inline] [] net_rx_action+0x396/0xe00 net/core/dev.c:5262 [] __do_softirq+0x22d/0x964 kernel/softirq.c:284 [] invoke_softirq kernel/softirq.c:364 [inline] [] irq_exit+0x165/0x190 kernel/softirq.c:405 [] exiting_irq arch/x86/include/asm/apic.h:659 [inline] [] do_IRQ+0x107/0x1b0 arch/x86/kernel/irq.c:251 [] common_interrupt+0x8c/0x8c arch/x86/entry/entry_64.S:520 [ 187.918112] [] ? memcmp+0x95/0x160 lib/string.c:768 [] find_stack lib/stackdepot.c:176 [inline] [] depot_save_stack+0x122/0x4a0 lib/stackdepot.c:225 [] save_stack+0xa3/0xd0 mm/kasan/kasan.c:501 [] set_track mm/kasan/kasan.c:507 [inline] [] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 [] kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:537 [] slab_post_alloc_hook mm/slab.h:417 [inline] [] slab_alloc_node mm/slub.c:2715 [inline] [] slab_alloc mm/slub.c:2723 [inline] [] kmem_cache_alloc+0xba/0x290 mm/slub.c:2728 [] anon_vma_chain_alloc mm/rmap.c:125 [inline] [] anon_vma_clone+0xde/0x4a0 mm/rmap.c:266 [] anon_vma_fork+0x87/0x4b0 mm/rmap.c:329 [] dup_mmap kernel/fork.c:616 [inline] [] dup_mm kernel/fork.c:1144 [inline] [] copy_mm kernel/fork.c:1198 [inline] [] copy_process.part.51+0x4506/0x5d40 kernel/fork.c:1664 [] copy_process kernel/fork.c:1491 [inline] [] _do_fork+0x1c0/0xd70 kernel/fork.c:1949 [] SYSC_clone kernel/fork.c:2059 [inline] [] SyS_clone+0x37/0x50 kernel/fork.c:2053 [] do_syscall_64+0x197/0x490 arch/x86/entry/common.c:280 [] entry_SYSCALL64_slow_path+0x25/0x25 Object at ffff8801d8e86e80, in cache kmalloc-2048 size: 2048 Allocated: PID = 11180 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 __kmalloc+0x11d/0x310 mm/slub.c:3741 kmalloc include/linux/slab.h:495 [inline] sk_prot_alloc+0x101/0x2a0 net/core/sock.c:1338 sk_alloc+0x3a/0x3a0 net/core/sock.c:1394 packet_create+0xf0/0x8e0 net/packet/af_packet.c:3205 __sock_create+0x3ab/0x640 net/socket.c:1182 sock_create net/socket.c:1222 [inline] SYSC_socket net/socket.c:1252 [inline] SyS_socket+0xf0/0x1b0 net/socket.c:1232 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 11180 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kfree+0xf0/0x2f0 mm/slub.c:3878 sk_prot_free net/core/sock.c:1377 [inline] __sk_destruct+0x47f/0x570 net/core/sock.c:1455 sk_destruct+0x47/0x80 net/core/sock.c:1463 __sk_free+0x57/0x230 net/core/sock.c:1471 sk_free+0x23/0x30 net/core/sock.c:1482 sock_put include/net/sock.h:1592 [inline] packet_release+0x732/0xa20 net/packet/af_packet.c:3041 sock_release+0x8d/0x1e0 net/socket.c:599 sock_close+0x16/0x20 net/socket.c:1046 __fput+0x28c/0x6e0 fs/file_table.c:208 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x115/0x190 kernel/task_work.c:116 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0x82e/0x2a50 kernel/exit.c:833 do_group_exit+0x108/0x320 kernel/exit.c:937 get_signal+0x55c/0x1600 kernel/signal.c:2315 do_signal+0x87/0x1960 arch/x86/kernel/signal.c:807 exit_to_usermode_loop+0xe5/0x130 arch/x86/entry/common.c:156 prepare_exit_to_usermode arch/x86/entry/common.c:190 [inline] syscall_return_slowpath+0x1a0/0x1e0 arch/x86/entry/common.c:259 entry_SYSCALL_64_fastpath+0xc4/0xc6 Memory state around the buggy address: ffff8801d8e87480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d8e87500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801d8e87580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801d8e87600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801d8e87680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ================================================================== BUG: KASAN: use-after-free in fanout_demux_rollover+0x4bc/0x4d0 net/packet/af_packet.c:1387 at addr ffff8801cae74a80 Read of size 4 by task syz-executor1/3302 CPU: 0 PID: 3302 Comm: syz-executor1 Tainted: G B 4.9.49-g5316da5 #45 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801db2077e0 ffffffff81d92f89 ffff8801da001640 ffff8801cae74a80 ffff8801cae74b00 ffffed00395ce950 ffff8801cae74a80 ffff8801db207808 ffffffff8153cbcc ffffed00395ce950 ffff8801da001640 0000000000000000 Call Trace: [ 188.484039] [] __dump_stack lib/dump_stack.c:15 [inline] [ 188.484039] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:329 [inline] [] __asan_report_load4_noabort+0x29/0x30 mm/kasan/report.c:329 [] fanout_demux_rollover+0x4bc/0x4d0 net/packet/af_packet.c:1387 [] packet_rcv_fanout+0x3e6/0x620 net/packet/af_packet.c:1473 [] deliver_skb net/core/dev.c:1834 [inline] [] deliver_ptype_list_skb net/core/dev.c:1849 [inline] [] __netif_receive_skb_core+0x887/0x29e0 net/core/dev.c:4220 [] __netif_receive_skb+0x5b/0x1c0 net/core/dev.c:4275 [] netif_receive_skb_internal+0xff/0x390 net/core/dev.c:4303 [] napi_skb_finish net/core/dev.c:4661 [inline] [] napi_gro_receive+0x1fb/0x400 net/core/dev.c:4691 [] receive_buf drivers/net/virtio_net.c:508 [inline] [] virtnet_receive+0xe1c/0x1cf0 drivers/net/virtio_net.c:723