================================================================== BUG: KASAN: use-after-free in ext4_read_inline_data fs/ext4/inline.c:209 [inline] BUG: KASAN: use-after-free in ext4_read_inline_dir+0x414/0xd00 fs/ext4/inline.c:1541 Read of size 68 at addr ffff88812a37c9cc by task syz.3.48/532 CPU: 1 PID: 532 Comm: syz.3.48 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: __dump_stack+0x21/0x24 lib/dump_stack.c:77 dump_stack_lvl+0x1a7/0x208 lib/dump_stack.c:118 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x100/0x140 mm/kasan/report.c:452 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x249/0x2a0 mm/kasan/generic.c:189 memcpy+0x2d/0x70 mm/kasan/shadow.c:65 ext4_read_inline_data fs/ext4/inline.c:209 [inline] ext4_read_inline_dir+0x414/0xd00 fs/ext4/inline.c:1541 ext4_readdir+0x3a0/0x3a80 fs/ext4/dir.c:161 iterate_dir+0x25c/0x560 fs/readdir.c:-1 __do_sys_getdents fs/readdir.c:286 [inline] __se_sys_getdents+0xf2/0x250 fs/readdir.c:271 __x64_sys_getdents+0x7b/0x90 fs/readdir.c:271 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fd871d7f159 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fd8707b7028 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007fd872007090 RCX: 00007fd871d7f159 RDX: 00000000000000b8 RSI: 0000200000001fc0 RDI: 0000000000000008 RBP: 00007fd871e1606b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd872007128 R14: 00007fd872007090 R15: 00007ffde90c08f8 The buggy address belongs to the page: page:ffffea0004a8df00 refcount:2 mapcount:1 mapping:ffff88812c33ad70 index:0x745 pfn:0x12a37c aops:shmem_aops ino:11 dentry name:"dev/zero" flags: 0x4000000000080016(referenced|uptodate|lru|swapbacked) raw: 4000000000080016 ffffea0004a8dec8 ffffea0004a8df48 ffff88812c33ad70 raw: 0000000000000745 0000000000000000 0000000200000000 ffff88810e896000 page dumped because: kasan: bad access detected page->mem_cgroup:ffff88810e896000 page_owner tracks the page as allocated page last allocated via order 0, migratetype Movable, gfp_mask 0x100cca(GFP_HIGHUSER_MOVABLE), pid 533, ts 29837504056, free_ts 29074618716 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x176/0x190 mm/page_alloc.c:2462 get_page_from_freelist+0x225f/0x23f0 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x29a/0x640 mm/page_alloc.c:5384 __alloc_pages include/linux/gfp.h:544 [inline] __alloc_pages_node include/linux/gfp.h:557 [inline] alloc_pages_node include/linux/gfp.h:571 [inline] alloc_pages include/linux/gfp.h:590 [inline] shmem_alloc_page+0x1fd/0x380 mm/shmem.c:1580 shmem_alloc_and_acct_page+0x3d3/0x840 mm/shmem.c:1605 shmem_getpage_gfp+0x785/0x20f0 mm/shmem.c:1918 shmem_fault+0x2b5/0x650 mm/shmem.c:2139 __do_fault mm/memory.c:4064 [inline] do_read_fault mm/memory.c:4408 [inline] do_fault mm/memory.c:4536 [inline] handle_pte_fault+0x2466/0x3910 mm/memory.c:4800 __handle_mm_fault mm/memory.c:4953 [inline] handle_mm_fault+0xf86/0x1720 mm/memory.c:5367 faultin_page mm/gup.c:902 [inline] __get_user_pages+0xbf8/0x1400 mm/gup.c:1121 populate_vma_page_range mm/gup.c:1454 [inline] __mm_populate+0x31c/0x420 mm/gup.c:1502 mm_populate include/linux/mm.h:2793 [inline] vm_mmap_pgoff+0x23b/0x350 mm/util.c:548 ksys_mmap_pgoff+0xfd/0x1e0 mm/mmap.c:1712 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:95 [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 do_syscall_64+0x31/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x61/0xcb page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] free_pcp_prepare mm/page_alloc.c:1421 [inline] free_unref_page_prepare+0x2b7/0x2d0 mm/page_alloc.c:3336 free_unref_page_list+0x129/0x9c0 mm/page_alloc.c:3443 release_pages+0xe41/0xe90 mm/swap.c:1103 free_pages_and_swap_cache+0x86/0xa0 mm/swap_state.c:356 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu+0xdf/0x190 mm/mmu_gather.c:247 zap_pte_range mm/memory.c:1385 [inline] zap_pmd_range mm/memory.c:1435 [inline] zap_pud_range mm/memory.c:1464 [inline] zap_p4d_range mm/memory.c:1485 [inline] unmap_page_range+0x1d82/0x2190 mm/memory.c:1506 unmap_single_vma mm/memory.c:1551 [inline] unmap_vmas+0x25f/0x360 mm/memory.c:1583 exit_mmap+0x309/0x590 mm/mmap.c:3385 __mmput+0x92/0x2d0 kernel/fork.c:1153 mmput+0x4e/0x150 kernel/fork.c:1176 exit_mm kernel/exit.c:546 [inline] do_exit+0x9d8/0x24e0 kernel/exit.c:866 do_group_exit+0x149/0x310 kernel/exit.c:993 get_signal+0xfb1/0x1300 kernel/signal.c:2802 arch_do_signal_or_restart+0xe7/0x11b0 arch/x86/kernel/signal.c:805 handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop+0xa2/0xe0 kernel/entry/common.c:169 exit_to_user_mode_prepare+0x76/0xa0 kernel/entry/common.c:199 Memory state around the buggy address: ffff88812a37c880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812a37c900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88812a37c980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff88812a37ca00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88812a37ca80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== EXT4-fs error (device loop3): ext4_read_inline_dir:1622: inode #12: block 5: comm syz.3.48: path /13/file0/file0: bad entry in directory: directory entry overrun - offset=24, inode=2829230728, rec_len=11816, size=148 fake=0 EXT4-fs error (device loop3) in ext4_do_update_inode:5362: error 27 EXT4-fs error (device loop3): ext4_dirty_inode:6181: inode #12: comm syz.3.48: mark_inode_dirty error