================================================================== BUG: KASAN: use-after-free in dtMoveEntry fs/jfs/jfs_dtree.c:3922 [inline] BUG: KASAN: use-after-free in dtSplitPage+0x1aba/0x31d0 fs/jfs/jfs_dtree.c:1561 Write of size 1 at addr ffff8880285eb000 by task syz.1.35/4517 CPU: 1 PID: 4517 Comm: syz.1.35 Not tainted 6.1.138-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025 Call Trace: dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106 print_address_description mm/kasan/report.c:316 [inline] print_report+0xa8/0x220 mm/kasan/report.c:427 kasan_report+0x10b/0x140 mm/kasan/report.c:531 dtMoveEntry fs/jfs/jfs_dtree.c:3922 [inline] dtSplitPage+0x1aba/0x31d0 fs/jfs/jfs_dtree.c:1561 dtSplitUp fs/jfs/jfs_dtree.c:1092 [inline] dtInsert+0xfbd/0x58a0 fs/jfs/jfs_dtree.c:871 jfs_create+0x69d/0xa50 fs/jfs/namei.c:137 lookup_open fs/namei.c:3482 [inline] open_last_lookups fs/namei.c:3550 [inline] path_openat+0x1187/0x2e70 fs/namei.c:3780 do_filp_open+0x1c1/0x3c0 fs/namei.c:3810 do_sys_openat2+0x142/0x490 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_creat fs/open.c:1412 [inline] __se_sys_creat fs/open.c:1406 [inline] __x64_sys_creat+0x8c/0xb0 fs/open.c:1406 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fafcb58e969 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fafcc316038 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 00007fafcb7b6080 RCX: 00007fafcb58e969 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00002000000006c0 RBP: 00007fafcb610ab1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fafcb7b6080 R15: 00007ffd1774bba8 The buggy address belongs to the physical page: page:ffffea0000a17ac0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x285eb flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001f38a88 ffff8880b8f41210 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 1, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4024, tgid 4024 (rm), ts 46255101656, free_ts 96850569107 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532 prep_new_page mm/page_alloc.c:2539 [inline] get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328 __alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5606 alloc_slab_page+0x5d/0x160 mm/slub.c:1794 allocate_slab mm/slub.c:1939 [inline] new_slab+0x87/0x2c0 mm/slub.c:1992 ___slab_alloc+0xbc6/0x1220 mm/slub.c:3180 kmem_cache_alloc_bulk+0x1a3/0x4e0 mm/slub.c:3830 mt_alloc_bulk lib/maple_tree.c:157 [inline] mas_alloc_nodes+0x449/0x890 lib/maple_tree.c:1299 mas_node_count_gfp lib/maple_tree.c:1359 [inline] mas_preallocate+0x11e/0x340 lib/maple_tree.c:5805 __mmap_region mm/mmap.c:2753 [inline] mmap_region+0xec3/0x1d30 mm/mmap.c:2904 do_mmap+0x894/0xf30 mm/mmap.c:1424 vm_mmap_pgoff+0x1b2/0x2b0 mm/util.c:520 ksys_mmap_pgoff+0x516/0x6f0 mm/mmap.c:1470 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1459 [inline] free_pcp_prepare mm/page_alloc.c:1509 [inline] free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294 ____kasan_kmalloc mm/kasan/common.c:340 [inline] __kasan_kmalloc+0x1e/0xa0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slab_common.c:936 [inline] __kmalloc+0xb0/0x240 mm/slab_common.c:949 kmalloc_array include/linux/slab.h:615 [inline] kcalloc include/linux/slab.h:646 [inline] ext4_find_extent+0x367/0xe00 fs/ext4/extents.c:914 ext4_ext_map_blocks+0x27d/0x66d0 fs/ext4/extents.c:4165 ext4_map_blocks+0x9d1/0x1b60 fs/ext4/inode.c:679 ext4_convert_unwritten_extents+0x2a2/0x5c0 fs/ext4/extents.c:4864 ext4_convert_unwritten_io_end_vec+0xfb/0x170 fs/ext4/extents.c:4903 ext4_end_io_end fs/ext4/page-io.c:186 [inline] ext4_do_flush_completed_IO fs/ext4/page-io.c:259 [inline] ext4_end_io_rsv_work+0x2b9/0x600 fs/ext4/page-io.c:273 process_one_work+0x898/0x1160 kernel/workqueue.c:2292 worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439 kthread+0x29d/0x330 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff8880285eaf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8880285eaf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880285eb000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880285eb080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880285eb100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================