================================================================== BUG: KASAN: slab-use-after-free in macvlan_forward_source+0x5d8/0x700 drivers/net/macvlan.c:442 Read of size 2 at addr ffff888028d26dfc by task syz.4.2652/15566 CPU: 1 UID: 0 PID: 15566 Comm: syz.4.2652 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/13/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 macvlan_forward_source+0x5d8/0x700 drivers/net/macvlan.c:442 macvlan_handle_frame+0x2e2/0x12e0 drivers/net/macvlan.c:477 __netif_receive_skb_core+0x98f/0x30a0 net/core/dev.c:6039 __netif_receive_skb_one_core net/core/dev.c:6150 [inline] __netif_receive_skb net/core/dev.c:6265 [inline] netif_receive_skb_internal net/core/dev.c:6351 [inline] netif_receive_skb+0x1fe/0xbb0 net/core/dev.c:6410 tun_rx_batched+0x1de/0x790 drivers/net/tun.c:1485 tun_get_user+0x2a78/0x3dd0 drivers/net/tun.c:1953 tun_chr_write_iter+0x113/0x200 drivers/net/tun.c:1999 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x61d/0xb90 fs/read_write.c:686 ksys_write+0x150/0x270 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fba5df5b78e Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08 RSP: 002b:00007fba5ee4afb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fba5ee4b6c0 RCX: 00007fba5df5b78e RDX: 000000000000006e RSI: 0000200000000080 RDI: 00000000000000c8 RBP: 00007fba5e008c1f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fba5e216128 R14: 00007fba5e216090 R15: 00007fff4c1c8888 Allocated by task 15383: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5657 [inline] __kvmalloc_node_noprof+0x59a/0x8d0 mm/slub.c:7140 seq_buf_alloc fs/seq_file.c:38 [inline] traverse+0xde/0x580 fs/seq_file.c:102 seq_read_iter+0xd08/0xe10 fs/seq_file.c:195 do_iter_readv_writev+0x619/0x8c0 fs/read_write.c:-1 vfs_readv+0x288/0x840 fs/read_write.c:1018 do_preadv fs/read_write.c:1132 [inline] __do_sys_preadv fs/read_write.c:1179 [inline] __se_sys_preadv fs/read_write.c:1174 [inline] __x64_sys_preadv+0x19f/0x2a0 fs/read_write.c:1174 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 15382: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2540 [inline] slab_free mm/slub.c:6674 [inline] kfree+0x1be/0x650 mm/slub.c:6882 seq_release+0x54/0x70 fs/seq_file.c:355 kernfs_fop_release+0x30f/0x460 fs/kernfs/file.c:784 __fput+0x44f/0xa70 fs/file_table.c:468 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:44 [inline] exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:75 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline] do_syscall_64+0x2b7/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888028d26000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 3580 bytes inside of freed 4096-byte region [ffff888028d26000, ffff888028d27000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x28d20 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880311f7e81 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813fe30500 ffffea0000a99c00 0000000000000002 raw: 0000000000000000 0000000000040004 00000000f5000000 ffff8880311f7e81 head: 00fff00000000040 ffff88813fe30500 ffffea0000a99c00 0000000000000002 head: 0000000000000000 0000000000040004 00000000f5000000 ffff8880311f7e81 head: 00fff00000000003 ffffea0000a34801 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 14073, tgid 14071 (syz.1.2259), ts 344621616476, free_ts 344619072302 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x228/0x280 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3945 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5240 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2486 alloc_slab_page mm/slub.c:3075 [inline] allocate_slab+0x86/0x3a0 mm/slub.c:3248 new_slab mm/slub.c:3302 [inline] ___slab_alloc+0xd82/0x1760 mm/slub.c:4656 __slab_alloc+0x65/0x100 mm/slub.c:4779 __slab_alloc_node mm/slub.c:4855 [inline] slab_alloc_node mm/slub.c:5251 [inline] __kmalloc_cache_noprof+0x40d/0x6e0 mm/slub.c:5775 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] snmp6_alloc_dev net/ipv6/addrconf.c:362 [inline] ipv6_add_dev+0x6aa/0x13a0 net/ipv6/addrconf.c:413 addrconf_notify+0x771/0x1050 net/ipv6/addrconf.c:3650 notifier_call_chain+0x19d/0x3a0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2281 [inline] call_netdevice_notifiers net/core/dev.c:2295 [inline] register_netdevice+0x171a/0x1cd0 net/core/dev.c:11444 register_netdev+0x40/0x60 net/core/dev.c:11522 vti6_init_net+0x238/0x370 net/ipv6/ip6_vti.c:1158 ops_init+0x35c/0x5c0 net/core/net_namespace.c:137 setup_net+0x118/0x340 net/core/net_namespace.c:446 page last free pid 14124 tgid 14121 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xbf8/0xd70 mm/page_alloc.c:2973 bpf_check+0x168af/0x1c4c0 kernel/bpf/verifier.c:25401 bpf_prog_load+0x1484/0x1ae0 kernel/bpf/syscall.c:3088 __sys_bpf+0x570/0x920 kernel/bpf/syscall.c:6164 __do_sys_bpf kernel/bpf/syscall.c:6274 [inline] __se_sys_bpf kernel/bpf/syscall.c:6272 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6272 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xe2/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888028d26c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888028d26d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888028d26d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888028d26e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888028d26e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================