svc: failed to register nfsdv3 RPC service (errno 111). svc: failed to register nfsaclv3 RPC service (errno 111). ================================================================== BUG: KASAN: slab-use-after-free in shrinker_free+0x3b7/0x430 mm/shrinker.c:775 Read of size 4 at addr ffff8880624a881c by task syz.1.5908/490 CPU: 1 UID: 0 PID: 490 Comm: syz.1.5908 Not tainted 6.11.0-syzkaller-02574-ga430d95c5efa #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 shrinker_free+0x3b7/0x430 mm/shrinker.c:775 nfsd_file_cache_shutdown+0xbc/0x480 fs/nfsd/filecache.c:891 nfsd_shutdown_generic fs/nfsd/nfssvc.c:329 [inline] nfsd_shutdown_generic fs/nfsd/nfssvc.c:323 [inline] nfsd_startup_net fs/nfsd/nfssvc.c:444 [inline] nfsd_svc+0x6d4/0x970 fs/nfsd/nfssvc.c:817 nfsd_nl_threads_set_doit+0x52c/0xbc0 fs/nfsd/nfsctl.c:1714 genl_family_rcv_msg_doit+0x202/0x2f0 net/netlink/genetlink.c:1115 genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x565/0x800 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x165/0x410 net/netlink/af_netlink.c:2550 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x9ae/0xb40 net/socket.c:2603 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2657 __sys_sendmsg+0x117/0x1f0 net/socket.c:2686 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f387157def9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3872338038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f3871735f80 RCX: 00007f387157def9 RDX: 0000000000000004 RSI: 0000000020000280 RDI: 0000000000000003 RBP: 00007f38715f0b76 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f3871735f80 R15: 00007ffdda163718 Allocated by task 31618: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4159 [inline] __kmalloc_node_track_caller_noprof+0x20f/0x440 mm/slub.c:4178 kmemdup_noprof+0x29/0x60 mm/util.c:133 neigh_parms_alloc+0x82/0x5d0 net/core/neighbour.c:1718 ipv6_add_dev+0x335/0x13f0 net/ipv6/addrconf.c:399 addrconf_notify+0x53e/0x19c0 net/ipv6/addrconf.c:3655 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1996 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline] call_netdevice_notifiers net/core/dev.c:2048 [inline] register_netdevice+0x1728/0x1e20 net/core/dev.c:10520 register_netdev+0x2f/0x50 net/core/dev.c:10624 ip6_tnl_init_net+0x296/0x420 net/ipv6/ip6_tunnel.c:2270 ops_init+0x1df/0x5f0 net/core/net_namespace.c:139 setup_net+0x21f/0x860 net/core/net_namespace.c:356 copy_net_ns+0x2b4/0x6b0 net/core/net_namespace.c:494 create_new_namespaces+0x3ea/0xad0 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xc0/0x1f0 kernel/nsproxy.c:228 ksys_unshare+0x419/0x970 kernel/fork.c:3309 __do_sys_unshare kernel/fork.c:3380 [inline] __se_sys_unshare kernel/fork.c:3378 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3378 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 27301: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object+0xf7/0x160 mm/kasan/common.c:240 __kasan_slab_free+0x32/0x50 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2250 [inline] slab_free mm/slub.c:4474 [inline] kfree+0x12a/0x3b0 mm/slub.c:4595 neigh_parms_destroy net/core/neighbour.c:1769 [inline] neigh_parms_put net/core/neighbour.c:884 [inline] neigh_rcu_free_parms+0x6c/0xa0 net/core/neighbour.c:1751 rcu_do_batch kernel/rcu/tree.c:2569 [inline] rcu_core+0x828/0x16b0 kernel/rcu/tree.c:2843 handle_softirqs+0x216/0x8f0 kernel/softirq.c:554 do_softirq kernel/softirq.c:455 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:442 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:382 spin_unlock_bh include/linux/spinlock.h:396 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:820 [inline] nsim_dev_trap_report_work+0x870/0xc80 drivers/net/netdevsim/dev.c:850 process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3393 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Last potentially related work creation: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:541 __call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:3106 neigh_parms_release net/core/neighbour.c:1763 [inline] neigh_parms_release+0x209/0x290 net/core/neighbour.c:1754 addrconf_ifdown.isra.0+0x14a9/0x1a20 net/ipv6/addrconf.c:4012 addrconf_notify+0x220/0x19c0 net/ipv6/addrconf.c:3781 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1996 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline] call_netdevice_notifiers net/core/dev.c:2048 [inline] unregister_netdevice_many_notify+0x8c3/0x1e40 net/core/dev.c:11399 cleanup_net+0x58c/0xb40 net/core/net_namespace.c:621 process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3393 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff8880624a8800 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 28 bytes inside of freed 192-byte region [ffff8880624a8800, ffff8880624a88c0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880624a8f00 pfn:0x624a8 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000200 ffff88801ac413c0 ffffea000080bed0 ffffea0000a7a0d0 raw: ffff8880624a8f00 000000000010000d 00000001fdffffff 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 0x152cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5910, tgid 5910 (syz-executor), ts 165259685797, free_ts 164626767339 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x1351/0x2e50 mm/page_alloc.c:3446 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4702 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x4e/0xf0 mm/slub.c:2319 allocate_slab mm/slub.c:2482 [inline] new_slab+0x84/0x260 mm/slub.c:2535 ___slab_alloc+0xdac/0x1870 mm/slub.c:3721 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3811 __slab_alloc_node mm/slub.c:3864 [inline] slab_alloc_node mm/slub.c:4026 [inline] __do_kmalloc_node mm/slub.c:4158 [inline] __kmalloc_noprof+0x379/0x410 mm/slub.c:4171 kmalloc_noprof include/linux/slab.h:694 [inline] kzalloc_noprof include/linux/slab.h:816 [inline] new_dir fs/proc/proc_sysctl.c:951 [inline] get_subdir fs/proc/proc_sysctl.c:995 [inline] sysctl_mkdir_p fs/proc/proc_sysctl.c:1304 [inline] __register_sysctl_table+0xeac/0x18c0 fs/proc/proc_sysctl.c:1379 mpls_dev_sysctl_register+0x186/0x2a0 net/mpls/af_mpls.c:1405 mpls_add_dev net/mpls/af_mpls.c:1460 [inline] mpls_dev_notify+0x49f/0xa10 net/mpls/af_mpls.c:1600 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1996 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline] call_netdevice_notifiers net/core/dev.c:2048 [inline] register_netdevice+0x1728/0x1e20 net/core/dev.c:10520 team_newlink+0x92/0x160 drivers/net/team/team_core.c:2217 rtnl_newlink_create net/core/rtnetlink.c:3510 [inline] __rtnl_newlink+0x119c/0x1920 net/core/rtnetlink.c:3730 page last free pid 5909 tgid 5909 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_folios+0x9e9/0x1390 mm/page_alloc.c:2667 folios_put_refs+0x560/0x760 mm/swap.c:1039 free_pages_and_swap_cache+0x36d/0x510 mm/swap_state.c:332 __tlb_batch_free_encoded_pages+0xf9/0x290 mm/mmu_gather.c:136 tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu mm/mmu_gather.c:373 [inline] tlb_finish_mmu+0x168/0x7b0 mm/mmu_gather.c:465 exit_mmap+0x3d1/0xb20 mm/mmap.c:3425 __mmput+0x12a/0x480 kernel/fork.c:1345 mmput+0x62/0x70 kernel/fork.c:1367 exit_mm kernel/exit.c:571 [inline] do_exit+0x9bf/0x2bb0 kernel/exit.c:869 do_group_exit+0xd3/0x2a0 kernel/exit.c:1031 get_signal+0x2658/0x26d0 kernel/signal.c:2917 arch_do_signal_or_restart+0x90/0x7e0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] irqentry_exit_to_user_mode+0x13f/0x280 kernel/entry/common.c:231 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 Memory state around the buggy address: ffff8880624a8700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880624a8780: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880624a8800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880624a8880: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880624a8900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================