================================================================== 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+0x1322/0x16e0 drivers/net/ipvlan/ipvlan_core.c:645 Read of size 4 at addr ffff8880191be3ff by task syz-executor.0/5887 CPU: 1 PID: 5887 Comm: syz-executor.0 Not tainted 5.11.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x9a/0xcc lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 ether_addr_equal include/linux/etherdevice.h:329 [inline] ipvlan_xmit_mode_l2 drivers/net/ipvlan/ipvlan_core.c:599 [inline] ipvlan_queue_xmit+0x1322/0x16e0 drivers/net/ipvlan/ipvlan_core.c:645 ipvlan_start_xmit+0x40/0x160 drivers/net/ipvlan/ipvlan_main.c:222 __netdev_start_xmit include/linux/netdevice.h:4778 [inline] netdev_start_xmit include/linux/netdevice.h:4792 [inline] __dev_direct_xmit+0x472/0x670 net/core/dev.c:4219 dev_direct_xmit include/linux/netdevice.h:2857 [inline] packet_direct_xmit+0x1a0/0x250 net/packet/af_packet.c:244 packet_snd net/packet/af_packet.c:3006 [inline] packet_sendmsg+0x1e46/0x47c0 net/packet/af_packet.c:3031 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xab/0xe0 net/socket.c:672 __sys_sendto+0x1a4/0x270 net/socket.c:1975 __do_sys_sendto net/socket.c:1987 [inline] __se_sys_sendto net/socket.c:1983 [inline] __x64_sys_sendto+0xd8/0x1b0 net/socket.c:1983 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fe3bc7ef279 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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:00007fe3bbf64168 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fe3bc901f80 RCX: 00007fe3bc7ef279 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fe3bc849189 R08: 00000000200000c0 R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe6afd5b3f R14: 00007fe3bbf64300 R15: 0000000000022000 Allocated by task 5682: 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:401 [inline] ____kasan_kmalloc.constprop.0+0x82/0xa0 mm/kasan/common.c:429 kmalloc include/linux/slab.h:557 [inline] tomoyo_realpath_from_path+0xb0/0x6a0 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x21c/0x2c0 security/tomoyo/file.c:771 security_file_open+0x43/0x400 security/security.c:1576 do_dentry_open+0x30d/0xfb0 fs/open.c:804 do_open fs/namei.c:3254 [inline] path_openat+0x129c/0x2190 fs/namei.c:3371 do_filp_open+0x16d/0x390 fs/namei.c:3398 do_sys_openat2+0x11e/0x360 fs/open.c:1172 do_sys_open fs/open.c:1188 [inline] __do_sys_openat fs/open.c:1204 [inline] __se_sys_openat fs/open.c:1199 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1199 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 5682: 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:356 ____kasan_slab_free+0xe1/0x110 mm/kasan/common.c:362 kasan_slab_free include/linux/kasan.h:192 [inline] slab_free_hook mm/slub.c:1547 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1580 slab_free mm/slub.c:3143 [inline] kfree+0xdb/0x3b0 mm/slub.c:4139 tomoyo_realpath_from_path+0x14b/0x6a0 security/tomoyo/realpath.c:291 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x21c/0x2c0 security/tomoyo/file.c:771 security_file_open+0x43/0x400 security/security.c:1576 do_dentry_open+0x30d/0xfb0 fs/open.c:804 do_open fs/namei.c:3254 [inline] path_openat+0x129c/0x2190 fs/namei.c:3371 do_filp_open+0x16d/0x390 fs/namei.c:3398 do_sys_openat2+0x11e/0x360 fs/open.c:1172 do_sys_open fs/open.c:1188 [inline] __do_sys_openat fs/open.c:1204 [inline] __se_sys_openat fs/open.c:1199 [inline] __x64_sys_openat+0x11b/0x1d0 fs/open.c:1199 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880191be000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1023 bytes inside of 4096-byte region [ffff8880191be000, ffff8880191bf000) The buggy address belongs to the page: page:00000000ec32e922 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x191b8 head:00000000ec32e922 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff88800f442140 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5002, ts 20250462650 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x144/0x1c0 mm/page_alloc.c:2297 prep_new_page mm/page_alloc.c:2306 [inline] get_page_from_freelist+0x1c6e/0x3f80 mm/page_alloc.c:3945 __alloc_pages_nodemask+0x2d6/0x730 mm/page_alloc.c:4995 alloc_pages include/linux/gfp.h:547 [inline] alloc_slab_page mm/slub.c:1618 [inline] allocate_slab+0x2b6/0x4a0 mm/slub.c:1758 new_slab mm/slub.c:1821 [inline] new_slab_objects mm/slub.c:2578 [inline] ___slab_alloc+0x476/0x790 mm/slub.c:2741 __slab_alloc.constprop.0+0x95/0xe0 mm/slub.c:2781 slab_alloc_node mm/slub.c:2857 [inline] slab_alloc mm/slub.c:2900 [inline] kmem_cache_alloc_trace+0x2cc/0x360 mm/slub.c:2917 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:682 [inline] tomoyo_find_next_domain+0x112/0x1c40 security/tomoyo/domain.c:714 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:101 [inline] tomoyo_bprm_check_security+0xfb/0x170 security/tomoyo/tomoyo.c:91 security_bprm_check+0x34/0x70 security/security.c:842 search_binary_handler fs/exec.c:1704 [inline] exec_binprm fs/exec.c:1757 [inline] bprm_execve fs/exec.c:1826 [inline] bprm_execve+0x5ec/0x1520 fs/exec.c:1788 do_execveat_common+0x558/0x740 fs/exec.c:1915 do_execve fs/exec.c:1983 [inline] __do_sys_execve fs/exec.c:2059 [inline] __se_sys_execve fs/exec.c:2054 [inline] __x64_sys_execve+0x8a/0xb0 fs/exec.c:2054 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1271 [inline] __free_pages_ok+0x4da/0xed0 mm/page_alloc.c:1536 unfreeze_partials+0x16c/0x1b0 mm/slub.c:2359 put_cpu_partial+0x129/0x200 mm/slub.c:2395 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_kmalloc_large+0x8f/0xa0 mm/kasan/common.c:455 kmalloc_order_trace+0x14/0x130 mm/slab_common.c:853 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:682 [inline] proc_sys_call_handler+0x1b3/0x4c0 fs/proc/proc_sysctl.c:574 call_read_iter include/linux/fs.h:1895 [inline] new_sync_read+0x35a/0x5f0 fs/read_write.c:415 vfs_read+0x264/0x470 fs/read_write.c:496 ksys_read+0xf4/0x1d0 fs/read_write.c:634 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Memory state around the buggy address: ffff8880191be280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880191be300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880191be380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880191be400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880191be480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================