================================================================== BUG: KASAN: use-after-free in ext4_read_inline_data fs/ext4/inline.c:199 [inline] BUG: KASAN: use-after-free in ext4_convert_inline_data_nolock+0x31a/0xd80 fs/ext4/inline.c:1204 Read of size 20 at addr ffff888086aba1a3 by task syz-executor.3/7682 CPU: 1 PID: 7682 Comm: syz-executor.3 Not tainted 6.3.0-rc5-syzkaller-00032-g99ddf2254feb #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+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:319 [inline] print_report+0x163/0x540 mm/kasan/report.c:430 kasan_report+0x176/0x1b0 mm/kasan/report.c:536 kasan_check_range+0x283/0x290 mm/kasan/generic.c:187 __asan_memcpy+0x29/0x70 mm/kasan/shadow.c:105 ext4_read_inline_data fs/ext4/inline.c:199 [inline] ext4_convert_inline_data_nolock+0x31a/0xd80 fs/ext4/inline.c:1204 ext4_convert_inline_data+0x4da/0x620 fs/ext4/inline.c:2065 ext4_fallocate+0x14d/0x2050 fs/ext4/extents.c:4701 vfs_fallocate+0x54b/0x6b0 fs/open.c:324 ksys_fallocate fs/open.c:347 [inline] __do_sys_fallocate fs/open.c:355 [inline] __se_sys_fallocate fs/open.c:353 [inline] __x64_sys_fallocate+0xbd/0x100 fs/open.c:353 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f7727e8c169 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:00007f7728be5168 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f7727fabf80 RCX: 00007f7727e8c169 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f7727ee7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000008000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd4b82646f R14: 00007f7728be5300 R15: 0000000000022000 The buggy address belongs to the physical page: page:ffffea00021aae80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x86aba flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 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 4, migratetype Unmovable, gfp_mask 0x146dc0(GFP_USER|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP|__GFP_ZERO), pid 10435, tgid 10433 (syz-executor.3), ts 414445950170, free_ts 415579992589 prep_new_page mm/page_alloc.c:2553 [inline] get_page_from_freelist+0x3246/0x33c0 mm/page_alloc.c:4326 __alloc_pages+0x255/0x670 mm/page_alloc.c:5592 __alloc_pages_node include/linux/gfp.h:237 [inline] alloc_pages_node include/linux/gfp.h:260 [inline] __kmalloc_large_node+0x91/0x1d0 mm/slab_common.c:1112 __do_kmalloc_node mm/slab_common.c:955 [inline] __kmalloc_node+0x116/0x230 mm/slab_common.c:974 kmalloc_node include/linux/slab.h:610 [inline] kvmalloc_node+0x72/0x180 mm/util.c:603 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] xlog_alloc_log+0x638/0x13a0 fs/xfs/xfs_log.c:1649 xfs_log_mount+0xe7/0x770 fs/xfs/xfs_log.c:658 xfs_mountfs+0xcbf/0x1f10 fs/xfs/xfs_mount.c:819 xfs_fs_fill_super+0xf94/0x11e0 fs/xfs/xfs_super.c:1677 get_tree_bdev+0x402/0x620 fs/super.c:1303 vfs_get_tree+0x8c/0x270 fs/super.c:1510 do_new_mount+0x28f/0xae0 fs/namespace.c:3042 do_mount fs/namespace.c:3385 [inline] __do_sys_mount fs/namespace.c:3594 [inline] __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3571 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1454 [inline] __free_pages_ok+0xc3d/0xc70 mm/page_alloc.c:1710 free_large_kmalloc+0xff/0x190 mm/slab_common.c:944 kmem_free fs/xfs/kmem.h:62 [inline] xlog_dealloc_log+0xc5/0x1a0 fs/xfs/xfs_log.c:2153 xfs_unmountfs+0x1d6/0x280 fs/xfs/xfs_mount.c:1096 xfs_fs_put_super+0x74/0x2d0 fs/xfs/xfs_super.c:1126 generic_shutdown_super+0x134/0x340 fs/super.c:500 kill_block_super+0x7e/0xe0 fs/super.c:1407 deactivate_locked_super+0xa4/0x110 fs/super.c:331 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1177 task_work_run+0x24a/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff888086aba080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888086aba100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888086aba180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888086aba200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888086aba280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================