================================================================== BUG: KASAN: use-after-free in ext4_read_inline_data fs/ext4/inline.c:209 [inline] BUG: KASAN: use-after-free in ext4_inlinedir_to_tree+0x555/0x1160 fs/ext4/inline.c:1401 Read of size 68 at addr ffff88812286cec9 by task syz-executor.2/356 CPU: 1 PID: 356 Comm: syz-executor.2 Not tainted 5.10.226-syzkaller-1003431-ge5e5644ea27f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 kasan_check_range+0x293/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_inlinedir_to_tree+0x555/0x1160 fs/ext4/inline.c:1401 ext4_htree_fill_tree+0x5d1/0x13e0 fs/ext4/namei.c:1186 ext4_dx_readdir fs/ext4/dir.c:598 [inline] ext4_readdir+0x2dde/0x37c0 fs/ext4/dir.c:142 iterate_dir+0x265/0x580 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x1c1/0x460 fs/readdir.c:354 __x64_sys_getdents64+0x7b/0x90 fs/readdir.c:354 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb RIP: 0033:0x7fab7b8be363 Code: c1 66 0f 1f 44 00 00 48 83 c4 08 48 89 ef 5b 5d e9 62 8b fa ff 66 90 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 c7 c2 b0 ff ff ff f7 d8 RSP: 002b:00007ffdcc5941c8 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000055557c78e890 RCX: 00007fab7b8be363 RDX: 0000000000008000 RSI: 000055557c78e890 RDI: 0000000000000006 RBP: 000055557c78e864 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000293 R12: ffffffffffffffb0 R13: 0000000000000016 R14: 000055557c78e860 R15: 0000000000000008 The buggy address belongs to the page: page:ffffea00048a1b00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x12286c flags: 0x4000000000000000() raw: 4000000000000000 ffffea00048a1b48 ffffea00048a1ac8 0000000000000000 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffff88812286cd80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88812286ce00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88812286ce80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88812286cf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88812286cf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== EXT4-fs error (device loop2): ext4_inlinedir_to_tree:1439: inode #12: block 7: comm syz-executor.2: path /root/syzkaller-testdir97532496/syzkaller.JTs7IL/0/file0/file0: bad entry in directory: directory entry overrun - offset=34816, inode=2538880996, rec_len=34812, size=128 fake=0 EXT4-fs error (device loop2): empty_inline_dir:1835: inode #12: block 7: comm syz-executor.2: bad entry in directory: directory entry overrun - offset=4, inode=2538880996, rec_len=34812, size=60 fake=0 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs error (device loop2): ext4_inlinedir_to_tree:1439: inode #12: block 7: comm syz-executor.2: path /root/syzkaller-testdir97532496/syzkaller.JTs7IL/0/file0/file0: bad entry in directory: directory entry overrun - offset=34816, inode=2538880996, rec_len=34812, size=128 fake=0 EXT4-fs error (device loop2): empty_inline_dir:1835: inode #12: block 7: comm syz-executor.2: bad entry in directory: directory entry overrun - offset=4, inode=2538880996, rec_len=34812, size=60 fake=0 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs error (device loop2): ext4_inlinedir_to_tree:1439: inode #12: block 7: comm syz-executor.2: path /root/syzkaller-testdir97532496/syzkaller.JTs7IL/0/file0/file0: bad entry in directory: directory entry overrun - offset=34816, inode=2538880996, rec_len=34812, size=128 fake=0 EXT4-fs error (device loop2): empty_inline_dir:1835: inode #12: block 7: comm syz-executor.2: bad entry in directory: directory entry overrun - offset=4, inode=2538880996, rec_len=34812, size=60 fake=0 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs error (device loop2): ext4_inlinedir_to_tree:1439: inode #12: block 7: comm syz-executor.2: path /root/syzkaller-testdir97532496/syzkaller.JTs7IL/0/file0/file0: bad entry in directory: directory entry overrun - offset=34816, inode=2538880996, rec_len=34812, size=128 fake=0 EXT4-fs error (device loop2): empty_inline_dir:1835: inode #12: block 7: comm syz-executor.2: bad entry in directory: directory entry overrun - offset=4, inode=2538880996, rec_len=34812, size=60 fake=0 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs error (device loop2): ext4_inlinedir_to_tree:1439: inode #12: block 7: comm syz-executor.2: path /root/syzkaller-testdir97532496/syzkaller.JTs7IL/0/file0/file0: bad entry in directory: directory entry overrun - offset=34816, inode=2538880996, rec_len=34812, size=128 fake=0 EXT4-fs error (device loop2): empty_inline_dir:1835: inode #12: block 7: comm syz-executor.2: bad entry in directory: directory entry overrun - offset=4, inode=2538880996, rec_len=34812, size=60 fake=0 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60 EXT4-fs warning (device loop2): empty_inline_dir:1842: bad inline directory (dir #12) - inode 2538880996, rec_len 34812, name_len 234inline size 60