================================================================== BUG: KASAN: use-after-free in ext4_get_inode_usage+0x39c/0x520 fs/ext4/xattr.c:821 Read of size 4 at addr ffff8881249f2070 by task syz.2.23/518 CPU: 1 PID: 518 Comm: syz.2.23 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0x110/0x170 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+0x10f/0x150 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_get_inode_usage+0x39c/0x520 fs/ext4/xattr.c:821 __dquot_transfer+0x192/0x22d0 fs/quota/dquot.c:2037 dquot_transfer+0x2f3/0x470 fs/quota/dquot.c:2189 ext4_setattr+0x746/0x1b10 fs/ext4/inode.c:5508 notify_change+0xc30/0xf40 fs/attr.c:505 chown_common+0x4b4/0x680 fs/open.c:681 do_fchownat+0x147/0x240 fs/open.c:712 __do_sys_lchown fs/open.c:737 [inline] __se_sys_lchown fs/open.c:735 [inline] __x64_sys_lchown+0x85/0x90 fs/open.c:735 x64_sys_call+0x171/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:95 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:0x7f2b94dd2e59 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:00007f2b94c35028 EFLAGS: 00000246 ORIG_RAX: 000000000000005e RAX: ffffffffffffffda RBX: 00007f2b9504bfa0 RCX: 00007f2b94dd2e59 RDX: 000000000000ee01 RSI: 0000000000000000 RDI: 00002000000006c0 RBP: 00007f2b94e68e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f2b9504c038 R14: 00007f2b9504bfa0 R15: 00007ffcb6543618 The buggy address belongs to the page: page:ffffea0004927c80 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x1 pfn:0x1249f2 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea000490e808 ffffea000492e088 0000000000000000 raw: 0000000000000001 0000000000000001 00000000ffffff7f 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 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 416, ts 39165963811, free_ts 39563960411 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607 prep_new_page+0x1c/0x110 mm/page_alloc.c:2613 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824 vm_area_alloc_pages mm/vmalloc.c:-1 [inline] __vmalloc_area_node mm/vmalloc.c:2981 [inline] __vmalloc_node_range+0x507/0xad0 mm/vmalloc.c:3147 vmalloc_user+0x73/0x80 mm/vmalloc.c:3298 kcov_mmap+0x2b/0x130 kernel/kcov.c:474 call_mmap include/linux/fs.h:2217 [inline] mmap_file+0x60/0xb0 mm/util.c:1099 __mmap_region mm/mmap.c:1808 [inline] mmap_region+0xe42/0x1700 mm/mmap.c:2959 do_mmap+0x812/0xf10 mm/mmap.c:1598 vm_mmap_pgoff+0x1d6/0x410 mm/util.c:555 ksys_mmap_pgoff+0x161/0x1d0 mm/mmap.c:1647 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10 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 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1474 [inline] free_pcp_prepare mm/page_alloc.c:1546 [inline] free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3536 free_unref_page+0xae/0x540 mm/page_alloc.c:3618 free_the_page mm/page_alloc.c:805 [inline] __free_pages+0x6c/0x100 mm/page_alloc.c:5900 __vunmap+0x801/0x980 mm/vmalloc.c:2660 __vfree mm/vmalloc.c:2709 [inline] vfree+0x8b/0xc0 mm/vmalloc.c:2740 kcov_put kernel/kcov.c:417 [inline] kcov_close+0x2b/0x50 kernel/kcov.c:519 __fput+0x22b/0x900 fs/file_table.c:311 ____fput+0x15/0x20 fs/file_table.c:339 task_work_run+0x127/0x190 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0xb70/0x29a0 kernel/exit.c:896 do_group_exit+0x149/0x310 kernel/exit.c:1010 get_signal+0x64f/0x1430 kernel/signal.c:2916 arch_do_signal_or_restart+0xe2/0x1100 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+0x87/0xd0 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 Memory state around the buggy address: ffff8881249f1f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881249f1f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881249f2000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881249f2080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881249f2100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================