================================================================== BUG: KASAN: use-after-free in ext4_ext_binsearch fs/ext4/extents.c:827 [inline] BUG: KASAN: use-after-free in ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:946 Read of size 4 at addr ffff88813c3c7018 by task kworker/u4:11/3861 CPU: 1 PID: 3861 Comm: kworker/u4:11 Not tainted 5.15.189-syzkaller-00091-gf32b52534f1d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: writeback wb_workfn (flush-7:2) Call Trace: __dump_stack+0x21/0x30 lib/dump_stack.c:88 dump_stack_lvl+0xee/0x150 lib/dump_stack.c:106 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:427 [inline] kasan_report+0xf1/0x140 mm/kasan/report.c:444 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:308 ext4_ext_binsearch fs/ext4/extents.c:827 [inline] ext4_find_extent+0xbeb/0xe20 fs/ext4/extents.c:946 ext4_ext_map_blocks+0x1de/0x6280 fs/ext4/extents.c:4166 ext4_map_blocks+0x97b/0x1b20 fs/ext4/inode.c:674 mpage_map_one_extent fs/ext4/inode.c:2421 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2474 [inline] ext4_writepages+0x11e7/0x2f90 fs/ext4/inode.c:2842 do_writepages+0x48a/0x6c0 mm/page-writeback.c:2388 __writeback_single_inode+0xd5/0x9c0 fs/fs-writeback.c:1647 writeback_sb_inodes+0x9c0/0x1590 fs/fs-writeback.c:1930 wb_writeback+0x3f1/0x980 fs/fs-writeback.c:2106 wb_do_writeback fs/fs-writeback.c:2253 [inline] wb_workfn+0x38f/0xe20 fs/fs-writeback.c:2294 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 The buggy address belongs to the page: page:ffffea0004f0f1c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13c3c7 flags: 0x4000000000000000(zone=1) raw: 4000000000000000 0000000000000000 ffffea0004f0f1c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 7, migratetype Unmovable, gfp_mask 0x542dc0(GFP_USER|__GFP_NOWARN|__GFP_COMP|__GFP_ZERO|__GFP_ACCOUNT), pid 8731, ts 537362865950, free_ts 540607583209 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2605 prep_new_page+0x1c/0x110 mm/page_alloc.c:2611 get_page_from_freelist+0x2cc5/0x2d50 mm/page_alloc.c:4485 __alloc_pages+0x18f/0x440 mm/page_alloc.c:5795 __alloc_pages_node include/linux/gfp.h:595 [inline] alloc_pages_node include/linux/gfp.h:609 [inline] alloc_pages include/linux/gfp.h:622 [inline] __get_free_pages+0x10/0x30 mm/page_alloc.c:5832 io_mem_alloc io_uring/io_uring.c:8875 [inline] io_allocate_scq_urings io_uring/io_uring.c:10296 [inline] io_uring_create io_uring/io_uring.c:10412 [inline] io_uring_setup io_uring/io_uring.c:10502 [inline] __do_sys_io_uring_setup io_uring/io_uring.c:10508 [inline] __se_sys_io_uring_setup+0xfa7/0x29a0 io_uring/io_uring.c:10505 __x64_sys_io_uring_setup+0x5b/0x70 io_uring/io_uring.c:10505 x64_sys_call+0x5f4/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:426 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] free_pages_prepare mm/page_alloc.c:1472 [inline] __free_pages_ok+0x91a/0x9e0 mm/page_alloc.c:1772 free_the_page mm/page_alloc.c:807 [inline] free_compound_page+0x89/0xa0 mm/page_alloc.c:828 io_mem_free io_uring/io_uring.c:8868 [inline] io_ring_ctx_free io_uring/io_uring.c:9412 [inline] io_ring_exit_work+0xed3/0x15e0 io_uring/io_uring.c:9577 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff88813c3c6f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88813c3c6f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88813c3c7000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88813c3c7080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88813c3c7100: 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: 0 PID: 3861 Comm: kworker/u4:11 Tainted: G B 5.15.189-syzkaller-00091-gf32b52534f1d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: writeback wb_workfn (flush-7:2) 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+0x2eed/0x2f90 fs/ext4/inode.c:2842 Code: 00 74 08 48 89 df e8 22 01 ce ff 48 8b 3b 48 8b 74 24 28 48 8b 54 24 30 44 89 e9 45 89 f0 e8 6a 9b 07 00 eb 51 e8 23 86 8f ff <0f> 0b e8 1c 86 8f ff eb 2f e8 15 86 8f ff eb 5f e8 0e 86 8f ff 31 RSP: 0018:ffffc9000120f100 EFLAGS: 00010293 RAX: ffffffff81d929ad RBX: ffff888133135900 RCX: ffff888117638000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000120f470 R08: dffffc0000000000 R09: ffffed1026626b19 R10: ffffed1026626b19 R11: 1ffff11026626b18 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c2f5d92 CR3: 000000010d320000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: do_writepages+0x48a/0x6c0 mm/page-writeback.c:2388 __writeback_single_inode+0xd5/0x9c0 fs/fs-writeback.c:1647 writeback_sb_inodes+0x9c0/0x1590 fs/fs-writeback.c:1930 wb_writeback+0x3f1/0x980 fs/fs-writeback.c:2106 wb_do_writeback fs/fs-writeback.c:2253 [inline] wb_workfn+0x38f/0xe20 fs/fs-writeback.c:2294 process_one_work+0x6be/0xba0 kernel/workqueue.c:2325 worker_thread+0xa59/0x1200 kernel/workqueue.c:2472 kthread+0x411/0x500 kernel/kthread.c:337 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Modules linked in: ---[ end trace 57c416a7f002317e ]--- 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+0x2eed/0x2f90 fs/ext4/inode.c:2842 Code: 00 74 08 48 89 df e8 22 01 ce ff 48 8b 3b 48 8b 74 24 28 48 8b 54 24 30 44 89 e9 45 89 f0 e8 6a 9b 07 00 eb 51 e8 23 86 8f ff <0f> 0b e8 1c 86 8f ff eb 2f e8 15 86 8f ff eb 5f e8 0e 86 8f ff 31 RSP: 0018:ffffc9000120f100 EFLAGS: 00010293 RAX: ffffffff81d929ad RBX: ffff888133135900 RCX: ffff888117638000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc9000120f470 R08: dffffc0000000000 R09: ffffed1026626b19 R10: ffffed1026626b19 R11: 1ffff11026626b18 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000110c2f5d92 CR3: 000000010d320000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400