================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2920 Read of size 4 at addr ffff888112491000 by task syz-executor/434 CPU: 0 PID: 434 Comm: syz-executor Not tainted 5.15.185-syzkaller-1080583-ge678c93d43cc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xba6/0xbb0 fs/ext4/xattr.c:2920 ext4_evict_inode+0xe44/0x1450 fs/ext4/inode.c:300 evict+0x485/0x870 fs/inode.c:647 iput_final fs/inode.c:1769 [inline] iput+0x635/0x7c0 fs/inode.c:1795 d_delete_notify include/linux/fsnotify.h:278 [inline] vfs_rmdir+0x33f/0x460 fs/namei.c:4162 do_rmdir+0x259/0x6a0 fs/namei.c:4210 __do_sys_unlinkat fs/namei.c:4390 [inline] __se_sys_unlinkat fs/namei.c:4384 [inline] __x64_sys_unlinkat+0xc7/0xf0 fs/namei.c:4384 x64_sys_call+0x4c0/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:264 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fdd7ec1fcf7 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:00007fffd4117858 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fdd7ec1fcf7 RDX: 0000000000000200 RSI: 00007fffd4118a00 RDI: 00000000ffffff9c RBP: 00007fdd7ec9323c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007fffd4118a00 R13: 00007fdd7ec9323c R14: 000000000000cb03 R15: 00007fffd411abb0 Allocated by task 449: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:433 [inline] __kasan_slab_alloc+0xbd/0xf0 mm/kasan/common.c:466 kasan_slab_alloc include/linux/kasan.h:217 [inline] slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550 slab_alloc_node mm/slub.c:3240 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0xf7/0x260 mm/slub.c:3255 mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513 mempool_alloc+0x159/0x4a0 mm/mempool.c:393 bio_alloc_bioset+0x136/0x940 block/bio.c:469 bio_alloc include/linux/bio.h:429 [inline] submit_bh_wbc+0x1c6/0x670 fs/buffer.c:3028 submit_bh fs/buffer.c:3062 [inline] __sync_dirty_buffer+0x21e/0x330 fs/buffer.c:3157 ext4_commit_super+0x35b/0x450 fs/ext4/super.c:5512 ext4_setup_super+0x6a4/0xb50 fs/ext4/super.c:2709 ext4_fill_super+0x70b7/0x9030 fs/ext4/super.c:4852 mount_bdev+0x2ae/0x3e0 fs/super.c:1400 ext4_mount+0x34/0x40 fs/ext4/super.c:6618 legacy_get_tree+0xed/0x190 fs/fs_context.c:611 vfs_get_tree+0x89/0x260 fs/super.c:1530 do_new_mount+0x25a/0xa20 fs/namespace.c:3010 path_mount+0x675/0x1020 fs/namespace.c:3340 do_mount fs/namespace.c:3353 [inline] __do_sys_mount fs/namespace.c:3561 [inline] __se_sys_mount+0x318/0x380 fs/namespace.c:3538 __x64_sys_mount+0xbf/0xd0 fs/namespace.c:3538 x64_sys_call+0x6bf/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:166 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Freed by task 13: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4a/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373 kasan_slab_free include/linux/kasan.h:193 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1749 slab_free mm/slub.c:3521 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3539 mempool_free_slab+0x1d/0x30 mm/mempool.c:520 mempool_free+0xd8/0x340 mm/mempool.c:502 bio_free+0x251/0x360 block/bio.c:239 bio_put+0x9e/0x620 block/bio.c:700 end_bio_bh_io_sync+0xc4/0x120 fs/buffer.c:3008 bio_endio+0x6d9/0x7e0 block/bio.c:1478 req_bio_endio block/blk-core.c:272 [inline] blk_update_request+0x76a/0x1060 block/blk-core.c:1463 blk_mq_end_request+0x41/0x80 block/blk-mq.c:578 blk_flush_complete_seq+0x5de/0xd10 block/blk-flush.c:204 flush_end_io+0x7dc/0xa50 block/blk-flush.c:261 __blk_mq_end_request+0x387/0x3e0 block/blk-mq.c:569 blk_mq_end_request+0x55/0x80 block/blk-mq.c:580 lo_complete_rq+0x147/0x260 drivers/block/loop.c:530 blk_complete_reqs block/blk-mq.c:590 [inline] blk_done_softirq+0xff/0x140 block/blk-mq.c:595 handle_softirqs+0x250/0x560 kernel/softirq.c:583 run_ksoftirqd+0x28/0x40 kernel/softirq.c:959 smpboot_thread_fn+0x45a/0x8c0 kernel/smpboot.c:164 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff888112491000 which belongs to the cache bio-224 of size 224 The buggy address is located 0 bytes inside of 224-byte region [ffff888112491000, ffff8881124910e0) The buggy address belongs to the page: page:ffffea0004492440 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112491 flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff8881081aa480 raw: 0000000000000000 00000000000c000c 00000001ffffffff 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 0x192800(GFP_NOWAIT|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 383, ts 52030250394, free_ts 51985911951 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5789 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1932 [inline] new_slab+0xa1/0x4d0 mm/slub.c:1995 ___slab_alloc+0x381/0x810 mm/slub.c:3028 __slab_alloc+0x49/0x90 mm/slub.c:3115 slab_alloc_node mm/slub.c:3206 [inline] slab_alloc mm/slub.c:3250 [inline] kmem_cache_alloc+0x138/0x260 mm/slub.c:3255 mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513 mempool_alloc+0x159/0x4a0 mm/mempool.c:393 bio_alloc_bioset+0x136/0x940 block/bio.c:469 bio_alloc include/linux/bio.h:429 [inline] mpage_alloc fs/mpage.c:115 [inline] do_mpage_readpage+0x1628/0x1c20 fs/mpage.c:342 mpage_readahead+0x237/0x4d0 fs/mpage.c:425 blkdev_readahead+0x1c/0x20 block/fops.c:365 read_pages+0x16e/0xb00 mm/readahead.c:141 page_cache_ra_unbounded+0x782/0x980 mm/readahead.c:250 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] free_pcp_prepare mm/page_alloc.c:1544 [inline] free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534 free_unref_page_list+0x134/0x9d0 mm/page_alloc.c:3671 release_pages+0x1076/0x10d0 mm/swap.c:1009 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:320 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x175/0x300 mm/mmu_gather.c:338 exit_mmap+0x40f/0x860 mm/mmap.c:3236 __mmput+0x93/0x320 kernel/fork.c:1180 mmput+0x50/0x150 kernel/fork.c:1203 exit_mm kernel/exit.c:554 [inline] do_exit+0x9ca/0x27a0 kernel/exit.c:867 do_group_exit+0x141/0x310 kernel/exit.c:1002 get_signal+0x66a/0x1480 kernel/signal.c:2907 arch_do_signal_or_restart+0xc1/0x10f0 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0xa7/0xe0 kernel/entry/common.c:178 exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 Memory state around the buggy address: ffff888112490f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888112490f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888112491000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888112491080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff888112491100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================