================================================================== BUG: KASAN: use-after-free in ext4_read_inline_data fs/ext4/inline.c:200 [inline] BUG: KASAN: use-after-free in ext4_convert_inline_data_nolock+0x319/0xda0 fs/ext4/inline.c:1205 Read of size 20 at addr ffff88807a5a81a3 by task syz-executor.0/15401 CPU: 1 PID: 15401 Comm: syz-executor.0 Not tainted 6.1.24-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 kasan_check_range+0x27f/0x290 mm/kasan/generic.c:189 memcpy+0x25/0x60 mm/kasan/shadow.c:65 ext4_read_inline_data fs/ext4/inline.c:200 [inline] ext4_convert_inline_data_nolock+0x319/0xda0 fs/ext4/inline.c:1205 ext4_convert_inline_data+0x4cf/0x610 fs/ext4/inline.c:2066 ext4_fallocate+0x149/0x2160 fs/ext4/extents.c:4702 vfs_fallocate+0x547/0x6b0 fs/open.c:323 ksys_fallocate fs/open.c:346 [inline] __do_sys_fallocate fs/open.c:354 [inline] __se_sys_fallocate fs/open.c:352 [inline] __x64_sys_fallocate+0xb9/0x100 fs/open.c:352 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+0x63/0xcd RIP: 0033:0x7fc41808c169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc418dbd168 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007fc4181ac050 RCX: 00007fc41808c169 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fc4180e7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000008000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffeee318e7f R14: 00007fc418dbd300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea0001e96a00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a5a8 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea000079d708 ffffea0001d36ec8 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 0x100cc0(GFP_USER), pid 2, tgid 2 (kthreadd), ts 543524215802, free_ts 558698489427 prep_new_page mm/page_alloc.c:2540 [inline] get_page_from_freelist+0x32ed/0x3480 mm/page_alloc.c:4292 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5559 __get_free_pages+0x8/0x30 mm/page_alloc.c:5609 kasan_populate_vmalloc_pte+0x2a/0xd0 mm/kasan/shadow.c:271 apply_to_pte_range mm/memory.c:2635 [inline] apply_to_pmd_range mm/memory.c:2679 [inline] apply_to_pud_range mm/memory.c:2715 [inline] apply_to_p4d_range mm/memory.c:2751 [inline] __apply_to_page_range+0x9c5/0xcc0 mm/memory.c:2785 alloc_vmap_area+0x1977/0x1ac0 mm/vmalloc.c:1642 __get_vm_area_node+0x16c/0x360 mm/vmalloc.c:2501 __vmalloc_node_range+0x394/0x1460 mm/vmalloc.c:3175 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct+0x3e5/0x6d0 kernel/fork.c:980 copy_process+0x637/0x4020 kernel/fork.c:2090 kernel_clone+0x222/0x920 kernel/fork.c:2679 kernel_thread+0x152/0x1d0 kernel/fork.c:2739 create_kthread kernel/kthread.c:399 [inline] kthreadd+0x577/0x740 kernel/kthread.c:746 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1460 [inline] free_pcp_prepare mm/page_alloc.c:1510 [inline] free_unref_page_prepare+0xf5e/0x1110 mm/page_alloc.c:3388 free_unref_page+0x98/0x570 mm/page_alloc.c:3484 kasan_depopulate_vmalloc_pte+0x66/0x80 mm/kasan/shadow.c:375 apply_to_pte_range mm/memory.c:2635 [inline] apply_to_pmd_range mm/memory.c:2679 [inline] apply_to_pud_range mm/memory.c:2715 [inline] apply_to_p4d_range mm/memory.c:2751 [inline] __apply_to_page_range+0x9c5/0xcc0 mm/memory.c:2785 kasan_release_vmalloc+0x96/0xb0 mm/kasan/shadow.c:492 __purge_vmap_area_lazy+0x157c/0x1720 mm/vmalloc.c:1770 drain_vmap_area_work+0x3c/0xd0 mm/vmalloc.c:1799 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436 kthread+0x268/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Memory state around the buggy address: ffff88807a5a8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807a5a8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88807a5a8180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88807a5a8200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88807a5a8280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================