================================================================== BUG: KASAN: slab-use-after-free in inode_state_read_once include/linux/fs.h:884 [inline] BUG: KASAN: slab-use-after-free in iput+0x3a7/0xe80 fs/inode.c:1977 Read of size 4 at addr ffff888040ddd828 by task kworker/0:3/5797 CPU: 0 UID: 0 PID: 5797 Comm: kworker/0:3 Not tainted syzkaller #0 PREEMPT_{RT,(full)} Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Workqueue: events fserror_worker Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 inode_state_read_once include/linux/fs.h:884 [inline] iput+0x3a7/0xe80 fs/inode.c:1977 fserror_worker+0x230/0x350 fs/fserror.c:69 process_one_work kernel/workqueue.c:3275 [inline] process_scheduled_works+0xaec/0x17a0 kernel/workqueue.c:3358 worker_thread+0xa50/0xfc0 kernel/workqueue.c:3439 kthread+0x388/0x470 kernel/kthread.c:467 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 12297: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 unpoison_slab_object mm/kasan/common.c:340 [inline] __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4459 [inline] slab_alloc_node mm/slub.c:4788 [inline] kmem_cache_alloc_lru_noprof+0x33c/0x680 mm/slub.c:4807 xfs_inode_alloc+0x7e/0x670 fs/xfs/xfs_icache.c:97 xfs_iget_cache_miss fs/xfs/xfs_icache.c:635 [inline] xfs_iget+0xa6b/0x2cb0 fs/xfs/xfs_icache.c:799 xfs_lookup+0x321/0x630 fs/xfs/xfs_inode.c:553 xfs_vn_lookup+0x130/0x200 fs/xfs/xfs_iops.c:327 lookup_one_qstr_excl+0x131/0x360 fs/namei.c:1805 __start_dirop fs/namei.c:2925 [inline] start_dirop fs/namei.c:2934 [inline] filename_create+0x20e/0x370 fs/namei.c:4922 filename_mkdirat+0xd2/0x520 fs/namei.c:5259 __do_sys_mkdirat fs/namei.c:5287 [inline] __se_sys_mkdirat+0x35/0x150 fs/namei.c:5284 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 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:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2670 [inline] slab_free mm/slub.c:6082 [inline] kmem_cache_free+0x185/0x690 mm/slub.c:6212 rcu_do_batch kernel/rcu/tree.c:2617 [inline] rcu_core kernel/rcu/tree.c:2869 [inline] rcu_cpu_kthread+0x99e/0x1470 kernel/rcu/tree.c:2957 smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160 kthread+0x388/0x470 kernel/kthread.c:467 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 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:57 kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556 __call_rcu_common kernel/rcu/tree.c:3131 [inline] call_rcu+0xee/0x890 kernel/rcu/tree.c:3251 xfs_iget_cache_miss fs/xfs/xfs_icache.c:740 [inline] xfs_iget+0xae5/0x2cb0 fs/xfs/xfs_icache.c:799 xfs_lookup+0x321/0x630 fs/xfs/xfs_inode.c:553 xfs_vn_lookup+0x130/0x200 fs/xfs/xfs_iops.c:327 lookup_one_qstr_excl+0x131/0x360 fs/namei.c:1805 __start_dirop fs/namei.c:2925 [inline] start_dirop fs/namei.c:2934 [inline] filename_create+0x20e/0x370 fs/namei.c:4922 filename_mkdirat+0xd2/0x520 fs/namei.c:5259 __do_sys_mkdirat fs/namei.c:5287 [inline] __se_sys_mkdirat+0x35/0x150 fs/namei.c:5284 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888040ddd500 which belongs to the cache xfs_inode of size 2032 The buggy address is located 808 bytes inside of freed 2032-byte region [ffff888040ddd500, ffff888040dddcf0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888040dde600 pfn:0x40dd8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888040ddff81 flags: 0x80000000000240(workingset|head|node=0|zone=1) page_type: f5(slab) raw: 0080000000000240 ffff888140438a00 ffff88801d30b188 ffffea0001867610 raw: ffff888040dde600 00000008000f000c 00000000f5000000 ffff888040ddff81 head: 0080000000000240 ffff888140438a00 ffff88801d30b188 ffffea0001867610 head: ffff888040dde600 00000008000f000c 00000000f5000000 ffff888040ddff81 head: 0080000000000003 ffffea0001037601 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_RECLAIMABLE|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 57, tgid 57 (kworker/u8:3), ts 364755723306, free_ts 342386273630 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x228/0x280 mm/page_alloc.c:1884 prep_new_page mm/page_alloc.c:1892 [inline] get_page_from_freelist+0x28bb/0x2950 mm/page_alloc.c:3950 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5245 alloc_slab_page mm/slub.c:3238 [inline] allocate_slab+0x77/0x660 mm/slub.c:3411 new_slab mm/slub.c:3469 [inline] refill_objects+0x334/0x3c0 mm/slub.c:7091 refill_sheaf mm/slub.c:2787 [inline] __pcs_replace_empty_main+0x328/0x5f0 mm/slub.c:4536 alloc_from_pcs mm/slub.c:4639 [inline] slab_alloc_node mm/slub.c:4773 [inline] kmem_cache_alloc_lru_noprof+0x433/0x680 mm/slub.c:4807 xfs_inode_alloc+0x7e/0x670 fs/xfs/xfs_icache.c:97 xfs_iget_cache_miss fs/xfs/xfs_icache.c:635 [inline] xfs_iget+0xa6b/0x2cb0 fs/xfs/xfs_icache.c:799 xfs_qm_dqusage_adjust+0x1d6/0x650 fs/xfs/xfs_qm.c:1340 xfs_iwalk_ag_recs+0x4d9/0x7f0 fs/xfs/xfs_iwalk.c:209 xfs_iwalk_run_callbacks+0x236/0x4a0 fs/xfs/xfs_iwalk.c:370 xfs_iwalk_ag+0x953/0xa40 fs/xfs/xfs_iwalk.c:473 xfs_iwalk_ag_work+0xff/0x1b0 fs/xfs/xfs_iwalk.c:620 xfs_pwork_work+0x82/0x190 fs/xfs/xfs_pwork.c:47 process_one_work kernel/workqueue.c:3275 [inline] process_scheduled_works+0xaec/0x17a0 kernel/workqueue.c:3358 page last free pid 9383 tgid 9383 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xfd0/0x1160 mm/page_alloc.c:2973 __slab_free+0x24f/0x2a0 mm/slub.c:5490 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x100 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4459 [inline] slab_alloc_node mm/slub.c:4788 [inline] kmem_cache_alloc_noprof+0x33b/0x680 mm/slub.c:4795 alloc_filename fs/namei.c:142 [inline] do_getname+0x2e/0x250 fs/namei.c:182 getname include/linux/fs.h:2512 [inline] class_filename_constructor include/linux/fs.h:2539 [inline] __do_sys_chdir fs/open.c:557 [inline] __se_sys_chdir+0x8d/0x2a0 fs/open.c:552 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888040ddd700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888040ddd780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888040ddd800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888040ddd880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888040ddd900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================