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
==================================================================
BUG: KASAN: use-after-free in instrument_atomic_read include/linux/instrumented.h:71 [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 ffff888123a6b08c by task kworker/u4:4/317
CPU: 1 PID: 317 Comm: kworker/u4:4 Tainted: G W 5.15.185-syzkaller-00032-g0d918fa8e88d #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: netns cleanup_net
Call Trace:
__dump_stack+0x21/0x30 lib/dump_stack.c:88
dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106
print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0xf1/0x140 mm/kasan/report.c:444
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:71 [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:1036
ops_exit_list net/core/net_namespace.c:177 [inline]
cleanup_net+0x602/0xad0 net/core/net_namespace.c:599
process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
kthread+0x411/0x500 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Allocated by task 284:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:45 [inline]
set_alloc_info mm/kasan/common.c:433 [inline]
__kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:466
kasan_slab_alloc include/linux/kasan.h:217 [inline]
slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550
slab_alloc_node mm/slub.c:3240 [inline]
slab_alloc mm/slub.c:3250 [inline]
kmem_cache_alloc+0xf7/0x260 mm/slub.c:3255
kmem_cache_zalloc include/linux/slab.h:737 [inline]
net_alloc net/core/net_namespace.c:408 [inline]
copy_net_ns+0x145/0x5c0 net/core/net_namespace.c:463
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:3242
__do_sys_unshare kernel/fork.c:3316 [inline]
__se_sys_unshare kernel/fork.c:3314 [inline]
__x64_sys_unshare+0x38/0x40 kernel/fork.c:3314
x64_sys_call+0x442/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:273
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Freed by task 317:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
kasan_slab_free include/linux/kasan.h:193 [inline]
slab_free_hook mm/slub.c:1723 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1749
slab_free mm/slub.c:3521 [inline]
kmem_cache_free+0x100/0x320 mm/slub.c:3539
net_free net/core/net_namespace.c:437 [inline]
cleanup_net+0xa2d/0xad0 net/core/net_namespace.c:620
process_one_work+0x6be/0xba0 kernel/workqueue.c:2325
worker_thread+0xa59/0x1200 kernel/workqueue.c:2472
kthread+0x411/0x500 kernel/kthread.c:337
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
The buggy address belongs to the object at ffff888123a6b000
which belongs to the cache net_namespace of size 3968
The buggy address is located 140 bytes inside of
3968-byte region [ffff888123a6b000, ffff888123a6bf80)
The buggy address belongs to the page:
page:ffffea00048e9a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888123a6d000 pfn:0x123a68
head:ffffea00048e9a00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea00041f6200 0000000200000002 ffff8881001c4780
raw: ffff888123a6d000 0000000080080003 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 282, ts 22792750935, free_ts 0
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605
prep_new_page+0x1c/0x110 mm/page_alloc.c:2611
get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485
__alloc_pages+0x18f/0x440 mm/page_alloc.c:5795
alloc_slab_page mm/slub.c:-1 [inline]
allocate_slab mm/slub.c:1932 [inline]
new_slab+0xa1/0x4d0 mm/slub.c:1995
___slab_alloc+0x381/0x810 mm/slub.c:3028
__slab_alloc+0x49/0x90 mm/slub.c:3115
slab_alloc_node mm/slub.c:3206 [inline]
slab_alloc mm/slub.c:3250 [inline]
kmem_cache_alloc+0x138/0x260 mm/slub.c:3255
kmem_cache_zalloc include/linux/slab.h:737 [inline]
net_alloc net/core/net_namespace.c:408 [inline]
copy_net_ns+0x145/0x5c0 net/core/net_namespace.c:463
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:3242
__do_sys_unshare kernel/fork.c:3316 [inline]
__se_sys_unshare kernel/fork.c:3314 [inline]
__x64_sys_unshare+0x38/0x40 kernel/fork.c:3314
x64_sys_call+0x442/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:273
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
page_owner free stack trace missing
Memory state around the buggy address:
ffff888123a6af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888123a6b000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888123a6b080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888123a6b100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888123a6b180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
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
tipc: Disabling bearer
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
device veth1_macvtap left promiscuous mode
device veth0_vlan left promiscuous mode