================================================================== BUG: KASAN: use-after-free in __get_unaligned_cpu32 include/linux/unaligned/packed_struct.h:19 [inline] BUG: KASAN: use-after-free in mc_hash drivers/net/macvlan.c:255 [inline] BUG: KASAN: use-after-free in macvlan_broadcast+0x4b9/0x5c0 drivers/net/macvlan.c:281 Read of size 4 at addr ffff88809e79f801 by task syz-executor.0/9478 CPU: 0 PID: 9478 Comm: syz-executor.0 Not tainted 4.14.162-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393 __asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:440 __get_unaligned_cpu32 include/linux/unaligned/packed_struct.h:19 [inline] mc_hash drivers/net/macvlan.c:255 [inline] macvlan_broadcast+0x4b9/0x5c0 drivers/net/macvlan.c:281 macvlan_queue_xmit drivers/net/macvlan.c:522 [inline] macvlan_start_xmit+0x56b/0x72d drivers/net/macvlan.c:565 __netdev_start_xmit include/linux/netdevice.h:4038 [inline] netdev_start_xmit include/linux/netdevice.h:4047 [inline] packet_direct_xmit+0x431/0x640 net/packet/af_packet.c:269 packet_snd net/packet/af_packet.c:2994 [inline] packet_sendmsg+0x1dd4/0x5a60 net/packet/af_packet.c:3019 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 SYSC_sendto+0x206/0x310 net/socket.c:1763 SyS_sendto+0x40/0x50 net/socket.c:1731 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45af49 RSP: 002b:00007f7d774fbc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 000000000045af49 RDX: 000000000000000e RSI: 0000000020000080 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f7d774fc6d4 R13: 00000000004ca8a7 R14: 00000000004e3ac0 R15: 00000000ffffffff Allocated by task 7241: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc+0x12e/0x780 mm/slab.c:3552 dup_mmap kernel/fork.c:647 [inline] dup_mm kernel/fork.c:1199 [inline] copy_mm kernel/fork.c:1254 [inline] copy_process.part.0+0x455d/0x6a70 kernel/fork.c:1771 copy_process kernel/fork.c:1586 [inline] _do_fork+0x19e/0xce0 kernel/fork.c:2070 SYSC_clone kernel/fork.c:2180 [inline] SyS_clone+0x37/0x50 kernel/fork.c:2174 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 9033: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x83/0x2b0 mm/slab.c:3758 remove_vma+0x161/0x1b0 mm/mmap.c:177 exit_mmap+0x314/0x4e0 mm/mmap.c:3073 __mmput kernel/fork.c:930 [inline] mmput+0x114/0x440 kernel/fork.c:951 exit_mm kernel/exit.c:545 [inline] do_exit+0x6fc/0x2c80 kernel/exit.c:841 do_group_exit+0x111/0x330 kernel/exit.c:951 get_signal+0x381/0x1cd0 kernel/signal.c:2413 do_signal+0x86/0x19a0 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x15c/0x220 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff88809e79f778 which belongs to the cache vm_area_struct of size 200 The buggy address is located 137 bytes inside of 200-byte region [ffff88809e79f778, ffff88809e79f840) The buggy address belongs to the page: page:ffffea000279e7c0 count:1 mapcount:0 mapping:ffff88809e79f040 index:0x0 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88809e79f040 0000000000000000 000000010000000f raw: ffffea00024aade0 ffffea0002446860 ffff88821f830c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809e79f700: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fb ffff88809e79f780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809e79f800: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88809e79f880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809e79f900: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc ==================================================================