================================================================== BUG: KASAN: slab-use-after-free in ocfs2_get_system_file_inode+0x1d9/0x7d0 fs/ocfs2/sysfile.c:102 Read of size 8 at addr ffff888059786190 by task syz-executor/5971 CPU: 0 UID: 0 PID: 5971 Comm: syz-executor Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 ocfs2_get_system_file_inode+0x1d9/0x7d0 fs/ocfs2/sysfile.c:102 ocfs2_remove_inode fs/ocfs2/inode.c:723 [inline] ocfs2_wipe_inode fs/ocfs2/inode.c:894 [inline] ocfs2_delete_inode fs/ocfs2/inode.c:1155 [inline] ocfs2_evict_inode+0x1512/0x40c0 fs/ocfs2/inode.c:1292 evict+0x504/0x9c0 fs/inode.c:810 d_delete_notify include/linux/fsnotify.h:377 [inline] vfs_rmdir+0x3ec/0x520 fs/namei.c:4474 do_rmdir+0x25f/0x550 fs/namei.c:4516 __do_sys_unlinkat fs/namei.c:4690 [inline] __se_sys_unlinkat fs/namei.c:4684 [inline] __x64_sys_unlinkat+0xc2/0xf0 fs/namei.c:4684 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb2d7e2e1c7 Code: 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 00 00 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:00007ffd8cf8c3e8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fb2d7e2e1c7 RDX: 0000000000000200 RSI: 00007ffd8cf8d590 RDI: 00000000ffffff9c RBP: 00007fb2d7eb1c05 R08: 000055555ae3c66b R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000207 R12: 00007ffd8cf8d590 R13: 00007fb2d7eb1c05 R14: 000000000002259a R15: 00007ffd8cf8f750 Allocated by task 5909: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:330 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:356 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4180 [inline] slab_alloc_node mm/slub.c:4229 [inline] kmem_cache_alloc_noprof+0x143/0x310 mm/slub.c:4236 __kernfs_new_node+0xd7/0x690 fs/kernfs/dir.c:637 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:713 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1039 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:319 create_files fs/sysfs/group.c:76 [inline] internal_create_group+0x66d/0x1110 fs/sysfs/group.c:183 internal_create_groups fs/sysfs/group.c:223 [inline] sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:249 device_add_groups drivers/base/core.c:2836 [inline] device_add_attrs+0x1c4/0x5a0 drivers/base/core.c:2911 device_add+0x496/0xb50 drivers/base/core.c:3643 netdev_register_kobject+0x178/0x310 net/core/net-sysfs.c:2356 register_netdevice+0x12a0/0x1b10 net/core/dev.c:11206 register_netdev+0x40/0x60 net/core/dev.c:11322 ip6_tnl_init_net+0x259/0x3b0 net/ipv6/ip6_tunnel.c:2308 ops_init+0x35c/0x5c0 net/core/net_namespace.c:136 setup_net+0x10c/0x320 net/core/net_namespace.c:438 copy_net_ns+0x31b/0x4d0 net/core/net_namespace.c:570 create_new_namespaces+0x3f3/0x720 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0x11c/0x170 kernel/nsproxy.c:218 ksys_unshare+0x4c8/0x8c0 kernel/fork.c:3127 __do_sys_unshare kernel/fork.c:3198 [inline] __se_sys_unshare kernel/fork.c:3196 [inline] __x64_sys_unshare+0x38/0x50 kernel/fork.c:3196 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 20: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2417 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x195/0x510 mm/slub.c:4782 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core kernel/rcu/tree.c:2861 [inline] rcu_cpu_kthread+0xbf6/0x1b50 kernel/rcu/tree.c:2949 smpboot_thread_fn+0x53f/0xa60 kernel/smpboot.c:160 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548 __call_rcu_common kernel/rcu/tree.c:3123 [inline] call_rcu+0x157/0x9c0 kernel/rcu/tree.c:3243 kernfs_put+0x1a1/0x480 fs/kernfs/dir.c:591 kernfs_remove_by_name_ns+0xb7/0x130 fs/kernfs/dir.c:1718 kernfs_remove_by_name include/linux/kernfs.h:633 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0xfc/0x2c0 fs/sysfs/group.c:322 sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:346 device_remove_groups drivers/base/core.c:2843 [inline] device_remove_attrs+0x1aa/0x260 drivers/base/core.c:2973 device_del+0x50d/0x8e0 drivers/base/core.c:3877 unregister_netdevice_many_notify+0x1a57/0x1fe0 net/core/dev.c:12201 ops_exit_rtnl_list net/core/net_namespace.c:186 [inline] ops_undo_list+0x3dc/0x990 net/core/net_namespace.c:247 cleanup_net+0x4cb/0x800 net/core/net_namespace.c:682 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff8880597860f0 which belongs to the cache kernfs_node_cache of size 176 The buggy address is located 160 bytes inside of freed 176-byte region [ffff8880597860f0, ffff8880597861a0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x59786 flags: 0x80000000000000(node=0|zone=1) page_type: f5(slab) raw: 0080000000000000 ffff88801bebc000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000110011 00000000f5000000 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 5909, tgid 5909 (syz-executor), ts 109694292843, free_ts 109689849253 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x2119/0x21b0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0xd1/0x380 mm/mempolicy.c:2416 alloc_slab_page mm/slub.c:2487 [inline] allocate_slab+0x8a/0x370 mm/slub.c:2655 new_slab mm/slub.c:2709 [inline] ___slab_alloc+0x8d1/0xdd0 mm/slub.c:3891 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0xe6/0x310 mm/slub.c:4236 __kernfs_new_node+0xd7/0x690 fs/kernfs/dir.c:637 kernfs_new_node+0x102/0x210 fs/kernfs/dir.c:713 __kernfs_create_file+0x4b/0x2e0 fs/kernfs/file.c:1039 sysfs_add_file_mode_ns+0x238/0x300 fs/sysfs/file.c:319 create_files fs/sysfs/group.c:76 [inline] internal_create_group+0x66d/0x1110 fs/sysfs/group.c:183 internal_create_groups fs/sysfs/group.c:223 [inline] sysfs_create_groups+0x59/0x120 fs/sysfs/group.c:249 device_add_groups drivers/base/core.c:2836 [inline] device_add_attrs+0x1c4/0x5a0 drivers/base/core.c:2911 device_add+0x496/0xb50 drivers/base/core.c:3643 netdev_register_kobject+0x178/0x310 net/core/net-sysfs.c:2356 page last free pid 5900 tgid 5900 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0xb59/0xce0 mm/page_alloc.c:2895 vfree+0x2ad/0x470 mm/vmalloc.c:3434 kcov_put kernel/kcov.c:439 [inline] kcov_close+0x2e/0x60 kernel/kcov.c:535 __fput+0x45b/0xa80 fs/file_table.c:468 task_work_run+0x1d4/0x260 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x6b5/0x2300 kernel/exit.c:961 do_group_exit+0x21c/0x2d0 kernel/exit.c:1102 get_signal+0x125e/0x1310 kernel/signal.c:3034 arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888059786080: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fa fb ffff888059786100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888059786180: fb fb fb fb fc fc fc fc fc fc fc fc fa fb fb fb ^ ffff888059786200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888059786280: fb fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb ==================================================================