==================================================================
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 ffff888125796eec by task kworker/u4:22/32252
CPU: 0 PID: 32252 Comm: kworker/u4:22 Tainted: G W 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:4)
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:ffffea000495e580 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x125796
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 ffffea00048d4b48 ffffea00049648c8 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 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 26584, ts 1579277910577, free_ts 2083712811083
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
vm_area_alloc_pages mm/vmalloc.c:-1 [inline]
__vmalloc_area_node mm/vmalloc.c:2974 [inline]
__vmalloc_node_range+0x505/0xaf0 mm/vmalloc.c:3140
vmalloc_user+0x73/0x80 mm/vmalloc.c:3291
kcov_mmap+0x2b/0x130 kernel/kcov.c:474
call_mmap include/linux/fs.h:2217 [inline]
mmap_file+0x60/0xb0 mm/util.c:1099
__mmap_region mm/mmap.c:1804 [inline]
mmap_region+0xf94/0x1800 mm/mmap.c:2955
do_mmap+0x76c/0xe40 mm/mmap.c:1594
vm_mmap_pgoff+0x1ce/0x410 mm/util.c:555
ksys_mmap_pgoff+0x161/0x1d0 mm/mmap.c:1643
__do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline]
__se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline]
__x64_sys_mmap+0xfa/0x110 arch/x86/kernel/sys_x86_64.c:86
x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:10
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_pcp_prepare mm/page_alloc.c:1544 [inline]
free_unref_page_prepare+0x542/0x550 mm/page_alloc.c:3534
free_unref_page+0xa2/0x550 mm/page_alloc.c:3616
free_the_page mm/page_alloc.c:805 [inline]
__free_pages+0x6c/0x100 mm/page_alloc.c:5871
__vunmap+0x84d/0x9e0 mm/vmalloc.c:2653
__vfree mm/vmalloc.c:2702 [inline]
vfree+0x8b/0xc0 mm/vmalloc.c:2733
kcov_put kernel/kcov.c:417 [inline]
kcov_close+0x2b/0x50 kernel/kcov.c:519
__fput+0x20b/0x8b0 fs/file_table.c:311
____fput+0x15/0x20 fs/file_table.c:339
task_work_run+0x127/0x190 kernel/task_work.c:188
exit_task_work include/linux/task_work.h:33 [inline]
do_exit+0xa7e/0x27a0 kernel/exit.c:889
do_group_exit+0x141/0x310 kernel/exit.c:1003
get_signal+0x66a/0x1480 kernel/signal.c:2907
arch_do_signal_or_restart+0xc1/0x10f0 arch/x86/kernel/signal.c:867
handle_signal_work kernel/entry/common.c:154 [inline]
exit_to_user_mode_loop+0xa7/0xe0 kernel/entry/common.c:178
exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:214
__syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307
Memory state around the buggy address:
ffff888125796d80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888125796e00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888125796e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff888125796f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff888125796f80: 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: 32252 Comm: kworker/u4:22 Tainted: G B W 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:4)
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:ffffc9000107f100 EFLAGS: 00010293
RAX: ffffffff81d929ad RBX: ffff888111ab8d08 RCX: ffff888117500000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000107f470 R08: dffffc0000000000 R09: ffffed102235719a
R10: ffffed102235719a R11: 1ffff11022357199 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: 0000000000000000 CR3: 000000010d2b9000 CR4: 00000000003506b0
DR0: 000000000000b2d1 DR1: 0010000000000000 DR2: 0001000000000004
DR3: 0000000000000002 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 42a7ac5b959b7820 ]---
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:ffffc9000107f100 EFLAGS: 00010293
RAX: ffffffff81d929ad RBX: ffff888111ab8d08 RCX: ffff888117500000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000107f470 R08: dffffc0000000000 R09: ffffed102235719a
R10: ffffed102235719a R11: 1ffff11022357199 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: 00007fb4a6d2ef98 CR3: 000000011dc6b000 CR4: 00000000003506b0
DR0: 000000000000b2d1 DR1: 0010000000000000 DR2: 0001000000000004
DR3: 0000000000000002 DR6: 00000000fffe0ff0 DR7: 0000000000000400