================================================================== BUG: KASAN: use-after-free in ext4_get_inode_usage+0x39c/0x520 fs/ext4/xattr.c:821 Read of size 4 at addr ffff888112b93070 by task syz.2.38/466 CPU: 1 PID: 466 Comm: syz.2.38 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/25/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106 print_address_description+0x71/0x200 mm/kasan/report.c:316 print_report+0x4a/0x60 mm/kasan/report.c:420 kasan_report+0x122/0x150 mm/kasan/report.c:524 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350 ext4_get_inode_usage+0x39c/0x520 fs/ext4/xattr.c:821 __dquot_transfer+0x1a0/0x2370 fs/quota/dquot.c:2015 dquot_transfer+0x620/0x7d0 fs/quota/dquot.c:2174 ext4_setattr+0xa01/0x1c80 fs/ext4/inode.c:5529 notify_change+0xd33/0x1030 fs/attr.c:499 chown_common+0x448/0x5f0 fs/open.c:737 do_fchownat+0x147/0x240 fs/open.c:768 __do_sys_lchown fs/open.c:793 [inline] __se_sys_lchown fs/open.c:791 [inline] __x64_sys_lchown+0x85/0x90 fs/open.c:791 x64_sys_call+0x951/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:95 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f74de59de99 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:00007f74df532028 EFLAGS: 00000246 ORIG_RAX: 000000000000005e RAX: ffffffffffffffda RBX: 00007f74de825fa0 RCX: 00007f74de59de99 RDX: 000000000000ee01 RSI: 0000000000000000 RDI: 00002000000006c0 RBP: 00007f74de633eaf R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f74de826038 R14: 00007f74de825fa0 R15: 00007fffe19dc968 The buggy address belongs to the physical page: page:ffffea00044ae4c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112b93 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea0004588808 ffffea00045190c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0x152c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 460, tgid 458 (syz.4.36), ts 32331884281, free_ts 32376088250 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2672 prep_new_page+0x1c/0x110 mm/page_alloc.c:2679 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4586 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5930 __folio_alloc+0x12/0x40 mm/page_alloc.c:5963 __folio_alloc_node include/linux/gfp.h:245 [inline] folio_alloc include/linux/gfp.h:274 [inline] filemap_alloc_folio include/linux/pagemap.h:515 [inline] page_cache_ra_unbounded+0x24d/0x850 mm/readahead.c:260 do_page_cache_ra mm/readahead.c:313 [inline] page_cache_ra_order+0xb0c/0xe50 mm/readahead.c:584 ondemand_readahead+0x821/0xda0 mm/readahead.c:712 page_cache_async_ra+0xf2/0x120 mm/readahead.c:761 do_async_mmap_readahead mm/filemap.c:3236 [inline] filemap_fault+0x80f/0x1370 mm/filemap.c:3290 __do_fault mm/memory.c:4376 [inline] do_read_fault mm/memory.c:4751 [inline] do_fault+0x19de/0x1e30 mm/memory.c:4887 handle_pte_fault mm/memory.c:5183 [inline] __handle_mm_fault mm/memory.c:5325 [inline] handle_mm_fault+0x1363/0x26b0 mm/memory.c:5465 faultin_page mm/gup.c:1026 [inline] __get_user_pages+0x34b/0xdb0 mm/gup.c:1250 populate_vma_page_range mm/gup.c:1607 [inline] __mm_populate+0x2ea/0x430 mm/gup.c:1721 mm_populate include/linux/mm.h:3148 [inline] vm_mmap_pgoff+0x271/0x3f0 mm/util.c:530 ksys_mmap_pgoff+0x161/0x1d0 mm/mmap.c:1537 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1580 [inline] free_pcp_prepare mm/page_alloc.c:1654 [inline] free_unref_page_prepare+0x80c/0x820 mm/page_alloc.c:3621 free_unref_page_list+0x117/0x8d0 mm/page_alloc.c:3772 release_pages+0xc7e/0xce0 mm/swap.c:1053 __pagevec_release+0x71/0xe0 mm/swap.c:1073 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] invalidate_mapping_pagevec+0x417/0x610 mm/truncate.c:584 invalidate_mapping_pages+0x27/0x30 mm/truncate.c:608 invalidate_bdev+0xa6/0x150 block/bdev.c:88 ext4_put_super+0x71b/0xab0 fs/ext4/super.c:1333 generic_shutdown_super+0x16c/0x480 fs/super.c:506 kill_block_super+0x7f/0xf0 fs/super.c:1475 deactivate_locked_super+0xb5/0x120 fs/super.c:336 deactivate_super+0xaf/0xe0 fs/super.c:367 cleanup_mnt+0x45e/0x4e0 fs/namespace.c:1192 __cleanup_mnt+0x19/0x20 fs/namespace.c:1199 task_work_run+0x1e1/0x250 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0x9b/0xb0 kernel/entry/common.c:177 Memory state around the buggy address: ffff888112b92f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888112b92f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888112b93000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888112b93080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888112b93100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================