==================================================================
BUG: KASAN: slab-use-after-free in dev_hard_header include/linux/netdevice.h:3416 [inline]
BUG: KASAN: slab-use-after-free in ipvlan_hard_header+0xa2/0x120 drivers/net/ipvlan/ipvlan_main.c:383
Read of size 8 at addr ffff88807a458010 by task syz-executor/25452
CPU: 0 UID: 0 PID: 25452 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<IRQ>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
dev_hard_header include/linux/netdevice.h:3416 [inline]
ipvlan_hard_header+0xa2/0x120 drivers/net/ipvlan/ipvlan_main.c:383
dev_hard_header include/linux/netdevice.h:3419 [inline]
tipc_l2_send_msg+0x31f/0x400 net/tipc/bearer.c:514
tipc_bearer_xmit_skb+0x2b3/0x400 net/tipc/bearer.c:575
tipc_disc_timeout+0x580/0x6d0 net/tipc/discover.c:338
call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1748
expire_timers kernel/time/timer.c:1799 [inline]
__run_timers kernel/time/timer.c:2373 [inline]
__run_timer_base+0x61a/0x860 kernel/time/timer.c:2385
run_timer_base kernel/time/timer.c:2394 [inline]
run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2404
handle_softirqs+0x286/0x870 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1052
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:lock_is_held_type+0x137/0x190 kernel/locking/lockdep.c:5945
Code: 01 75 44 48 c7 04 24 00 00 00 00 9c 8f 04 24 f7 04 24 00 02 00 00 75 4c 41 f7 c4 00 02 00 00 74 01 fb 65 48 8b 05 09 ca 27 07 <48> 3b 44 24 08 75 43 89 d8 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f
RSP: 0000:ffffc900043a7898 EFLAGS: 00000206
RAX: 8eadba6c16e4d100 RBX: 0000000000000000 RCX: 8eadba6c16e4d100
RDX: 0000000000000000 RSI: ffffffff8d8f5ae9 RDI: ffffffff8bbf08e0
RBP: 00000000ffffffff R08: 0000000000000000 R09: ffffffff822dc13a
R10: dffffc0000000000 R11: ffffed100a8af69c R12: 0000000000000246
R13: ffff888054579e40 R14: ffffffff8df75558 R15: 0000000000000002
lock_is_held include/linux/lockdep.h:249 [inline]
task_css include/linux/cgroup.h:459 [inline]
mem_cgroup_from_task+0x77/0x120 mm/memcontrol.c:884
current_objcg_update+0x1a8/0x2c0 mm/memcontrol.c:2661
current_obj_cgroup mm/memcontrol.c:2690 [inline]
__memcg_kmem_charge_page+0x1f4/0x240 mm/memcontrol.c:2841
__alloc_frozen_pages_noprof+0x1b5/0x370 mm/page_alloc.c:5195
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
alloc_frozen_pages_noprof mm/mempolicy.c:2487 [inline]
alloc_pages_noprof+0xa9/0x190 mm/mempolicy.c:2507
pagetable_alloc_noprof include/linux/mm.h:2987 [inline]
__pte_alloc_one_noprof include/asm-generic/pgalloc.h:75 [inline]
pte_alloc_one+0x23/0x310 arch/x86/mm/pgtable.c:18
do_fault_around mm/memory.c:5668 [inline]
do_read_fault mm/memory.c:5707 [inline]
do_fault mm/memory.c:5850 [inline]
do_pte_missing mm/memory.c:4362 [inline]
handle_pte_fault mm/memory.c:6195 [inline]
__handle_mm_fault+0x2767/0x5400 mm/memory.c:6336
handle_mm_fault+0x40a/0x8e0 mm/memory.c:6505
do_user_addr_fault+0xa7c/0x1380 arch/x86/mm/fault.c:1336
handle_page_fault arch/x86/mm/fault.c:1476 [inline]
exc_page_fault+0x82/0x100 arch/x86/mm/fault.c:1532
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
RIP: 0033:0x7f5f5e985e93
Code: Unable to access opcode bytes at 0x7f5f5e985e69.
RSP: 002b:00007ffd5ba44ae8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f5f5e985e93
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001
R10: 00005555566907d0 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000927c0 R14: 00000000000a459a R15: 00007ffd5ba44c80
</TASK>
Allocated by task 16907:
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
poison_kmalloc_redzone mm/kasan/common.c:400 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:417
kasan_kmalloc include/linux/kasan.h:262 [inline]
__do_kmalloc_node mm/slub.c:5650 [inline]
__kvmalloc_node_noprof+0x5cd/0x910 mm/slub.c:7112
alloc_netdev_mqs+0xa6/0x11b0 net/core/dev.c:11900
rtnl_create_link+0x31f/0xd10 net/core/rtnetlink.c:3641
rtnl_newlink_create+0x25c/0xb00 net/core/rtnetlink.c:3823
__rtnl_newlink net/core/rtnetlink.c:3950 [inline]
rtnl_newlink+0x16e4/0x1c80 net/core/rtnetlink.c:4065
rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6951
netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2552
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896
sock_sendmsg_nosec net/socket.c:727 [inline]
__sock_sendmsg+0x21c/0x270 net/socket.c:742
__sys_sendto+0x3bd/0x520 net/socket.c:2244
__do_sys_sendto net/socket.c:2251 [inline]
__se_sys_sendto net/socket.c:2247 [inline]
__x64_sys_sendto+0xde/0x100 net/socket.c:2247
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 25442:
kasan_save_stack mm/kasan/common.c:56 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:77
__kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:587
kasan_save_free_info mm/kasan/kasan.h:406 [inline]
poison_slab_object mm/kasan/common.c:252 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:284
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2543 [inline]
slab_free mm/slub.c:6642 [inline]
kfree+0x19a/0x6d0 mm/slub.c:6849
device_release+0x9c/0x1c0 drivers/base/core.c:-1
kobject_cleanup lib/kobject.c:689 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x22b/0x480 lib/kobject.c:737
netdev_run_todo+0xd2e/0xea0 net/core/dev.c:11601
rtnl_unlock net/core/rtnetlink.c:157 [inline]
rtnl_net_unlock include/linux/rtnetlink.h:135 [inline]
rtnl_dellink+0x5aa/0x700 net/core/rtnetlink.c:3571
rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6951
netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2552
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896
sock_sendmsg_nosec net/socket.c:727 [inline]
__sock_sendmsg+0x21c/0x270 net/socket.c:742
____sys_sendmsg+0x505/0x830 net/socket.c:2630
___sys_sendmsg+0x21f/0x2a0 net/socket.c:2684
__sys_sendmsg net/socket.c:2716 [inline]
__do_sys_sendmsg net/socket.c:2721 [inline]
__se_sys_sendmsg net/socket.c:2719 [inline]
__x64_sys_sendmsg+0x19b/0x260 net/socket.c:2719
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88807a458000
which belongs to the cache kmalloc-cg-4k of size 4096
The buggy address is located 16 bytes inside of
freed 4096-byte region [ffff88807a458000, ffff88807a459000)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a458
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888077136081
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801a030500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000040004 00000000f5000000 ffff888077136081
head: 00fff00000000040 ffff88801a030500 dead000000000100 dead000000000122
head: 0000000000000000 0000000000040004 00000000f5000000 ffff888077136081
head: 00fff00000000003 ffffea0001e91601 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 5834, tgid 5834 (syz-executor), ts 80959176365, free_ts 80913942342
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x234/0x290 mm/page_alloc.c:1845
prep_new_page mm/page_alloc.c:1853 [inline]
get_page_from_freelist+0x2365/0x2440 mm/page_alloc.c:3879
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5178
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:3059 [inline]
allocate_slab+0x96/0x350 mm/slub.c:3232
new_slab mm/slub.c:3286 [inline]
___slab_alloc+0xf56/0x1990 mm/slub.c:4655
__slab_alloc+0x65/0x100 mm/slub.c:4778
__slab_alloc_node mm/slub.c:4854 [inline]
slab_alloc_node mm/slub.c:5276 [inline]
__do_kmalloc_node mm/slub.c:5649 [inline]
__kmalloc_noprof+0x471/0x7f0 mm/slub.c:5662
kmalloc_noprof include/linux/slab.h:961 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
__register_sysctl_table+0x72/0x1340 fs/proc/proc_sysctl.c:1379
__addrconf_sysctl_register+0x328/0x4c0 net/ipv6/addrconf.c:7323
addrconf_sysctl_register+0x168/0x1c0 net/ipv6/addrconf.c:7371
ipv6_add_dev+0xd46/0x1370 net/ipv6/addrconf.c:460
addrconf_notify+0x794/0x1010 net/ipv6/addrconf.c:3650
notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2267 [inline]
call_netdevice_notifiers net/core/dev.c:2281 [inline]
register_netdevice+0x1608/0x1ae0 net/core/dev.c:11332
virt_wifi_newlink+0x428/0x860 drivers/net/wireless/virtual/virt_wifi.c:571
page last free pid 5821 tgid 5821 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1394 [inline]
__free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2901
discard_slab mm/slub.c:3330 [inline]
__put_partials+0x146/0x170 mm/slub.c:3876
put_cpu_partial+0x1f2/0x2e0 mm/slub.c:3951
__slab_free+0x2b9/0x390 mm/slub.c:5929
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:352
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4978 [inline]
slab_alloc_node mm/slub.c:5288 [inline]
__kmalloc_cache_noprof+0x36f/0x6f0 mm/slub.c:5766
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
ref_tracker_alloc+0x133/0x460 lib/ref_tracker.c:271
__netdev_tracker_alloc include/linux/netdevice.h:4375 [inline]
netdev_hold include/linux/netdevice.h:4404 [inline]
netdev_queue_add_kobject net/core/net-sysfs.c:1994 [inline]
netdev_queue_update_kobjects+0x1d1/0x6c0 net/core/net-sysfs.c:2056
register_queue_kobjects net/core/net-sysfs.c:2119 [inline]
netdev_register_kobject+0x258/0x310 net/core/net-sysfs.c:2362
register_netdevice+0x126c/0x1ae0 net/core/dev.c:11294
veth_newlink+0x5d4/0xa60 drivers/net/veth.c:1885
rtnl_newlink_create+0x310/0xb00 net/core/rtnetlink.c:3833
__rtnl_newlink net/core/rtnetlink.c:3950 [inline]
rtnl_newlink+0x16e4/0x1c80 net/core/rtnetlink.c:4065
rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6951
Memory state around the buggy address:
ffff88807a457f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807a457f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807a458000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807a458080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807a458100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 01 75 44 add %esi,0x44(%rbp)
3: 48 c7 04 24 00 00 00 movq $0x0,(%rsp)
a: 00
b: 9c pushf
c: 8f 04 24 pop (%rsp)
f: f7 04 24 00 02 00 00 testl $0x200,(%rsp)
16: 75 4c jne 0x64
18: 41 f7 c4 00 02 00 00 test $0x200,%r12d
1f: 74 01 je 0x22
21: fb sti
22: 65 48 8b 05 09 ca 27 mov %gs:0x727ca09(%rip),%rax # 0x727ca33
29: 07
* 2a: 48 3b 44 24 08 cmp 0x8(%rsp),%rax <-- trapping instruction
2f: 75 43 jne 0x74
31: 89 d8 mov %ebx,%eax
33: 48 83 c4 10 add $0x10,%rsp
37: 5b pop %rbx
38: 41 5c pop %r12
3a: 41 5d pop %r13
3c: 41 5e pop %r14
3e: 41 5f pop %r15