KASAN: use-after-free Read in ext4_inlinedir_to_tree

Status: upstream: reported C repro on 2026/01/25 06:15
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+6ff629dda3dd0ffdf059@syzkaller.appspotmail.com
First crash: 182d, last: 16d
Fix bisection: failed (error log, bisect log)
  
Bug presence (2)
Date Name Commit Repro Result
2026/01/25 lts (merge base) 8368be8a5072 C [report] KASAN: use-after-free Read in ext4_inlinedir_to_tree
2026/01/25 upstream (ToT) d91a46d6805a C [report] KASAN: use-after-free Read in ext4_inlinedir_to_tree
Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in ext4_inlinedir_to_tree ext4 19 C done error 6 205d 697d 0/29 upstream: reported C repro on 2024/08/28 22:55
android-6-1 KASAN: slab-out-of-bounds Read in ext4_inlinedir_to_tree origin:upstream 19 C error 4 48d 833d 0/2 upstream: reported C repro on 2024/04/14 08:35
android-5-10 KASAN: use-after-free Read in ext4_inlinedir_to_tree 19 C error 10 17d 833d 0/2 upstream: reported C repro on 2024/04/14 03:44
android-54 KASAN: slab-out-of-bounds Read in ext4_inlinedir_to_tree 17 C 1 469d 833d 0/2 upstream: reported C repro on 2024/04/14 03:10
upstream KMSAN: uninit-value in number (4) kernel 7 C 7189 1341d 1719d 0/29 closed as invalid on 2022/11/28 10:01
upstream KMSAN: uninit-value in ext4_inlinedir_to_tree ext4 7 C 267 772d 818d 27/29 fixed on 2024/08/14 03:44
upstream KMSAN: uninit-value in htree_dirblock_to_tree ext4 7 204 1169d 1300d 22/29 fixed on 2023/07/01 16:05
Last patch testing requests (4)
Created Duration User Patch Repo Result
2026/06/09 01:18 37m retest repro android13-5.15-lts log
2026/06/09 01:18 22m retest repro android13-5.15-lts log
2026/06/09 01:18 14m retest repro android13-5.15-lts log
2026/06/09 01:18 13m retest repro android13-5.15-lts log

Sample crash report:
EXT4-fs (loop2): 1 truncate cleaned up
EXT4-fs (loop2): mounted filesystem without journal. Opts: noload,max_dir_size_kb=0x0000000000000007,bsddf,nomblk_io_submit,data_err=ignore,usrjquota=,noblock_validity,,errors=continue. Quota mode: none.
==================================================================
BUG: KASAN: use-after-free in ext4_read_inline_data fs/ext4/inline.c:210 [inline]
BUG: KASAN: use-after-free in ext4_inlinedir_to_tree+0x4ff/0xfa0 fs/ext4/inline.c:1433
Read of size 68 at addr ffff888110bc2719 by task syz.2.17/373

CPU: 1 PID: 373 Comm: syz.2.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:427 [inline]
 kasan_report+0x10f/0x150 mm/kasan/report.c:444
 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:210 [inline]
 ext4_inlinedir_to_tree+0x4ff/0xfa0 fs/ext4/inline.c:1433
 ext4_htree_fill_tree+0x516/0x10f0 fs/ext4/namei.c:1211
 ext4_dx_readdir fs/ext4/dir.c:609 [inline]
 ext4_readdir+0x2c5f/0x3aa0 fs/ext4/dir.c:145
 iterate_dir+0x25c/0x600 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
 x64_sys_call+0xb4/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:79
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fca87fe8e59
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:00007ffdf01c7508 EFLAGS: 00000246 ORIG_RAX: 000000000000004e
RAX: ffffffffffffffda RBX: 00007fca88270fa0 RCX: 00007fca87fe8e59
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007fca8807ee6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fca88270fac R14: 00007fca88270fa0 R15: 00007fca88270fa0
 </TASK>

Allocated by task 111:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:433 [inline]
 __kasan_slab_alloc+0xb7/0xe0 mm/kasan/common.c:466
 kasan_slab_alloc include/linux/kasan.h:217 [inline]
 slab_post_alloc_hook+0x4f/0x2b0 mm/slab.h:550
 slab_alloc_node mm/slub.c:3245 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 kmem_cache_alloc+0xf7/0x260 mm/slub.c:3260
 kmem_cache_alloc_node include/linux/slab.h:492 [inline]
 __alloc_skb+0xe4/0x730 net/core/skbuff.c:416
 alloc_skb include/linux/skbuff.h:1183 [inline]
 netlink_alloc_large_skb net/netlink/af_netlink.c:1186 [inline]
 netlink_sendmsg+0x611/0xb80 net/netlink/af_netlink.c:1897
 sock_sendmsg_nosec net/socket.c:704 [inline]
 __sock_sendmsg net/socket.c:716 [inline]
 ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2435
 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2489
 __sys_sendmsg net/socket.c:2518 [inline]
 __do_sys_sendmsg net/socket.c:2527 [inline]
 __se_sys_sendmsg net/socket.c:2525 [inline]
 __x64_sys_sendmsg+0x201/0x2d0 net/socket.c:2525
 x64_sys_call+0x4b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff888110bc2640
 which belongs to the cache skbuff_head_cache of size 248
The buggy address is located 217 bytes inside of
 248-byte region [ffff888110bc2640, ffff888110bc2738)
The buggy address belongs to the page:
page:ffffea000442f080 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888110bc28c0 pfn:0x110bc2
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 ffffea000442f000 0000000300000003 ffff8881081aa000
raw: ffff888110bc28c0 00000000800c0000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 111, ts 4203851622, free_ts 0
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2613
 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487
 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1937 [inline]
 new_slab+0xa0/0x4d0 mm/slub.c:2000
 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033
 __slab_alloc+0x49/0x90 mm/slub.c:3120
 slab_alloc_node mm/slub.c:3211 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 kmem_cache_alloc+0x138/0x260 mm/slub.c:3260
 kmem_cache_alloc_node include/linux/slab.h:492 [inline]
 __alloc_skb+0xe4/0x730 net/core/skbuff.c:416
 alloc_skb include/linux/skbuff.h:1183 [inline]
 netlink_alloc_large_skb net/netlink/af_netlink.c:1186 [inline]
 netlink_sendmsg+0x611/0xb80 net/netlink/af_netlink.c:1897
 sock_sendmsg_nosec net/socket.c:704 [inline]
 __sock_sendmsg net/socket.c:716 [inline]
 ____sys_sendmsg+0x5be/0x8f0 net/socket.c:2435
 ___sys_sendmsg+0x236/0x2e0 net/socket.c:2489
 __sys_sendmsg net/socket.c:2518 [inline]
 __do_sys_sendmsg net/socket.c:2527 [inline]
 __se_sys_sendmsg net/socket.c:2525 [inline]
 __x64_sys_sendmsg+0x201/0x2d0 net/socket.c:2525
 x64_sys_call+0x4b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888110bc2600: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
 ffff888110bc2680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888110bc2700: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc
                            ^
 ffff888110bc2780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888110bc2800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc
==================================================================
EXT4-fs error (device loop2): ext4_inlinedir_to_tree:1471: inode #12: block 7: comm syz.2.17: path /0/file0/file0: bad entry in directory: rec_len % 4 != 0 - offset=35245, inode=1221132332, rec_len=35241, size=128 fake=0

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/10 12:32 android13-5.15-lts 7e958e2b7c41 4167ee25 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-android-5-15 KASAN: use-after-free Read in ext4_inlinedir_to_tree
2026/01/25 06:41 android13-5.15-lts 00b50d06692d 40acda8a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (corrupt fs)] [mounted in repro #2 (corrupt fs)] ci2-android-5-15 KASAN: use-after-free Read in ext4_inlinedir_to_tree
2026/01/25 07:09 android13-5.15-lts 00b50d06692d 40acda8a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (corrupt fs)] [mounted in repro #2 (corrupt fs)] ci2-android-5-15 KASAN: slab-out-of-bounds Read in ext4_inlinedir_to_tree
2026/01/25 06:12 android13-5.15-lts 00b50d06692d 40acda8a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro #1 (corrupt fs)] [mounted in repro #2 (corrupt fs)] ci2-android-5-15 KASAN: slab-out-of-bounds Read in ext4_inlinedir_to_tree
2026/05/20 17:20 android13-5.15-lts 05eea940894a 62fb93a2 .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1 (corrupt fs)] [mounted in repro #2 (corrupt fs)] ci2-android-5-15 KASAN: use-after-free Read in ext4_inlinedir_to_tree
2026/02/01 03:25 android13-5.15-lts 7e1070528954 6b8752f2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_inlinedir_to_tree
2026/02/01 03:24 android13-5.15-lts 7e1070528954 6b8752f2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_inlinedir_to_tree
2026/01/25 05:46 android13-5.15-lts 00b50d06692d 40acda8a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in ext4_inlinedir_to_tree
* Struck through repros no longer work on HEAD.