================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:705 [inline] BUG: KASAN: use-after-free in queued_spin_lock include/asm-generic/qspinlock.h:82 [inline] BUG: KASAN: use-after-free in do_raw_spin_lock include/linux/spinlock.h:183 [inline] BUG: KASAN: use-after-free in __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] BUG: KASAN: use-after-free in _raw_spin_lock_bh+0x97/0x1b0 kernel/locking/spinlock.c:175 Write of size 4 at addr ffff888108580a14 by task kworker/u4:5/356 CPU: 1 PID: 356 Comm: kworker/u4:5 Not tainted 5.10.236-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:705 [inline] queued_spin_lock include/asm-generic/qspinlock.h:82 [inline] do_raw_spin_lock include/linux/spinlock.h:183 [inline] __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] _raw_spin_lock_bh+0x97/0x1b0 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:359 [inline] __ip6_del_rt+0x8e/0x140 net/ipv6/route.c:3791 ip6_del_rt+0xdd/0x130 net/ipv6/route.c:3807 __remove_nexthop_fib+0x1ff/0x270 net/ipv4/nexthop.c:885 __remove_nexthop net/ipv4/nexthop.c:893 [inline] remove_nexthop+0x7a/0x500 net/ipv4/nexthop.c:919 remove_nh_grp_entry net/ipv4/nexthop.c:797 [inline] remove_nexthop_from_groups+0x199/0xe70 net/ipv4/nexthop.c:846 __remove_nexthop net/ipv4/nexthop.c:904 [inline] remove_nexthop+0x3b9/0x500 net/ipv4/nexthop.c:919 flush_all_nexthops net/ipv4/nexthop.c:1237 [inline] nexthop_net_exit+0x3a/0xa0 net/ipv4/nexthop.c:2012 ops_exit_list net/core/net_namespace.c:185 [inline] cleanup_net+0x66c/0xcb0 net/core/net_namespace.c:609 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 369: 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:430 [inline] ____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:509 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] kmem_cache_alloc_trace+0x18a/0x2e0 mm/slub.c:2974 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] fib6_net_init+0x226/0x890 net/ipv6/ip6_fib.c:2376 ops_init+0x1cd/0x4a0 net/core/net_namespace.c:144 setup_net+0x367/0xbf0 net/core/net_namespace.c:345 copy_net_ns+0x32f/0x520 net/core/net_namespace.c:486 create_new_namespaces+0x410/0x660 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x126/0x180 kernel/nsproxy.c:231 ksys_unshare+0x54c/0x9a0 kernel/fork.c:3080 __do_sys_unshare kernel/fork.c:3148 [inline] __se_sys_unshare kernel/fork.c:3146 [inline] __x64_sys_unshare+0x38/0x40 kernel/fork.c:3146 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 356: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kfree+0xc3/0x270 mm/slub.c:4191 fib6_free_table net/ipv6/ip6_fib.c:214 [inline] fib6_net_exit+0x290/0x320 net/ipv6/ip6_fib.c:2430 ops_exit_list net/core/net_namespace.c:185 [inline] cleanup_net+0x66c/0xcb0 net/core/net_namespace.c:609 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff888108580a00 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 20 bytes inside of 128-byte region [ffff888108580a00, ffff888108580a80) The buggy address belongs to the page: page:ffffea0004216000 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888108580500 pfn:0x108580 flags: 0x4000000000000200(slab) raw: 4000000000000200 ffffea0004127948 ffffea00041565c8 ffff888100043500 raw: ffff888108580500 000000000010000f 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 1291966048, free_ts 0 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5349 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] __kmalloc_track_caller+0x1f8/0x320 mm/slub.c:4536 __do_krealloc mm/slab_common.c:1103 [inline] krealloc+0x6f/0x110 mm/slab_common.c:1136 add_sysfs_param+0xcd/0x7b0 kernel/params.c:651 kernel_add_sysfs_param+0xb2/0x12d kernel/params.c:812 param_sysfs_builtin+0x16a/0x1e2 kernel/params.c:851 param_sysfs_init+0x6a/0x6f kernel/params.c:972 do_one_initcall+0x189/0x620 init/main.c:1197 do_initcall_level+0x186/0x304 init/main.c:1270 do_initcalls+0x4e/0x8e init/main.c:1286 do_basic_setup+0x88/0x91 init/main.c:1306 page_owner free stack trace missing Memory state around the buggy address: ffff888108580900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888108580980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888108580a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888108580a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888108580b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== IPv6: ADDRCONF(NETDEV_CHANGE): bridge_slave_0: link becomes ready bridge0: port 1(bridge_slave_0) entered blocking state bridge0: port 1(bridge_slave_0) entered forwarding state IPv6: ADDRCONF(NETDEV_CHANGE): macsec0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready 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 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 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