syzbot


KASAN: slab-use-after-free Read in __ext4_iget

Status: upstream: reported on 2025/08/15 02:29
Reported-by: syzbot+a08013e80f8d0b18d42b@syzkaller.appspotmail.com
First crash: 10d, last: 3d23h
Similar bugs (11)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-use-after-free Read in __ext4_iget fs reiserfs 19 278 572d 810d 0/29 auto-obsoleted due to no activity on 2024/04/09 13:42
linux-6.1 KASAN: use-after-free Read in __ext4_iget 19 2 347d 389d 0/3 auto-obsoleted due to no activity on 2024/12/21 07:26
android-54 KASAN: use-after-free Read in __ext4_iget (3) 19 C 58 91d 164d 0/2 upstream: reported C repro on 2025/03/13 17:21
linux-5.15 KASAN: use-after-free Read in __ext4_iget 19 42 10d 572d 0/3 upstream: reported on 2024/01/31 03:06
linux-6.1 KASAN: slab-out-of-bounds Read in __ext4_iget (2) 19 18 3d23h 204d 0/3 upstream: reported on 2025/02/01 20:39
android-5-15 KASAN: use-after-free Read in __ext4_iget origin:lts 19 C 439 15h58m 145d 0/2 upstream: reported C repro on 2025/04/01 19:00
linux-5.15 KASAN: slab-out-of-bounds Read in __ext4_iget 19 6 677d 720d 0/3 auto-obsoleted due to no activity on 2024/01/25 22:09
android-54 KASAN: use-after-free Read in __ext4_iget 19 13 549d 756d 0/2 auto-obsoleted due to no activity on 2024/05/22 19:07
android-5-10 KASAN: use-after-free Read in __ext4_iget 19 C 384 1d04h 169d 0/2 upstream: reported C repro on 2025/03/08 14:28
android-54 KASAN: use-after-free Read in __ext4_iget (2) 19 4 432d 450d 0/2 auto-obsoleted due to no activity on 2024/09/17 10:19
linux-6.1 KASAN: slab-out-of-bounds Read in __ext4_iget 19 14 511d 767d 0/3 auto-obsoleted due to no activity on 2024/07/09 19:10

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in check_igot_inode fs/ext4/inode.c:-1 [inline]
BUG: KASAN: slab-use-after-free in __ext4_iget+0x2bd/0x3e70 fs/ext4/inode.c:4832
Read of size 8 at addr ffff88805da299b0 by task syz.3.4548/16382

CPU: 0 PID: 16382 Comm: syz.3.4548 Not tainted 6.6.102-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:364 [inline]
 print_report+0xac/0x220 mm/kasan/report.c:468
 kasan_report+0x117/0x150 mm/kasan/report.c:581
 check_igot_inode fs/ext4/inode.c:-1 [inline]
 __ext4_iget+0x2bd/0x3e70 fs/ext4/inode.c:4832
 __ext4_fill_super fs/ext4/super.c:5502 [inline]
 ext4_fill_super+0x4a79/0x6620 fs/ext4/super.c:5729
 get_tree_bdev+0x3e4/0x510 fs/super.c:1591
 vfs_get_tree+0x8c/0x280 fs/super.c:1764
 do_new_mount+0x24b/0xa40 fs/namespace.c:3371
 do_mount fs/namespace.c:3711 [inline]
 __do_sys_mount fs/namespace.c:3920 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3897
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f26a319038a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f26a4002e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f26a4002ef0 RCX: 00007f26a319038a
RDX: 00002000000005c0 RSI: 0000200000000000 RDI: 00007f26a4002eb0
RBP: 00002000000005c0 R08: 00007f26a4002ef0 R09: 000000000020081f
R10: 000000000020081f R11: 0000000000000246 R12: 0000200000000000
R13: 00007f26a4002eb0 R14: 0000000000000540 R15: 0000200000000600
 </TASK>

Allocated by task 11695:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4e/0x70 mm/kasan/common.c:52
 __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:328
 kasan_slab_alloc include/linux/kasan.h:188 [inline]
 slab_post_alloc_hook+0x6e/0x4d0 mm/slab.h:767
 slab_alloc_node mm/slub.c:3485 [inline]
 slab_alloc mm/slub.c:3493 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3500 [inline]
 kmem_cache_alloc_lru+0x115/0x2e0 mm/slub.c:3516
 alloc_inode_sb include/linux/fs.h:2946 [inline]
 reiserfs_alloc_inode+0x2a/0xc0 fs/reiserfs/super.c:642
 alloc_inode fs/inode.c:261 [inline]
 iget5_locked+0xa2/0x260 fs/inode.c:1314
 reiserfs_fill_super+0x1170/0x2340 fs/reiserfs/super.c:2053
 mount_bdev+0x22b/0x2d0 fs/super.c:1643
 legacy_get_tree+0xea/0x180 fs/fs_context.c:662
 vfs_get_tree+0x8c/0x280 fs/super.c:1764
 do_new_mount+0x24b/0xa40 fs/namespace.c:3371
 do_mount fs/namespace.c:3711 [inline]
 __do_sys_mount fs/namespace.c:3920 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3897
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
 __call_rcu_common kernel/rcu/tree.c:2721 [inline]
 call_rcu+0x158/0x930 kernel/rcu/tree.c:2837
 destroy_inode fs/inode.c:316 [inline]
 evict+0x7db/0x870 fs/inode.c:720
 dispose_list fs/inode.c:738 [inline]
 evict_inodes+0x5fe/0x690 fs/inode.c:792
 generic_shutdown_super+0x97/0x2b0 fs/super.c:672
 kill_block_super+0x44/0x90 fs/super.c:1660
 deactivate_locked_super+0x97/0x100 fs/super.c:481
 cleanup_mnt+0x429/0x4c0 fs/namespace.c:1250
 task_work_run+0x1ce/0x250 kernel/task_work.c:239
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
 do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Second to last potentially related work creation:
 kasan_save_stack+0x3e/0x60 mm/kasan/common.c:45
 __kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
 __call_rcu_common kernel/rcu/tree.c:2721 [inline]
 call_rcu+0x158/0x930 kernel/rcu/tree.c:2837
 destroy_inode fs/inode.c:316 [inline]
 evict+0x7db/0x870 fs/inode.c:720
 reiserfs_fill_super+0x1403/0x2340 fs/reiserfs/super.c:2078
 mount_bdev+0x22b/0x2d0 fs/super.c:1643
 legacy_get_tree+0xea/0x180 fs/fs_context.c:662
 vfs_get_tree+0x8c/0x280 fs/super.c:1764
 do_new_mount+0x24b/0xa40 fs/namespace.c:3371
 do_mount fs/namespace.c:3711 [inline]
 __do_sys_mount fs/namespace.c:3920 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3897
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff88805da293e0
 which belongs to the cache reiser_inode_cache of size 1568
The buggy address is located 1488 bytes inside of
 freed 1568-byte region [ffff88805da293e0, ffff88805da29a00)

The buggy address belongs to the physical page:
page:ffffea0001768a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88805da2bba0 pfn:0x5da28
head:ffffea0001768a00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff8880217adb01
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff8880187ed3c0 dead000000000122 0000000000000000
raw: ffff88805da2bba0 000000008013000b 00000001ffffffff ffff8880217adb01
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Reclaimable, gfp_mask 0x1d20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL|__GFP_RECLAIMABLE), pid 6466, tgid 6465 (syz.0.270), ts 131147373658, free_ts 29149042988
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1cd/0x210 mm/page_alloc.c:1554
 prep_new_page mm/page_alloc.c:1561 [inline]
 get_page_from_freelist+0x195c/0x19f0 mm/page_alloc.c:3191
 __alloc_pages+0x1e3/0x460 mm/page_alloc.c:4457
 alloc_slab_page+0x5d/0x170 mm/slub.c:1876
 allocate_slab mm/slub.c:2023 [inline]
 new_slab+0x87/0x2e0 mm/slub.c:2076
 ___slab_alloc+0xc6d/0x12f0 mm/slub.c:3230
 __slab_alloc mm/slub.c:3329 [inline]
 __slab_alloc_node mm/slub.c:3382 [inline]
 slab_alloc_node mm/slub.c:3475 [inline]
 slab_alloc mm/slub.c:3493 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3500 [inline]
 kmem_cache_alloc_lru+0x1ae/0x2e0 mm/slub.c:3516
 alloc_inode_sb include/linux/fs.h:2946 [inline]
 reiserfs_alloc_inode+0x2a/0xc0 fs/reiserfs/super.c:642
 alloc_inode fs/inode.c:261 [inline]
 iget5_locked+0xa2/0x260 fs/inode.c:1314
 reiserfs_fill_super+0x1170/0x2340 fs/reiserfs/super.c:2053
 mount_bdev+0x22b/0x2d0 fs/super.c:1643
 legacy_get_tree+0xea/0x180 fs/fs_context.c:662
 vfs_get_tree+0x8c/0x280 fs/super.c:1764
 do_new_mount+0x24b/0xa40 fs/namespace.c:3371
 do_mount fs/namespace.c:3711 [inline]
 __do_sys_mount fs/namespace.c:3920 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3897
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1154 [inline]
 free_unref_page_prepare+0x7ce/0x8e0 mm/page_alloc.c:2336
 free_unref_page+0x32/0x2e0 mm/page_alloc.c:2429
 free_contig_range+0xa1/0x160 mm/page_alloc.c:6369
 destroy_args+0x87/0x770 mm/debug_vm_pgtable.c:1015
 debug_vm_pgtable+0x3cc/0x410 mm/debug_vm_pgtable.c:1395
 do_one_initcall+0x1fd/0x750 init/main.c:1238
 do_initcall_level+0x137/0x1f0 init/main.c:1300
 do_initcalls+0x69/0xd0 init/main.c:1316
 kernel_init_freeable+0x3d2/0x570 init/main.c:1553
 kernel_init+0x1d/0x1c0 init/main.c:1443
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293

Memory state around the buggy address:
 ffff88805da29880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88805da29900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805da29980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                     ^
 ffff88805da29a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88805da29a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/21 13:39 linux-6.6.y bb9c90ab9c5a 3e79b825 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in __ext4_iget
2025/08/19 13:22 linux-6.6.y bb9c90ab9c5a 254a27c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in __ext4_iget
2025/08/15 02:28 linux-6.6.y 3a8ababb8b6a 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in __ext4_iget
* Struck through repros no longer work on HEAD.