netdevsim netdevsim0 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0 ================================================================== BUG: KASAN: use-after-free in ether_addr_equal include/linux/etherdevice.h:329 [inline] BUG: KASAN: use-after-free in ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:599 [inline] BUG: KASAN: use-after-free in ipvlan_queue_xmit+0x158f/0x18a0 drivers/net/ipvlan/ipvlan_core.c:645 Read of size 4 at addr ffff8880179147ff by task syz-executor408/8449 CPU: 0 PID: 8449 Comm: syz-executor408 Not tainted 5.13.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 ether_addr_equal include/linux/etherdevice.h:329 [inline] ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:599 [inline] ipvlan_queue_xmit+0x158f/0x18a0 drivers/net/ipvlan/ipvlan_core.c:645 ipvlan_start_xmit+0x45/0x190 drivers/net/ipvlan/ipvlan_main.c:222 __netdev_start_xmit include/linux/netdevice.h:4944 [inline] netdev_start_xmit include/linux/netdevice.h:4958 [inline] __dev_direct_xmit+0x527/0x730 net/core/dev.c:4314 dev_direct_xmit include/linux/netdevice.h:2958 [inline] packet_direct_xmit+0x1a5/0x280 net/packet/af_packet.c:244 packet_snd net/packet/af_packet.c:3015 [inline] packet_sendmsg+0x22ee/0x5310 net/packet/af_packet.c:3043 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 __sys_sendto+0x21c/0x320 net/socket.c:1964 __do_sys_sendto net/socket.c:1976 [inline] __se_sys_sendto net/socket.c:1972 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1972 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x450f09 Code: a5 01 00 85 c0 b8 00 00 00 00 48 0f 44 c3 5b c3 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00000000005eff28 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000169d2b8 RCX: 0000000000450f09 RDX: 000000000000000e RSI: 0000000020000080 RDI: 0000000000000005 RBP: 00000000005eff70 R08: 0000000020000040 R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000005eff70 R13: 00000000005eff50 R14: 00000000004ce018 R15: 0000000000400538 Allocated by task 1: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:428 [inline] __kasan_slab_alloc+0x84/0xa0 mm/kasan/common.c:461 kasan_slab_alloc include/linux/kasan.h:236 [inline] slab_post_alloc_hook mm/slab.h:524 [inline] slab_alloc_node mm/slub.c:2914 [inline] slab_alloc mm/slub.c:2922 [inline] kmem_cache_alloc+0x219/0x3a0 mm/slub.c:2927 kmem_cache_zalloc include/linux/slab.h:676 [inline] __alloc_file+0x21/0x280 fs/file_table.c:101 alloc_empty_file+0x6d/0x170 fs/file_table.c:150 path_openat+0xe3/0x27e0 fs/namei.c:3480 do_filp_open+0x190/0x3d0 fs/namei.c:3521 do_sys_openat2+0x16d/0x420 fs/open.c:1187 do_sys_open fs/open.c:1203 [inline] __do_sys_open fs/open.c:1211 [inline] __se_sys_open fs/open.c:1207 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1207 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 19: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xfb/0x130 mm/kasan/common.c:368 kasan_slab_free include/linux/kasan.h:212 [inline] slab_free_hook mm/slub.c:1583 [inline] slab_free_freelist_hook+0xdf/0x240 mm/slub.c:1608 slab_free mm/slub.c:3168 [inline] kmem_cache_free+0x8a/0x740 mm/slub.c:3184 rcu_do_batch kernel/rcu/tree.c:2558 [inline] rcu_core+0x7ab/0x13b0 kernel/rcu/tree.c:2793 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3038 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3113 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x281/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 task_work_add+0x3a/0x190 kernel/task_work.c:38 fput_many.part.0+0xbb/0x170 fs/file_table.c:341 fput_many fs/file_table.c:336 [inline] fput+0x3b/0x50 fs/file_table.c:357 path_openat+0x19a8/0x27e0 fs/namei.c:3503 do_filp_open+0x190/0x3d0 fs/namei.c:3521 do_sys_openat2+0x16d/0x420 fs/open.c:1187 do_sys_open fs/open.c:1203 [inline] __do_sys_open fs/open.c:1211 [inline] __se_sys_open fs/open.c:1207 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1207 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888017914780 which belongs to the cache filp of size 464 The buggy address is located 127 bytes inside of 464-byte region [ffff888017914780, ffff888017914950) The buggy address belongs to the page: page:ffffea00005e4500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x17914 head:ffffea00005e4500 order:1 compound_mapcount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff8880111be640 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, ts 66020679659, free_ts 60336647755 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5204 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1646 [inline] allocate_slab+0x2c5/0x4c0 mm/slub.c:1786 new_slab mm/slub.c:1849 [inline] new_slab_objects mm/slub.c:2595 [inline] ___slab_alloc+0x4a1/0x810 mm/slub.c:2758 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2798 slab_alloc_node mm/slub.c:2880 [inline] slab_alloc mm/slub.c:2922 [inline] kmem_cache_alloc+0x34b/0x3a0 mm/slub.c:2927 kmem_cache_zalloc include/linux/slab.h:676 [inline] __alloc_file+0x21/0x280 fs/file_table.c:101 alloc_empty_file+0x6d/0x170 fs/file_table.c:150 path_openat+0xe3/0x27e0 fs/namei.c:3480 do_filp_open+0x190/0x3d0 fs/namei.c:3521 do_sys_openat2+0x16d/0x420 fs/open.c:1187 do_sys_open fs/open.c:1203 [inline] __do_sys_open fs/open.c:1211 [inline] __se_sys_open fs/open.c:1207 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1207 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1298 [inline] free_pcp_prepare+0x223/0x300 mm/page_alloc.c:1342 free_unref_page_prepare mm/page_alloc.c:3250 [inline] free_unref_page+0x12/0x1d0 mm/page_alloc.c:3298 kasan_depopulate_vmalloc_pte+0x5c/0x70 mm/kasan/shadow.c:369 apply_to_pte_range mm/memory.c:2436 [inline] apply_to_pmd_range mm/memory.c:2480 [inline] apply_to_pud_range mm/memory.c:2516 [inline] apply_to_p4d_range mm/memory.c:2552 [inline] __apply_to_page_range+0x69a/0x1050 mm/memory.c:2586 kasan_release_vmalloc+0xa7/0xc0 mm/kasan/shadow.c:479 __purge_vmap_area_lazy+0x8f9/0x1c50 mm/vmalloc.c:1652 _vm_unmap_aliases.part.0+0x3dd/0x4f0 mm/vmalloc.c:2055 _vm_unmap_aliases mm/vmalloc.c:2029 [inline] vm_unmap_aliases+0x47/0x50 mm/vmalloc.c:2078 change_page_attr_set_clr+0x241/0x500 arch/x86/mm/pat/set_memory.c:1740 change_page_attr_clear arch/x86/mm/pat/set_memory.c:1797 [inline] set_memory_ro+0x78/0xa0 arch/x86/mm/pat/set_memory.c:1943 bpf_jit_binary_lock_ro include/linux/filter.h:852 [inline] bpf_int_jit_compile+0xe11/0x11b0 arch/x86/net/bpf_jit_comp.c:2329 bpf_prog_select_runtime+0x464/0x6a0 kernel/bpf/core.c:1867 bpf_migrate_filter+0x2dc/0x380 net/core/filter.c:1294 bpf_prepare_filter net/core/filter.c:1342 [inline] bpf_prog_create_from_user+0x51b/0x660 net/core/filter.c:1436 seccomp_prepare_filter kernel/seccomp.c:664 [inline] seccomp_prepare_user_filter kernel/seccomp.c:701 [inline] seccomp_set_mode_filter kernel/seccomp.c:1813 [inline] do_seccomp+0x38d/0x2870 kernel/seccomp.c:1933 prctl_set_seccomp+0x4a/0x70 kernel/seccomp.c:1986 Memory state around the buggy address: ffff888017914680: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc ffff888017914700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888017914780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888017914800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888017914880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================