================================================================== BUG: KASAN: use-after-free in ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2894 Read of size 4 at addr ffff88811f6d4000 by task syz-executor223/287 CPU: 0 PID: 287 Comm: syz-executor223 Not tainted 5.10.215-syzkaller-00370-gb58b8f9dad93 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_xattr_delete_inode+0xc67/0xc80 fs/ext4/xattr.c:2894 ext4_evict_inode+0x1095/0x1730 fs/ext4/inode.c:300 evict+0x2a3/0x6c0 fs/inode.c:577 iput_final fs/inode.c:1697 [inline] iput+0x632/0x7e0 fs/inode.c:1723 d_delete_notify include/linux/fsnotify.h:261 [inline] vfs_rmdir+0x271/0x3f0 fs/namei.c:3865 do_rmdir+0x2cf/0x5c0 fs/namei.c:3912 __do_sys_rmdir fs/namei.c:3930 [inline] __se_sys_rmdir fs/namei.c:3928 [inline] __x64_sys_rmdir+0x49/0x50 fs/namei.c:3928 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xc6 RIP: 0033:0x7f924093edc7 Code: 73 01 c3 48 c7 c1 b8 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 54 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffdf418b818 EFLAGS: 00000207 ORIG_RAX: 0000000000000054 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f924093edc7 RDX: 0000000000008890 RSI: 0000000000000000 RDI: 00007ffdf418c9c0 RBP: 0000000000000065 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffdf418c9c0 R13: 0000555555e84740 R14: 431bde82d7b634db R15: 00007ffdf418eb40 Allocated by task 296: 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:430 [inline] __kasan_slab_alloc+0xb1/0xe0 mm/kasan/common.c:463 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513 mempool_alloc+0x11f/0x530 mm/mempool.c:393 bio_alloc_bioset+0x1e0/0x650 block/bio.c:486 bio_alloc include/linux/bio.h:412 [inline] submit_bh_wbc+0x1d1/0x700 fs/buffer.c:3057 submit_bh+0x28/0x40 fs/buffer.c:3091 write_mmp_block_thawed+0x3a5/0x560 fs/ext4/mmp.c:51 write_mmp_block+0xc1/0x210 fs/ext4/mmp.c:67 kmmpd+0x45a/0xb40 fs/ext4/mmp.c:180 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:299 Freed by task 19: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kmem_cache_free+0xa9/0x1e0 mm/slub.c:3219 mempool_free_slab+0x1d/0x30 mm/mempool.c:520 mempool_free+0xd7/0x310 mm/mempool.c:502 bio_free+0x157/0x1a0 block/bio.c:266 bio_put+0xca/0x120 end_bio_bh_io_sync+0xbf/0x110 fs/buffer.c:3037 bio_endio+0x520/0x6a0 block/bio.c:1458 req_bio_endio block/blk-core.c:263 [inline] blk_update_request+0x6e9/0x12b0 block/blk-core.c:1468 blk_mq_end_request+0x43/0x80 block/blk-mq.c:569 lo_complete_rq+0x154/0x2f0 drivers/block/loop.c:490 blk_done_softirq+0x345/0x3d0 block/blk-mq.c:593 __do_softirq+0x268/0x5bb kernel/softirq.c:309 The buggy address belongs to the object at ffff88811f6d4000 which belongs to the cache bio-0 of size 216 The buggy address is located 0 bytes inside of 216-byte region [ffff88811f6d4000, ffff88811f6d40d8) The buggy address belongs to the page: page:ffffea00047db500 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11f6d4 flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff888107fe5200 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 0x92880(GFP_NOWAIT|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_NOMEMALLOC), pid 288, ts 23196645939, free_ts 23124766618 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x1b9/0x2e0 mm/slub.c:2960 mempool_alloc_slab+0x1d/0x30 mm/mempool.c:513 mempool_alloc+0x11f/0x530 mm/mempool.c:393 bio_alloc_bioset+0x1e0/0x650 block/bio.c:486 bio_alloc include/linux/bio.h:412 [inline] mpage_alloc fs/mpage.c:115 [inline] do_mpage_readpage+0x14b9/0x1ae0 fs/mpage.c:342 mpage_readahead+0x2d7/0x610 fs/mpage.c:425 blkdev_readahead+0x1c/0x20 fs/block_dev.c:653 read_pages+0x17e/0xbf0 mm/readahead.c:140 page_cache_ra_unbounded+0x6be/0x890 mm/readahead.c:248 do_page_cache_ra mm/readahead.c:277 [inline] force_page_cache_ra+0x373/0x3e0 mm/readahead.c:308 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2ae/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x122/0xb20 mm/page_alloc.c:3443 release_pages+0xea0/0xef0 mm/swap.c:1103 __pagevec_release+0x84/0x100 mm/swap.c:1123 pagevec_release include/linux/pagevec.h:88 [inline] __invalidate_mapping_pages+0xa67/0xb50 mm/truncate.c:607 invalidate_mapping_pages+0x27/0x30 mm/truncate.c:632 invalidate_bdev+0xa3/0x140 fs/block_dev.c:97 ext4_put_super+0x67d/0xc70 fs/ext4/super.c:1237 generic_shutdown_super+0x14f/0x2d0 fs/super.c:465 kill_block_super+0x7e/0xe0 fs/super.c:1456 deactivate_locked_super+0xad/0x110 fs/super.c:335 deactivate_super+0xbe/0xf0 fs/super.c:366 cleanup_mnt+0x45c/0x510 fs/namespace.c:1118 __cleanup_mnt+0x19/0x20 fs/namespace.c:1125 task_work_run+0x129/0x190 kernel/task_work.c:165 ptrace_notify+0x29e/0x350 kernel/signal.c:2277 Memory state around the buggy address: ffff88811f6d3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88811f6d3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88811f6d4000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811f6d4080: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff88811f6d4100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ==================================================================