================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:837 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbab/0xdb0 fs/ext4/extents.c:953 Read of size 4 at addr ffff888126bba788 by task kworker/u4:1/10 CPU: 0 PID: 10 Comm: kworker/u4:1 Not tainted 6.1.25-syzkaller-00999-g060ebb378d1c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0x158/0x4e0 mm/kasan/report.c:427 kasan_report+0x13c/0x170 mm/kasan/report.c:531 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350 ext4_ext_binsearch fs/ext4/extents.c:837 [inline] ext4_find_extent+0xbab/0xdb0 fs/ext4/extents.c:953 ext4_ext_map_blocks+0x255/0x71e0 fs/ext4/extents.c:4103 ext4_map_blocks+0xa42/0x1ce0 fs/ext4/inode.c:651 mpage_map_one_extent fs/ext4/inode.c:2421 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2474 [inline] ext4_writepages+0x17b5/0x3fd0 fs/ext4/inode.c:2842 do_writepages+0x385/0x620 mm/page-writeback.c:2472 __writeback_single_inode+0xdc/0xb80 fs/fs-writeback.c:1590 writeback_sb_inodes+0xb33/0x18f0 fs/fs-writeback.c:1881 wb_writeback+0x3b9/0x9f0 fs/fs-writeback.c:2055 wb_do_writeback fs/fs-writeback.c:2198 [inline] wb_workfn+0x399/0x1030 fs/fs-writeback.c:2238 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2296 worker_thread+0xa60/0x1260 kernel/workqueue.c:2443 kthread+0x26d/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 The buggy address belongs to the physical page: page:ffffea00049aee80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x126bba flags: 0x4000000000000000(zone=1) raw: 4000000000000000 ffffea00049aeec8 ffffea00049aee48 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: ffff888126bba680: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888126bba700: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888126bba780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888126bba800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888126bba880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ------------[ cut here ]------------ kernel BUG at fs/ext4/inode.c:2433! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 10 Comm: kworker/u4:1 Tainted: G B 6.1.25-syzkaller-00999-g060ebb378d1c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Workqueue: writeback wb_workfn (flush-7:0) RIP: 0010:mpage_map_one_extent fs/ext4/inode.c:2433 [inline] RIP: 0010:mpage_map_and_submit_extent fs/ext4/inode.c:2474 [inline] RIP: 0010:ext4_writepages+0x3d6f/0x3fd0 fs/ext4/inode.c:2842 Code: e8 b6 10 82 ff be 00 10 00 00 48 c7 c7 90 e4 6b 86 4c 89 f2 e8 12 5d ab 00 e9 0f fb ff ff e8 98 10 82 ff 0f 0b e8 91 10 82 ff <0f> 0b e8 4a 91 01 03 65 8b 05 4b 44 0f 7e 41 89 c7 4c 89 f8 48 c1 RSP: 0018:ffffc900000a7000 EFLAGS: 00010293 RAX: ffffffff81f2ccff RBX: dffffc0000000000 RCX: ffff88810037bcc0 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc900000a7410 R08: ffffffff81f2aa0f R09: ffffed10200af74c R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000 R13: 0000000000000000 R14: ffff88810057ba98 R15: ffffc900000a72e0 FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005555566fa818 CR3: 000000010f5a2000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: do_writepages+0x385/0x620 mm/page-writeback.c:2472 __writeback_single_inode+0xdc/0xb80 fs/fs-writeback.c:1590 writeback_sb_inodes+0xb33/0x18f0 fs/fs-writeback.c:1881 wb_writeback+0x3b9/0x9f0 fs/fs-writeback.c:2055 wb_do_writeback fs/fs-writeback.c:2198 [inline] wb_workfn+0x399/0x1030 fs/fs-writeback.c:2238 process_one_work+0x73d/0xcb0 kernel/workqueue.c:2296 worker_thread+0xa60/0x1260 kernel/workqueue.c:2443 kthread+0x26d/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:mpage_map_one_extent fs/ext4/inode.c:2433 [inline] RIP: 0010:mpage_map_and_submit_extent fs/ext4/inode.c:2474 [inline] RIP: 0010:ext4_writepages+0x3d6f/0x3fd0 fs/ext4/inode.c:2842 Code: e8 b6 10 82 ff be 00 10 00 00 48 c7 c7 90 e4 6b 86 4c 89 f2 e8 12 5d ab 00 e9 0f fb ff ff e8 98 10 82 ff 0f 0b e8 91 10 82 ff <0f> 0b e8 4a 91 01 03 65 8b 05 4b 44 0f 7e 41 89 c7 4c 89 f8 48 c1 RSP: 0018:ffffc900000a7000 EFLAGS: 00010293 RAX: ffffffff81f2ccff RBX: dffffc0000000000 RCX: ffff88810037bcc0 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc900000a7410 R08: ffffffff81f2aa0f R09: ffffed10200af74c R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000 R13: 0000000000000000 R14: ffff88810057ba98 R15: ffffc900000a72e0 FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005555566fa818 CR3: 000000010f5a2000 CR4: 00000000003506a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400