==================================================================
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 ffff88812983d8c0 by task kworker/u4:5/429
CPU: 0 PID: 429 Comm: kworker/u4:5 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Workqueue: writeback wb_workfn (flush-7:6)
Call Trace:
__dump_stack+0x21/0x30 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 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+0x207/0x6230 fs/ext4/extents.c:4182
ext4_map_blocks+0x988/0x1b30 fs/ext4/inode.c:676
mpage_map_one_extent fs/ext4/inode.c:2423 [inline]
mpage_map_and_submit_extent fs/ext4/inode.c:2476 [inline]
ext4_writepages+0x123f/0x3090 fs/ext4/inode.c:2844
do_writepages+0x473/0x6c0 mm/page-writeback.c:2388
__writeback_single_inode+0xd5/0x9c0 fs/fs-writeback.c:1657
writeback_sb_inodes+0xa10/0x1610 fs/fs-writeback.c:1940
wb_writeback+0x40b/0x9d0 fs/fs-writeback.c:2116
wb_do_writeback fs/fs-writeback.c:2263 [inline]
wb_workfn+0x3ac/0xf30 fs/fs-writeback.c:2304
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:ffffea0004a60f40 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x12983d
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea0004a60f88 ffffea0004a60f08 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Movable, gfp_mask 0x100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), pid 299, ts 27579228569, free_ts 27640363027
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+0x2d3a/0x2dc0 mm/page_alloc.c:4485
__alloc_pages+0x1a2/0x460 mm/page_alloc.c:5822
__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]
do_anonymous_page mm/memory.c:4069 [inline]
handle_pte_fault+0xebf/0x2710 mm/memory.c:4909
__handle_mm_fault mm/memory.c:-1 [inline]
do_handle_mm_fault+0x1af9/0x1de0 mm/memory.c:5333
handle_mm_fault include/linux/mm.h:1847 [inline]
do_user_addr_fault+0x828/0x1250 arch/x86/mm/fault.c:1416
handle_page_fault arch/x86/mm/fault.c:1507 [inline]
exc_page_fault+0x51/0xb0 arch/x86/mm/fault.c:1560
asm_exc_page_fault+0x27/0x30 arch/x86/include/asm/idtentry.h:606
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_pcp_prepare mm/page_alloc.c:1544 [inline]
free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534
free_unref_page_list+0x13a/0x9d0 mm/page_alloc.c:3671
release_pages+0x1006/0x1060 mm/swap.c:1015
free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:320
tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:240 [inline]
tlb_flush_mmu mm/mmu_gather.c:247 [inline]
tlb_finish_mmu+0x17e/0x310 mm/mmu_gather.c:338
unmap_region+0x344/0x3b0 mm/mmap.c:2692
__do_munmap+0xa24/0x1020 mm/mmap.c:2925
__vm_munmap+0x163/0x2b0 mm/mmap.c:2978
__do_sys_munmap mm/mmap.c:3004 [inline]
__se_sys_munmap mm/mmap.c:3000 [inline]
__x64_sys_munmap+0x6b/0x80 mm/mmap.c:3000
x64_sys_call+0xc9/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:12
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
Memory state around the buggy address:
ffff88812983d780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88812983d800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff88812983d880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff88812983d900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff88812983d980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
EXT4-fs error (device loop6): __ext4_get_inode_loc:4365: comm kworker/u4:5: Invalid inode table block 6190460888929143715 in block_group 0
------------[ cut here ]------------
kernel BUG at fs/ext4/extents.c:3189!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 429 Comm: kworker/u4:5 Tainted: G B syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/18/2026
Workqueue: writeback wb_workfn (flush-7:6)
RIP: 0010:ext4_split_extent_at+0xe7f/0xea0 fs/ext4/extents.c:3189
Code: ff ff 44 89 f1 80 e1 07 fe c1 38 c1 0f 8c eb fb ff ff 4c 89 f7 49 89 f7 e8 be e3 d2 ff 4c 89 fe e9 d8 fb ff ff e8 01 ae 93 ff <0f> 0b e8 fa ad 93 ff 0f 0b e8 f3 ad 93 ff 0f 0b e8 ec ad 93 ff 0f
RSP: 0000:ffffc90000bd6aa0 EFLAGS: 00010293
RAX: ffffffff81d61d6f RBX: 0000000000000000 RCX: ffff888115940000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000bd6c20 R08: 0000000000000000 R09: 000000004000042b
R10: dffffc0000000000 R11: ffffed1022ba80aa R12: dffffc0000000000
R13: ffff888115d40500 R14: 0000000000000000 R15: 1ffff1102538faa5
FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f305e0ba000 CR3: 000000010d645000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
ext4_split_extent+0x363/0x4a0 fs/ext4/extents.c:3397
ext4_split_convert_extents fs/ext4/extents.c:3731 [inline]
ext4_ext_handle_unwritten_extents fs/ext4/extents.c:3892 [inline]
ext4_ext_map_blocks+0x2510/0x6230 fs/ext4/extents.c:4247
ext4_map_blocks+0x988/0x1b30 fs/ext4/inode.c:676
mpage_map_one_extent fs/ext4/inode.c:2423 [inline]
mpage_map_and_submit_extent fs/ext4/inode.c:2476 [inline]
ext4_writepages+0x123f/0x3090 fs/ext4/inode.c:2844
do_writepages+0x473/0x6c0 mm/page-writeback.c:2388
__writeback_single_inode+0xd5/0x9c0 fs/fs-writeback.c:1657
writeback_sb_inodes+0xa10/0x1610 fs/fs-writeback.c:1940
wb_writeback+0x40b/0x9d0 fs/fs-writeback.c:2116
wb_do_writeback fs/fs-writeback.c:2263 [inline]
wb_workfn+0x3ac/0xf30 fs/fs-writeback.c:2304
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 69ce11a3174cc9f7 ]---
RIP: 0010:ext4_split_extent_at+0xe7f/0xea0 fs/ext4/extents.c:3189
Code: ff ff 44 89 f1 80 e1 07 fe c1 38 c1 0f 8c eb fb ff ff 4c 89 f7 49 89 f7 e8 be e3 d2 ff 4c 89 fe e9 d8 fb ff ff e8 01 ae 93 ff <0f> 0b e8 fa ad 93 ff 0f 0b e8 f3 ad 93 ff 0f 0b e8 ec ad 93 ff 0f
RSP: 0000:ffffc90000bd6aa0 EFLAGS: 00010293
RAX: ffffffff81d61d6f RBX: 0000000000000000 RCX: ffff888115940000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000bd6c20 R08: 0000000000000000 R09: 000000004000042b
R10: dffffc0000000000 R11: ffffed1022ba80aa R12: dffffc0000000000
R13: ffff888115d40500 R14: 0000000000000000 R15: 1ffff1102538faa5
FS: 0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f305e0ba000 CR3: 000000010c88f000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400