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:4224: comm syz.0.0: Allocating blocks 497-513 which overlap fs metadata EXT4-fs (loop0): pa ffff888047c8f740: logic 128, phys. 385, len 8 EXT4-fs error (device loop0): ext4_mb_release_inode_pa:5467: group 0, free 0, pa_free 1 ================================================================== BUG: KASAN: use-after-free in ext4_ext_rm_leaf fs/ext4/extents.c:2632 [inline] BUG: KASAN: use-after-free in ext4_ext_remove_space+0x3170/0x4280 fs/ext4/extents.c:2966 Read of size 4 at addr ffff888055dc4c18 by task syz.0.0/5312 CPU: 0 UID: 0 PID: 5312 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 04/01/2014 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 ext4_ext_rm_leaf fs/ext4/extents.c:2632 [inline] ext4_ext_remove_space+0x3170/0x4280 fs/ext4/extents.c:2966 ext4_ext_truncate+0x17e/0x2f0 fs/ext4/extents.c:4539 ext4_truncate+0xb63/0x13b0 fs/ext4/inode.c:4564 ext4_truncate_failed_write fs/ext4/truncate.h:22 [inline] ext4_write_begin+0x1082/0x18c0 fs/ext4/inode.c:1383 ext4_da_write_begin+0x355/0xd80 fs/ext4/inode.c:3123 generic_perform_write+0x2e2/0x8f0 mm/filemap.c:4314 ext4_buffered_write_iter+0xce/0x3a0 fs/ext4/file.c:300 ext4_file_write_iter+0x298/0x1bf0 fs/ext4/file.c:-1 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x61d/0xb90 fs/read_write.c:688 ksys_write+0x150/0x270 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f40d3d9bf79 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:00007f40d4b9e028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f40d4015fa0 RCX: 00007f40d3d9bf79 RDX: 0000000001670e68 RSI: 0000200000000100 RDI: 0000000000000006 RBP: 00007f40d3e327e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f40d4016038 R14: 00007f40d4015fa0 R15: 00007fffd7568678 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x55dc4 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001577148 ffffea00015770c8 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: ffff888055dc4b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888055dc4b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888055dc4c00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888055dc4c80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888055dc4d00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================