svc: failed to register nfsdv3 RPC service (errno 512). svc: failed to register nfsaclv3 RPC service (errno 512). ================================================================== BUG: KASAN: slab-use-after-free in shrinker_free+0x3b7/0x430 mm/shrinker.c:775 Read of size 4 at addr ffff88803302931c by task syz.1.816/8752 CPU: 1 UID: 0 PID: 8752 Comm: syz.1.816 Not tainted 6.11.0-rc7-syzkaller-00145-g57719771a244 #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+0x9b4/0xb50 net/socket.c:2597 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2651 __sys_sendmsg+0x117/0x1f0 net/socket.c:2680 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:0x7f7ce257def9 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:00007f7ce344a038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f7ce2735f80 RCX: 00007f7ce257def9 RDX: 0000000000000004 RSI: 0000000020000280 RDI: 0000000000000003 RBP: 00007f7ce25f0b76 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f7ce2735f80 R15: 00007ffcdfd81db8 Allocated by task 6600: 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:4162 [inline] __kmalloc_noprof+0x1e8/0x410 mm/slub.c:4174 kmalloc_noprof include/linux/slab.h:685 [inline] kzalloc_noprof include/linux/slab.h:807 [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 __devinet_sysctl_register+0x1b5/0x360 net/ipv4/devinet.c:2602 devinet_sysctl_register net/ipv4/devinet.c:2642 [inline] devinet_sysctl_register+0x17b/0x200 net/ipv4/devinet.c:2632 inetdev_init+0x291/0x560 net/ipv4/devinet.c:291 inetdev_event+0xb17/0x17e0 net/ipv4/devinet.c:1565 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1994 call_netdevice_notifiers_extack net/core/dev.c:2032 [inline] call_netdevice_notifiers net/core/dev.c:2046 [inline] register_netdevice+0x1728/0x1e20 net/core/dev.c:10477 ipcaif_newlink+0x50/0x290 net/caif/chnl_net.c:453 rtnl_newlink_create net/core/rtnetlink.c:3510 [inline] __rtnl_newlink+0x119c/0x1920 net/core/rtnetlink.c:3730 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3743 rtnetlink_rcv_msg+0x3c7/0xea0 net/core/rtnetlink.c:6647 netlink_rcv_skb+0x165/0x410 net/netlink/af_netlink.c:2550 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_sendto+0x47f/0x4e0 net/socket.c:2204 __do_sys_sendto net/socket.c:2216 [inline] __se_sys_sendto net/socket.c:2212 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2212 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 5270: 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:2256 [inline] slab_free_freelist_hook mm/slub.c:2285 [inline] slab_free_bulk mm/slub.c:4501 [inline] kmem_cache_free_bulk.part.0+0x148/0x390 mm/slub.c:4718 kfree_bulk include/linux/slab.h:570 [inline] kvfree_rcu_bulk+0x454/0x550 kernel/rcu/tree.c:3405 kfree_rcu_work+0x2f2/0x5a0 kernel/rcu/tree.c:3484 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 kvfree_call_rcu+0x74/0xbe0 kernel/rcu/tree.c:3815 drop_sysctl_table+0x2f9/0x540 fs/proc/proc_sysctl.c:1505 unregister_sysctl_table fs/proc/proc_sysctl.c:1526 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1518 __devinet_sysctl_unregister net/ipv4/devinet.c:2625 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2653 [inline] inetdev_destroy net/ipv4/devinet.c:333 [inline] inetdev_event+0xd67/0x17e0 net/ipv4/devinet.c:1633 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1994 call_netdevice_notifiers_extack net/core/dev.c:2032 [inline] call_netdevice_notifiers net/core/dev.c:2046 [inline] unregister_netdevice_many_notify+0x8bb/0x1e40 net/core/dev.c:11352 unregister_netdevice_many net/core/dev.c:11414 [inline] default_device_exit_batch+0x731/0x9b0 net/core/dev.c:11897 ops_exit_list+0x128/0x180 net/core/net_namespace.c:178 cleanup_net+0x5b7/0xbb0 net/core/net_namespace.c:640 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 ffff888033029300 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 28 bytes inside of freed 192-byte region [ffff888033029300, ffff8880330293c0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888033029900 pfn:0x33029 flags: 0xfff00000000200(workingset|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xfdffffff(slab) raw: 00fff00000000200 ffff88801ac413c0 ffffea0000cc4950 ffffea0000c76290 raw: ffff888033029900 000000000010000a 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 30456487990, free_ts 30422625364 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:2325 allocate_slab mm/slub.c:2488 [inline] new_slab+0x84/0x260 mm/slub.c:2541 ___slab_alloc+0xdac/0x1870 mm/slub.c:3727 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3817 __slab_alloc_node mm/slub.c:3870 [inline] slab_alloc_node mm/slub.c:4029 [inline] __kmalloc_cache_noprof+0x2c5/0x310 mm/slub.c:4188 kmalloc_noprof include/linux/slab.h:681 [inline] kzalloc_noprof include/linux/slab.h:807 [inline] call_usermodehelper_setup+0x9a/0x340 kernel/umh.c:363 kobject_uevent_env+0xde3/0x1670 lib/kobject_uevent.c:628 kernel_add_sysfs_param kernel/params.c:821 [inline] param_sysfs_builtin kernel/params.c:856 [inline] param_sysfs_builtin_init+0x2b0/0x3c0 kernel/params.c:990 do_one_initcall+0x128/0x630 init/main.c:1267 do_initcall_level init/main.c:1329 [inline] do_initcalls init/main.c:1345 [inline] do_basic_setup init/main.c:1364 [inline] kernel_init_freeable+0x660/0xc50 init/main.c:1578 kernel_init+0x1c/0x2b0 init/main.c:1467 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 940 tgid 940 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2619 vfree+0x181/0x7a0 mm/vmalloc.c:3367 delayed_vfree_work+0x56/0x70 mm/vmalloc.c:3288 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 Memory state around the buggy address: ffff888033029200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888033029280: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc >ffff888033029300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888033029380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888033029400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================