device veth1_macvtap left promiscuous mode
device veth0_vlan left promiscuous mode
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:72 [inline]
BUG: KASAN: use-after-free in atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:147 [inline]
BUG: KASAN: use-after-free in tcp_metrics_flush_all+0xd3/0x210 net/ipv4/tcp_metrics.c:909
Read of size 4 at addr ffff88810ca3350c by task kworker/u4:3/304
CPU: 1 PID: 304 Comm: kworker/u4:3 Tainted: G W 6.1.141-syzkaller-00037-gfa7e0538663e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: netns cleanup_net
Call Trace:
__dump_stack+0x21/0x24 lib/dump_stack.c:88
dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106
print_address_description+0x71/0x210 mm/kasan/report.c:316
print_report+0x4a/0x60 mm/kasan/report.c:427
kasan_report+0x122/0x150 mm/kasan/report.c:531
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x280/0x290 mm/kasan/generic.c:189
__kasan_check_read+0x11/0x20 mm/kasan/shadow.c:31
instrument_atomic_read include/linux/instrumented.h:72 [inline]
atomic_read include/linux/atomic/atomic-instrumented.h:27 [inline]
refcount_read include/linux/refcount.h:147 [inline]
tcp_metrics_flush_all+0xd3/0x210 net/ipv4/tcp_metrics.c:909
tcp_net_metrics_exit_batch+0x10/0x20 net/ipv4/tcp_metrics.c:1037
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x62d/0xb00 net/core/net_namespace.c:604
process_one_work+0x71f/0xc40 kernel/workqueue.c:2299
worker_thread+0xa29/0x11f0 kernel/workqueue.c:2446
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Allocated by task 288:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_alloc_info+0x25/0x30 mm/kasan/generic.c:505
__kasan_slab_alloc+0x72/0x80 mm/kasan/common.c:333
kasan_slab_alloc include/linux/kasan.h:202 [inline]
slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768
slab_alloc_node mm/slub.c:3421 [inline]
slab_alloc mm/slub.c:3431 [inline]
__kmem_cache_alloc_lru mm/slub.c:3438 [inline]
kmem_cache_alloc+0x16e/0x330 mm/slub.c:3447
kmem_cache_zalloc include/linux/slab.h:689 [inline]
net_alloc net/core/net_namespace.c:413 [inline]
copy_net_ns+0x145/0x5c0 net/core/net_namespace.c:468
create_new_namespaces+0x3a2/0x660 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x120/0x170 kernel/nsproxy.c:226
ksys_unshare+0x4ac/0x7b0 kernel/fork.c:3388
__do_sys_unshare kernel/fork.c:3459 [inline]
__se_sys_unshare kernel/fork.c:3457 [inline]
__x64_sys_unshare+0x38/0x40 kernel/fork.c:3457
x64_sys_call+0x767/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:273
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 304:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x31/0x50 mm/kasan/generic.c:516
____kasan_slab_free+0x132/0x180 mm/kasan/common.c:241
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:249
kasan_slab_free include/linux/kasan.h:178 [inline]
slab_free_hook mm/slub.c:1745 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1771
slab_free mm/slub.c:3686 [inline]
kmem_cache_free+0x12d/0x300 mm/slub.c:3711
net_free net/core/net_namespace.c:442 [inline]
cleanup_net+0xa58/0xb00 net/core/net_namespace.c:625
process_one_work+0x71f/0xc40 kernel/workqueue.c:2299
worker_thread+0xa29/0x11f0 kernel/workqueue.c:2446
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496
insert_work+0x51/0x300 kernel/workqueue.c:1368
__queue_work+0x9b1/0xd30 kernel/workqueue.c:1527
delayed_work_timer_fn+0x61/0x80 kernel/workqueue.c:1653
call_timer_fn+0x46/0x2a0 kernel/time/timer.c:1510
expire_timers kernel/time/timer.c:1550 [inline]
__run_timers+0x667/0x9a0 kernel/time/timer.c:1826
run_timer_softirq+0xb8/0xf0 kernel/time/timer.c:1841
handle_softirqs+0x1d7/0x600 kernel/softirq.c:642
__do_softirq kernel/softirq.c:680 [inline]
invoke_softirq kernel/softirq.c:497 [inline]
__irq_exit_rcu+0x52/0xf0 kernel/softirq.c:729
irq_exit_rcu+0x9/0x10 kernel/softirq.c:741
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa9/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691
Second to last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486
kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496
insert_work+0x51/0x300 kernel/workqueue.c:1368
__queue_work+0x9b1/0xd30 kernel/workqueue.c:1527
delayed_work_timer_fn+0x61/0x80 kernel/workqueue.c:1653
call_timer_fn+0x46/0x2a0 kernel/time/timer.c:1510
expire_timers kernel/time/timer.c:1550 [inline]
__run_timers+0x667/0x9a0 kernel/time/timer.c:1826
run_timer_softirq+0xb8/0xf0 kernel/time/timer.c:1841
handle_softirqs+0x1d7/0x600 kernel/softirq.c:642
__do_softirq kernel/softirq.c:680 [inline]
invoke_softirq kernel/softirq.c:497 [inline]
__irq_exit_rcu+0x52/0xf0 kernel/softirq.c:729
irq_exit_rcu+0x9/0x10 kernel/softirq.c:741
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0x58/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:691
The buggy address belongs to the object at ffff88810ca33480
which belongs to the cache net_namespace of size 4224
The buggy address is located 140 bytes inside of
4224-byte region [ffff88810ca33480, ffff88810ca34500)
The buggy address belongs to the physical page:
page:ffffea0004328c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10ca30
head:ffffea0004328c00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 dead000000000001 ffff8881002adb00
raw: 0000000000000000 0000000000070007 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 288, tgid 288 (syz-executor), ts 25902090681, free_ts 25648037045
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2637
prep_new_page+0x1c/0x110 mm/page_alloc.c:2644
get_page_from_freelist+0x2c7b/0x2cf0 mm/page_alloc.c:4539
__alloc_pages+0x19e/0x3a0 mm/page_alloc.c:5850
alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
allocate_slab mm/slub.c:1962 [inline]
new_slab+0x98/0x3d0 mm/slub.c:2015
___slab_alloc+0x6f6/0xb50 mm/slub.c:3203
__slab_alloc+0x5e/0xa0 mm/slub.c:3302
slab_alloc_node mm/slub.c:3387 [inline]
slab_alloc mm/slub.c:3431 [inline]
__kmem_cache_alloc_lru mm/slub.c:3438 [inline]
kmem_cache_alloc+0x1b0/0x330 mm/slub.c:3447
kmem_cache_zalloc include/linux/slab.h:689 [inline]
net_alloc net/core/net_namespace.c:413 [inline]
copy_net_ns+0x145/0x5c0 net/core/net_namespace.c:468
create_new_namespaces+0x3a2/0x660 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x120/0x170 kernel/nsproxy.c:226
ksys_unshare+0x4ac/0x7b0 kernel/fork.c:3388
__do_sys_unshare kernel/fork.c:3459 [inline]
__se_sys_unshare kernel/fork.c:3457 [inline]
__x64_sys_unshare+0x38/0x40 kernel/fork.c:3457
x64_sys_call+0x767/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:273
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1545 [inline]
free_pcp_prepare mm/page_alloc.c:1619 [inline]
free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3581
free_unref_page+0x8f/0x530 mm/page_alloc.c:3677
free_the_page mm/page_alloc.c:830 [inline]
__free_pages+0x67/0x100 mm/page_alloc.c:5939
__free_slab+0xca/0x1a0 mm/slub.c:2039
free_slab mm/slub.c:2054 [inline]
discard_slab mm/slub.c:2060 [inline]
__unfreeze_partials+0x160/0x190 mm/slub.c:2609
put_cpu_partial+0xa9/0x100 mm/slub.c:2685
__slab_free+0x1c4/0x280 mm/slub.c:3563
do_slab_free mm/slub.c:3640 [inline]
___cache_free+0xbf/0xd0 mm/slub.c:3696
qlink_free mm/kasan/quarantine.c:168 [inline]
qlist_free_all+0xc6/0x140 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x14a/0x170 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x24/0x80 mm/kasan/common.c:310
kasan_slab_alloc include/linux/kasan.h:202 [inline]
slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768
slab_alloc_node mm/slub.c:3421 [inline]
slab_alloc mm/slub.c:3431 [inline]
__kmem_cache_alloc_lru mm/slub.c:3438 [inline]
kmem_cache_alloc+0x16e/0x330 mm/slub.c:3447
getname_flags+0xb9/0x500 fs/namei.c:139
getname+0x19/0x20 fs/namei.c:218
do_sys_openat2+0xcb/0x7e0 fs/open.c:1335
Memory state around the buggy address:
ffff88810ca33400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88810ca33480: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88810ca33500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88810ca33580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88810ca33600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
tipc: Disabling bearer
tipc: Left network mode
tipc: Disabling bearer
tipc: Left network mode
tipc: Disabling bearer
tipc: Left network mode
tipc: Disabling bearer
tipc: Left network mode
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
device bridge_slave_1 left promiscuous mode
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_0 left promiscuous mode
bridge0: port 1(bridge_slave_0) entered disabled state
device veth1_macvtap left promiscuous mode
device veth0_vlan left promiscuous mode
device veth1_macvtap left promiscuous mode
device veth0_vlan left promiscuous mode
device veth1_macvtap left promiscuous mode
device veth0_vlan left promiscuous mode