loop0: detected capacity change from 0 to 1024 ======================================================= WARNING: The mand mount option has been deprecated and and is ignored by this kernel. Remove the mand option from the mount to silence this warning. ======================================================= EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. EXT4-fs error (device loop0): ext4_mb_mark_diskspace_used:4193: comm syz.0.0: Allocating blocks 497-513 which overlap fs metadata EXT4-fs (loop0): pa ffff888042b30910: logic 128, phys. 385, len 8 EXT4-fs error (device loop0): ext4_mb_release_inode_pa:5444: group 0, free 0, pa_free 1 ================================================================== BUG: KASAN: use-after-free in ext4_ext_rm_leaf fs/ext4/extents.c:2627 [inline] BUG: KASAN: use-after-free in ext4_ext_remove_space+0x31a5/0x4260 fs/ext4/extents.c:2965 Read of size 4 at addr ffff88805177dc18 by task syz.0.0/5341 CPU: 0 UID: 0 PID: 5341 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 ext4_ext_rm_leaf fs/ext4/extents.c:2627 [inline] ext4_ext_remove_space+0x31a5/0x4260 fs/ext4/extents.c:2965 ext4_ext_truncate+0x17e/0x300 fs/ext4/extents.c:4484 ext4_truncate+0xb3f/0x12b0 fs/ext4/inode.c:4610 ext4_truncate_failed_write fs/ext4/truncate.h:22 [inline] ext4_write_begin+0x1079/0x1860 fs/ext4/inode.c:1384 ext4_da_write_begin+0x352/0xd30 fs/ext4/inode.c:3125 generic_perform_write+0x2c5/0x900 mm/filemap.c:4300 ext4_buffered_write_iter+0xce/0x3a0 fs/ext4/file.c:299 ext4_file_write_iter+0x298/0x1bc0 fs/ext4/file.c:-1 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcfdb38f7c9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcfdc2d6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fcfdb5e5fa0 RCX: 00007fcfdb38f7c9 RDX: 00000000fffffdef RSI: 00002000000000c0 RDI: 0000000000000004 RBP: 00007fcfdb413f91 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fcfdb5e6038 R14: 00007fcfdb5e5fa0 R15: 00007fff262a3ae8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5177d flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea000145df48 ffffea000145df48 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff88805177db00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805177db80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88805177dc00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88805177dc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805177dd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================