================================================================== BUG: KASAN: use-after-free in ext4_get_inode_usage+0x39c/0x520 fs/ext4/xattr.c:821 Read of size 4 at addr ffff88812e02a070 by task syz.6.42/479 CPU: 0 PID: 479 Comm: syz.6.42 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/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:2015 dquot_transfer+0x2f3/0x470 fs/quota/dquot.c:2167 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:0x7f207cebae59 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:00007f207cd1d028 EFLAGS: 00000246 ORIG_RAX: 000000000000005e RAX: ffffffffffffffda RBX: 00007f207d133fa0 RCX: 00007f207cebae59 RDX: 000000000000ee01 RSI: 0000000000000000 RDI: 00002000000006c0 RBP: 00007f207cf50e6f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f207d134038 R14: 00007f207d133fa0 R15: 00007ffded67dda8 Allocated by task 10: 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+0xb7/0xe0 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:3245 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc+0xf7/0x260 mm/slub.c:3260 mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513 mempool_alloc+0x167/0x4c0 mm/mempool.c:393 bio_alloc_bioset+0x124/0x910 block/bio.c:469 bio_alloc include/linux/bio.h:429 [inline] submit_bh_wbc+0x1c2/0x680 fs/buffer.c:3028 __block_write_full_page+0x877/0xef0 fs/buffer.c:1811 block_write_full_page+0x12f/0x140 include/linux/highmem.h:-1 blkdev_writepage+0x24/0x30 block/fops.c:355 __writepage+0x66/0x130 mm/page-writeback.c:2344 write_cache_pages+0x7ce/0xd30 mm/page-writeback.c:2279 generic_writepages+0x104/0x170 mm/page-writeback.c:2370 blkdev_writepages+0x1d/0x30 block/fops.c:392 do_writepages+0x476/0x6d0 mm/page-writeback.c:2388 __writeback_single_inode+0xd9/0x9e0 fs/fs-writeback.c:1657 writeback_sb_inodes+0x9f3/0x1610 fs/fs-writeback.c:1940 __writeback_inodes_wb+0x127/0x400 fs/fs-writeback.c:2011 wb_writeback+0x3ff/0x990 fs/fs-writeback.c:2118 wb_check_background_flush fs/fs-writeback.c:2188 [inline] wb_do_writeback fs/fs-writeback.c:2276 [inline] wb_workfn+0xb0a/0xf30 fs/fs-writeback.c:2304 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328 worker_thread+0xaa0/0x1250 kernel/workqueue.c:2475 kthread+0x3f5/0x4f0 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Freed by task 25: 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:1728 [inline] slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754 slab_free mm/slub.c:3526 [inline] kmem_cache_free+0x100/0x320 mm/slub.c:3544 mempool_free_slab+0x1d/0x30 mm/mempool.c:520 mempool_free+0xd5/0x330 mm/mempool.c:502 bio_free+0x255/0x360 block/bio.c:239 bio_put+0x91/0x610 block/bio.c:700 end_bio_bh_io_sync+0xc4/0x120 fs/buffer.c:3008 bio_endio+0x732/0x810 block/bio.c:1478 req_bio_endio block/blk-core.c:272 [inline] blk_update_request+0x75d/0x1030 block/blk-core.c:1463 blk_mq_end_request+0x41/0x80 block/blk-mq.c:582 lo_complete_rq+0x131/0x250 drivers/block/loop.c:530 blk_complete_reqs block/blk-mq.c:594 [inline] blk_done_softirq+0xff/0x140 block/blk-mq.c:599 handle_softirqs+0x250/0x560 kernel/softirq.c:583 run_ksoftirqd+0x28/0x40 kernel/softirq.c:959 smpboot_thread_fn+0x446/0x880 kernel/smpboot.c:164 kthread+0x3f5/0x4f0 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the object at ffff88812e02a000 which belongs to the cache bio-224 of size 224 The buggy address is located 112 bytes inside of 224-byte region [ffff88812e02a000, ffff88812e02a0e0) The buggy address belongs to the page: page:ffffea0004b80a80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12e02a flags: 0x4000000000000200(slab|zone=1) raw: 4000000000000200 0000000000000000 dead000000000122 ffff8881081ab980 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 10, ts 38562241615, free_ts 38203712495 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 alloc_slab_page mm/slub.c:-1 [inline] allocate_slab mm/slub.c:1937 [inline] new_slab+0xa0/0x4d0 mm/slub.c:2000 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033 __slab_alloc+0x49/0x90 mm/slub.c:3120 slab_alloc_node mm/slub.c:3211 [inline] slab_alloc mm/slub.c:3255 [inline] kmem_cache_alloc+0x138/0x260 mm/slub.c:3260 mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513 mempool_alloc+0x167/0x4c0 mm/mempool.c:393 bio_alloc_bioset+0x124/0x910 block/bio.c:469 bio_alloc include/linux/bio.h:429 [inline] submit_bh_wbc+0x1c2/0x680 fs/buffer.c:3028 __block_write_full_page+0x877/0xef0 fs/buffer.c:1811 block_write_full_page+0x12f/0x140 include/linux/highmem.h:-1 blkdev_writepage+0x24/0x30 block/fops.c:355 __writepage+0x66/0x130 mm/page-writeback.c:2344 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_list+0x138/0x9e0 mm/page_alloc.c:3673 release_pages+0x1264/0x12c0 mm/swap.c:1015 __pagevec_release+0x71/0xe0 mm/swap.c:1035 pagevec_release include/linux/pagevec.h:81 [inline] __invalidate_mapping_pages+0x4b5/0x6c0 mm/truncate.c:517 invalidate_mapping_pages+0x27/0x30 mm/truncate.c:541 invalidate_bdev+0xa6/0x150 block/bdev.c:91 ext4_put_super+0x6ce/0xa60 fs/ext4/super.c:1245 generic_shutdown_super+0x151/0x330 fs/super.c:475 kill_block_super+0x7f/0xf0 fs/super.c:1427 deactivate_locked_super+0xa0/0x100 fs/super.c:335 deactivate_super+0xaf/0xe0 fs/super.c:366 cleanup_mnt+0x44f/0x500 fs/namespace.c:1149 __cleanup_mnt+0x19/0x20 fs/namespace.c:1156 task_work_run+0x127/0x190 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181 Memory state around the buggy address: ffff88812e029f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812e029f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812e02a000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88812e02a080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff88812e02a100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================