==================================================================
BUG: KASAN: use-after-free in vma_pages include/linux/mm.h:2827 [inline]
BUG: KASAN: use-after-free in vma_last_pgoff mm/interval_tree.c:20 [inline]
BUG: KASAN: use-after-free in vma_interval_tree_augment_compute_max mm/interval_tree.c:23 [inline]
BUG: KASAN: use-after-free in vma_interval_tree_augment_rotate+0xab/0x1d0 mm/interval_tree.c:23
Read of size 8 at addr ffff8881bfffffb0 by task syz-executor.2/30630
CPU: 0 PID: 30630 Comm: syz-executor.2 Tainted: G W 5.15.148-syzkaller-00718-g993bed180178 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
print_address_description+0x87/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:427 [inline]
kasan_report+0x179/0x1c0 mm/kasan/report.c:444
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
vma_pages include/linux/mm.h:2827 [inline]
vma_last_pgoff mm/interval_tree.c:20 [inline]
vma_interval_tree_augment_compute_max mm/interval_tree.c:23 [inline]
vma_interval_tree_augment_rotate+0xab/0x1d0 mm/interval_tree.c:23
__rb_insert_augmented+0x5de/0x610 lib/rbtree.c:459
rb_insert_augmented include/linux/rbtree_augmented.h:50 [inline]
vma_interval_tree_insert_after+0x2be/0x2d0 mm/interval_tree.c:57
dup_mmap kernel/fork.c:631 [inline]
dup_mm kernel/fork.c:1521 [inline]
copy_mm+0xba2/0x13e0 kernel/fork.c:1573
copy_process+0x1149/0x3290 kernel/fork.c:2264
kernel_clone+0x21e/0x9e0 kernel/fork.c:2662
__do_sys_clone kernel/fork.c:2788 [inline]
__se_sys_clone kernel/fork.c:2772 [inline]
__x64_sys_clone+0x23f/0x290 kernel/fork.c:2772
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7ff5c553ada9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff5c42bc078 EFLAGS: 00000206 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007ff5c5668f80 RCX: 00007ff5c553ada9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000a000000
RBP: 00007ff5c42bc120 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000002
R13: 000000000000000b R14: 00007ff5c5668f80 R15: 00007ffc5d693a68
The buggy address belongs to the page:
page:ffffea0006ffffc0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x200 pfn:0x1bffff
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000200 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Reclaimable, gfp_mask 0x112c50(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 28953, ts 1733676132486, free_ts 1746671737565
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1a3/0x1b0 mm/page_alloc.c:2604
prep_new_page+0x1b/0x110 mm/page_alloc.c:2610
get_page_from_freelist+0x3550/0x35d0 mm/page_alloc.c:4484
__alloc_pages+0x27e/0x8f0 mm/page_alloc.c:5776
allocate_slab mm/slub.c:1932 [inline]
new_slab+0x9a/0x4e0 mm/slub.c:1995
___slab_alloc+0x39e/0x830 mm/slub.c:3028
__slab_alloc+0x4a/0x90 mm/slub.c:3115
slab_alloc_node mm/slub.c:3206 [inline]
slab_alloc mm/slub.c:3248 [inline]
kmem_cache_alloc+0x134/0x200 mm/slub.c:3253
kmem_cache_zalloc include/linux/slab.h:723 [inline]
jbd2_alloc_handle include/linux/jbd2.h:1597 [inline]
new_handle fs/jbd2/transaction.c:477 [inline]
jbd2__journal_start+0x150/0x710 fs/jbd2/transaction.c:504
__ext4_journal_start_sb+0xfa/0x2c0 fs/ext4/ext4_jbd2.c:105
__ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline]
ext4_dirty_inode+0x8f/0x100 fs/ext4/inode.c:6021
__mark_inode_dirty+0x200/0xa50 fs/fs-writeback.c:2464
mark_inode_dirty include/linux/fs.h:2497 [inline]
generic_write_end+0x202/0x300 fs/buffer.c:2204
ext4_da_write_end+0x6dc/0xab0 fs/ext4/inode.c:3108
generic_perform_write+0x3b4/0x5a0 mm/filemap.c:3854
ext4_buffered_write_iter+0x48a/0x610 fs/ext4/file.c:270
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1471 [inline]
free_pcp_prepare mm/page_alloc.c:1543 [inline]
free_unref_page_prepare+0x7c8/0x7d0 mm/page_alloc.c:3533
free_unref_page+0xe8/0x750 mm/page_alloc.c:3615
free_the_page mm/page_alloc.c:804 [inline]
__free_pages+0x61/0xf0 mm/page_alloc.c:5852
__free_slab+0xec/0x1d0 mm/slub.c:2020
free_slab mm/slub.c:2035 [inline]
discard_slab mm/slub.c:2041 [inline]
__unfreeze_partials+0x165/0x1a0 mm/slub.c:2527
put_cpu_partial+0xc4/0x120 mm/slub.c:2607
__slab_free+0x1c8/0x290 mm/slub.c:3388
do_slab_free mm/slub.c:3507 [inline]
___cache_free+0x109/0x120 mm/slub.c:3526
qlink_free+0x4d/0x90 mm/kasan/quarantine.c:157
qlist_free_all+0x44/0xb0 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x15a/0x180 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:443
kasan_slab_alloc include/linux/kasan.h:217 [inline]
slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:550
slab_alloc_node mm/slub.c:3240 [inline]
slab_alloc mm/slub.c:3248 [inline]
kmem_cache_alloc+0xf5/0x200 mm/slub.c:3253
kmem_cache_zalloc include/linux/slab.h:723 [inline]
jbd2_alloc_handle include/linux/jbd2.h:1597 [inline]
new_handle fs/jbd2/transaction.c:477 [inline]
jbd2__journal_start+0x150/0x710 fs/jbd2/transaction.c:504
__ext4_journal_start_sb+0xfa/0x2c0 fs/ext4/ext4_jbd2.c:105
Memory state around the buggy address:
ffff8881bffffe80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff8881bfffff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881bfffff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff8881c0000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881c0000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
FAULT_INJECTION: forcing a failure.
name fail_page_alloc, interval 1, probability 0, space 0, times 0
CPU: 0 PID: 30630 Comm: syz-executor.2 Tainted: G B W 5.15.148-syzkaller-00718-g993bed180178 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
dump_stack+0x15/0x17 lib/dump_stack.c:113
fail_dump lib/fault-inject.c:52 [inline]
should_fail+0x3c6/0x510 lib/fault-inject.c:146
__should_fail_alloc_page mm/page_alloc.c:4093 [inline]
should_fail_alloc_page+0x5a/0x80 mm/page_alloc.c:4130
prepare_alloc_pages+0x15c/0x700 mm/page_alloc.c:5547
__alloc_pages+0x18c/0x8f0 mm/page_alloc.c:5765
__alloc_pages_node include/linux/gfp.h:591 [inline]
alloc_pages_node include/linux/gfp.h:605 [inline]
alloc_pages include/linux/gfp.h:618 [inline]
__pte_alloc_one include/asm-generic/pgalloc.h:63 [inline]
pte_alloc_one+0x73/0x1b0 arch/x86/mm/pgtable.c:33
__pte_alloc+0x86/0x350 mm/memory.c:498
copy_pte_range mm/memory.c:1080 [inline]
copy_pmd_range mm/memory.c:1215 [inline]
copy_pud_range mm/memory.c:1252 [inline]
copy_p4d_range mm/memory.c:1276 [inline]
copy_page_range+0x28a8/0x2f90 mm/memory.c:1349
dup_mmap kernel/fork.c:659 [inline]
dup_mm kernel/fork.c:1521 [inline]
copy_mm+0xc7e/0x13e0 kernel/fork.c:1573
copy_process+0x1149/0x3290 kernel/fork.c:2264
kernel_clone+0x21e/0x9e0 kernel/fork.c:2662
__do_sys_clone kernel/fork.c:2788 [inline]
__se_sys_clone kernel/fork.c:2772 [inline]
__x64_sys_clone+0x23f/0x290 kernel/fork.c:2772
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7ff5c553ada9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff5c42bc078 EFLAGS: 00000206 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007ff5c5668f80 RCX: 00007ff5c553ada9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000a000000
RBP: 00007ff5c42bc120 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000002
R13: 000000000000000b R14: 00007ff5c5668f80 R15: 00007ffc5d693a68