================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:871 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbc9/0xde0 fs/ext4/extents.c:991 Read of size 4 at addr ffff8881cfb0fccc by task syz.2.16/568 CPU: 1 PID: 568 Comm: syz.2.16 Not tainted 5.4.290-syzkaller-05051-g6b07fcd94a6a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 ext4_ext_binsearch fs/ext4/extents.c:871 [inline] ext4_find_extent+0xbc9/0xde0 fs/ext4/extents.c:991 ext4_ext_remove_space+0x339/0x4ba0 fs/ext4/extents.c:3036 ext4_punch_hole+0x6ac/0xad0 fs/ext4/inode.c:4492 ext4_fallocate+0x265/0x570 fs/ext4/extents.c:4991 vfs_fallocate+0x551/0x6b0 fs/open.c:309 ksys_fallocate fs/open.c:332 [inline] __do_sys_fallocate fs/open.c:340 [inline] __se_sys_fallocate fs/open.c:338 [inline] __x64_sys_fallocate+0xb9/0x100 fs/open.c:338 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f09323b1de9 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:00007f0931e24038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f09325cafa0 RCX: 00007f09323b1de9 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000005 RBP: 00007f09324332a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001a00 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f09325cafa0 R15: 00007fffa37b8e58 The buggy address belongs to the page: page:ffffea00073ec3c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 flags: 0x8000000000000000() raw: 8000000000000000 ffffea00073ec408 ffffea00073ec388 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff8881cfb0fb80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881cfb0fc00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8881cfb0fc80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8881cfb0fd00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8881cfb0fd80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ------------[ cut here ]------------ kernel BUG at fs/ext4/extents.c:3390! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 568 Comm: syz.2.16 Tainted: G B 5.4.290-syzkaller-05051-g6b07fcd94a6a #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 RIP: 0010:ext4_split_extent_at+0x11f4/0x1220 fs/ext4/extents.c:3390 Code: fe c1 38 c1 0f 8c 59 fa ff ff e8 f7 85 d1 ff 48 8b 54 24 58 48 8b 74 24 70 e9 45 fa ff ff e8 73 9b a1 ff 0f 0b e8 6c 9b a1 ff <0f> 0b e8 65 9b a1 ff 0f 0b e8 6e 3e 78 ff e8 59 9b a1 ff 0f 0b e8 RSP: 0018:ffff8881e346f900 EFLAGS: 00010293 RAX: ffffffff81c2af94 RBX: 0000000000000000 RCX: ffff8881e45f8fc0 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffff8881e346fa70 R08: ffffffff81c2a00f R09: ffff8881e346fa00 R10: ffffffffffffffff R11: dffffc0000000001 R12: 0000000000000000 R13: 1ffff11039f62730 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f0931e246c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055cc5575f9f8 CR3: 00000001d2491000 CR4: 00000000003406b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ext4_force_split_extent_at fs/ext4/extents.c:312 [inline] ext4_ext_remove_space+0x6f3/0x4ba0 fs/ext4/extents.c:3083 ext4_punch_hole+0x6ac/0xad0 fs/ext4/inode.c:4492 ext4_fallocate+0x265/0x570 fs/ext4/extents.c:4991 vfs_fallocate+0x551/0x6b0 fs/open.c:309 ksys_fallocate fs/open.c:332 [inline] __do_sys_fallocate fs/open.c:340 [inline] __se_sys_fallocate fs/open.c:338 [inline] __x64_sys_fallocate+0xb9/0x100 fs/open.c:338 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f09323b1de9 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:00007f0931e24038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f09325cafa0 RCX: 00007f09323b1de9 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000005 RBP: 00007f09324332a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001a00 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f09325cafa0 R15: 00007fffa37b8e58 Modules linked in: ---[ end trace 77bfaee6e23999aa ]--- RIP: 0010:ext4_split_extent_at+0x11f4/0x1220 fs/ext4/extents.c:3390 Code: fe c1 38 c1 0f 8c 59 fa ff ff e8 f7 85 d1 ff 48 8b 54 24 58 48 8b 74 24 70 e9 45 fa ff ff e8 73 9b a1 ff 0f 0b e8 6c 9b a1 ff <0f> 0b e8 65 9b a1 ff 0f 0b e8 6e 3e 78 ff e8 59 9b a1 ff 0f 0b e8 RSP: 0018:ffff8881e346f900 EFLAGS: 00010293 RAX: ffffffff81c2af94 RBX: 0000000000000000 RCX: ffff8881e45f8fc0 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffff8881e346fa70 R08: ffffffff81c2a00f R09: ffff8881e346fa00 R10: ffffffffffffffff R11: dffffc0000000001 R12: 0000000000000000 R13: 1ffff11039f62730 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f0931e246c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fded0e5f2a9 CR3: 00000001d2491000 CR4: 00000000003406a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400