syzbot


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

Status: upstream: reported on 2025/08/19 13:23
Reported-by: syzbot+6d08037c33272de1e5a0@syzkaller.appspotmail.com
First crash: 52d, last: 4d09h
Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in ntfs_iget5 ntfs3 19 C done done 3633 632d 1267d 25/29 fixed on 2024/03/20 11:33
upstream BUG: unable to handle kernel paging request in ntfs_iget5 ntfs3 8 1 516d 512d 0/29 auto-obsoleted due to no activity on 2024/08/10 16:42
linux-6.1 KASAN: use-after-free Read in ntfs_iget5 19 7 693d 940d 0/3 auto-obsoleted due to no activity on 2024/02/25 08:58
linux-5.15 KASAN: use-after-free Read in ntfs_iget5 19 5 760d 901d 0/3 auto-obsoleted due to no activity on 2023/12/20 11:31
linux-5.15 KASAN: slab-out-of-bounds Read in ntfs_iget5 19 31 50d 311d 0/3 upstream: reported on 2024/12/03 01:28
linux-5.15 KASAN: use-after-free Read in ntfs_iget5 (2) 19 5 457d 556d 0/3 auto-obsoleted due to no activity on 2024/10/18 06:28
linux-6.1 KASAN: use-after-free Read in ntfs_iget5 (2) origin:upstream 19 C error 39 60d 560d 0/3 upstream: reported C repro on 2024/03/29 09:18

Sample crash report:
loop2: detected capacity change from 0 to 4096
ntfs3: loop2: Different NTFS sector size (2048) and media sector size (512).
==================================================================
BUG: KASAN: slab-use-after-free in ntfs_iget5+0x152/0x3750 fs/ntfs3/inode.c:534
Read of size 8 at addr ffff888075790ca0 by task syz.2.6186/19898

CPU: 1 PID: 19898 Comm: syz.2.6186 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/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
 ntfs_iget5+0x152/0x3750 fs/ntfs3/inode.c:534
 ntfs_fill_super+0x2788/0x42e0 fs/ntfs3/super.c:1269
 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:3377
 do_mount fs/namespace.c:3717 [inline]
 __do_sys_mount fs/namespace.c:3926 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3903
 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:0x7fa79c39066a
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:00007fa79d13de68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fa79d13def0 RCX: 00007fa79c39066a
RDX: 000020000001f340 RSI: 0000200000000200 RDI: 00007fa79d13deb0
RBP: 000020000001f340 R08: 00007fa79d13def0 R09: 0000000000804002
R10: 0000000000804002 R11: 0000000000000246 R12: 0000200000000200
R13: 00007fa79d13deb0 R14: 000000000001f38e R15: 0000200000000000
 </TASK>

Allocated by task 17375:
 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:3495 [inline]
 slab_alloc mm/slub.c:3503 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3510 [inline]
 kmem_cache_alloc_lru+0x115/0x2e0 mm/slub.c:3526
 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:3377
 do_mount fs/namespace.c:3717 [inline]
 __do_sys_mount fs/namespace.c:3926 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3903
 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
 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:3377
 do_mount fs/namespace.c:3717 [inline]
 __do_sys_mount fs/namespace.c:3926 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3903
 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

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
 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+0xf6/0x180 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

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

The buggy address belongs to the physical page:
page:ffffea0001d5e400 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880757906a0 pfn:0x75790
head:ffffea0001d5e400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88803015dc01
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888141afc140 dead000000000122 0000000000000000
raw: ffff8880757906a0 000000008013000a 00000001ffffffff ffff88803015dc01
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 8052, tgid 8051 (syz.3.1089), ts 198886293814, free_ts 101879602527
 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:1881
 allocate_slab mm/slub.c:2028 [inline]
 new_slab+0x87/0x2e0 mm/slub.c:2081
 ___slab_alloc+0xc6d/0x1300 mm/slub.c:3253
 __slab_alloc mm/slub.c:3339 [inline]
 __slab_alloc_node mm/slub.c:3392 [inline]
 slab_alloc_node mm/slub.c:3485 [inline]
 slab_alloc mm/slub.c:3503 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3510 [inline]
 kmem_cache_alloc_lru+0x1ae/0x2e0 mm/slub.c:3526
 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:3377
 do_mount fs/namespace.c:3717 [inline]
 __do_sys_mount fs/namespace.c:3926 [inline]
 __se_sys_mount+0x2da/0x3c0 fs/namespace.c:3903
 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
 discard_slab mm/slub.c:2127 [inline]
 __unfreeze_partials+0x1cf/0x210 mm/slub.c:2667
 put_cpu_partial+0x17c/0x250 mm/slub.c:2743
 __slab_free+0x31d/0x410 mm/slub.c:3700
 qlink_free mm/kasan/quarantine.c:166 [inline]
 qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185
 kasan_quarantine_reduce+0x143/0x160 mm/kasan/quarantine.c:292
 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:305
 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:3495 [inline]
 kmem_cache_alloc_node+0x150/0x330 mm/slub.c:3540
 __alloc_skb+0x108/0x2c0 net/core/skbuff.c:640
 alloc_skb include/linux/skbuff.h:1284 [inline]
 netlink_alloc_large_skb net/netlink/af_netlink.c:1184 [inline]
 netlink_sendmsg+0x65b/0xbe0 net/netlink/af_netlink.c:1869
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg net/socket.c:745 [inline]
 ____sys_sendmsg+0x5bf/0x950 net/socket.c:2595
 ___sys_sendmsg+0x220/0x290 net/socket.c:2649
 __sys_sendmsg net/socket.c:2678 [inline]
 __do_sys_sendmsg net/socket.c:2687 [inline]
 __se_sys_sendmsg+0x1a5/0x270 net/socket.c:2685
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81

Memory state around the buggy address:
 ffff888075790b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888075790c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888075790c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
                               ^
 ffff888075790d00: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
 ffff888075790d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/06 10:51 linux-6.6.y e617101e5626 91305dbe .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in ntfs_iget5
2025/10/01 23:43 linux-6.6.y 147338df3487 267f56c6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in ntfs_iget5
2025/08/20 02:21 linux-6.6.y bb9c90ab9c5a 79512909 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: slab-use-after-free Read in ntfs_iget5
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 ntfs_iget5
* Struck through repros no longer work on HEAD.