================================================================== BUG: KASAN: slab-use-after-free in configfs_dirent_is_ready+0x6b/0x70 fs/configfs/dir.c:363 Read of size 4 at addr ffff8880292ec238 by task syz.4.336/7270 CPU: 0 UID: 0 PID: 7270 Comm: syz.4.336 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 configfs_dirent_is_ready+0x6b/0x70 fs/configfs/dir.c:363 create_link fs/configfs/symlink.c:85 [inline] configfs_symlink+0x5c4/0x11f0 fs/configfs/symlink.c:199 vfs_symlink fs/namei.c:5660 [inline] vfs_symlink+0x178/0x4d0 fs/namei.c:5639 filename_symlinkat+0x2a6/0x560 fs/namei.c:5685 __do_sys_symlinkat fs/namei.c:5705 [inline] __se_sys_symlinkat fs/namei.c:5700 [inline] __x64_sys_symlinkat+0x9c/0xe0 fs/namei.c:5700 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3db279e019 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3db35aa028 EFLAGS: 00000246 ORIG_RAX: 000000000000010a RAX: ffffffffffffffda RBX: 00007f3db2a26090 RCX: 00007f3db279e019 RDX: 0000200000000200 RSI: ffffffffffffff9c RDI: 00002000000001c0 RBP: 00007f3db283500c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f3db2a26128 R14: 00007f3db2a26090 R15: 00007ffec6c0a4f8 Allocated by task 7269: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4584 [inline] slab_alloc_node mm/slub.c:4917 [inline] kmem_cache_alloc_noprof+0x26b/0x6a0 mm/slub.c:4931 configfs_new_dirent+0x52/0x570 fs/configfs/dir.c:193 configfs_make_dirent+0x36/0x1a0 fs/configfs/dir.c:259 configfs_create_dir+0xbd/0x5c0 fs/configfs/dir.c:304 configfs_attach_item fs/configfs/dir.c:863 [inline] configfs_attach_group+0x2a/0x440 fs/configfs/dir.c:898 configfs_mkdir+0x65c/0xb70 fs/configfs/dir.c:1423 vfs_mkdir+0x361/0x850 fs/namei.c:5276 filename_mkdirat+0x48b/0x5e0 fs/namei.c:5309 __do_sys_mkdirat fs/namei.c:5330 [inline] __se_sys_mkdirat fs/namei.c:5327 [inline] __x64_sys_mkdirat+0x89/0xc0 fs/namei.c:5327 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 7272: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2677 [inline] slab_free mm/slub.c:6377 [inline] kmem_cache_free+0x127/0x6b0 mm/slub.c:6504 release_configfs_dirent fs/configfs/configfs_internal.h:139 [inline] release_configfs_dirent fs/configfs/configfs_internal.h:134 [inline] configfs_put fs/configfs/configfs_internal.h:156 [inline] configfs_d_iput+0x20d/0x290 fs/configfs/dir.c:63 dentry_unlink_inode+0x265/0x470 fs/dcache.c:477 d_delete fs/dcache.c:2695 [inline] d_delete+0x213/0x280 fs/dcache.c:2682 d_delete_notify include/linux/fsnotify.h:379 [inline] vfs_rmdir fs/namei.c:5394 [inline] vfs_rmdir+0x4ab/0x8a0 fs/namei.c:5354 filename_rmdir+0x31a/0x5c0 fs/namei.c:5438 __do_sys_rmdir fs/namei.c:5461 [inline] __se_sys_rmdir fs/namei.c:5458 [inline] __x64_sys_rmdir+0x46/0x70 fs/namei.c:5458 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880292ec200 which belongs to the cache configfs_dir_cache of size 96 The buggy address is located 56 bytes inside of freed 96-byte region [ffff8880292ec200, ffff8880292ec260) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x292ec flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000000 ffff8881404fa140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000800200020 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 0xd2cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 4942630181, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3266 [inline] allocate_slab mm/slub.c:3380 [inline] new_slab+0xa2/0x640 mm/slub.c:3426 refill_objects+0xe3/0x410 mm/slub.c:7310 refill_sheaf mm/slub.c:2804 [inline] __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675 alloc_from_pcs mm/slub.c:4773 [inline] slab_alloc_node mm/slub.c:4905 [inline] kmem_cache_alloc_noprof+0x46e/0x6a0 mm/slub.c:4931 configfs_new_dirent+0x52/0x570 fs/configfs/dir.c:193 configfs_make_dirent+0x36/0x1a0 fs/configfs/dir.c:259 configfs_create_dir+0xbd/0x5c0 fs/configfs/dir.c:304 configfs_attach_item fs/configfs/dir.c:863 [inline] configfs_attach_group+0x2a/0x440 fs/configfs/dir.c:898 configfs_register_subsystem+0x2c7/0x5e0 fs/configfs/dir.c:1908 target_core_init_configfs+0x233/0x6a0 drivers/target/target_core_configfs.c:3800 do_one_initcall+0x11d/0x700 init/main.c:1347 do_initcall_level init/main.c:1409 [inline] do_initcalls init/main.c:1425 [inline] do_basic_setup init/main.c:1445 [inline] kernel_init_freeable+0x6ea/0x7b0 init/main.c:1658 kernel_init+0x1f/0x1e0 init/main.c:1548 page_owner free stack trace missing Memory state around the buggy address: ffff8880292ec100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880292ec180: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8880292ec200: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ^ ffff8880292ec280: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff8880292ec300: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ==================================================================