syzbot


KASAN: slab-out-of-bounds Read in ntfs_iget5

Status: upstream: reported on 2024/12/03 01:28
Reported-by: syzbot+7f9842213310bb64a581@syzkaller.appspotmail.com
First crash: 212d, last: 5d06h
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 KASAN: use-after-free Read in ntfs_iget5 7 593d 840d 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 5 660d 801d 0/3 auto-obsoleted due to no activity on 2023/12/20 11:31
linux-5.15 KASAN: use-after-free Read in ntfs_iget5 (2) 5 357d 457d 0/3 auto-obsoleted due to no activity on 2024/10/18 06:28
upstream KASAN: slab-out-of-bounds Read in ntfs_iget5 ntfs3 C done done 3633 533d 1167d 25/29 fixed on 2024/03/20 11:33
linux-6.1 KASAN: use-after-free Read in ntfs_iget5 (2) origin:upstream C error 36 8d10h 460d 0/3 upstream: reported C repro on 2024/03/29 09:18
upstream BUG: unable to handle kernel paging request in ntfs_iget5 ntfs3 1 416d 412d 0/29 auto-obsoleted due to no activity on 2024/08/10 16:42

Sample crash report:
loop1: detected capacity change from 0 to 4096
ntfs3: loop1: Different NTFS' sector size (2048) and media sector size (512)
==================================================================
BUG: KASAN: slab-out-of-bounds in ntfs_iget5+0x14a/0x3670 fs/ntfs3/inode.c:526
Read of size 8 at addr ffff88807322ff60 by task syz.1.2916/11008

CPU: 1 PID: 11008 Comm: syz.1.2916 Not tainted 5.15.185-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106
 print_address_description+0x60/0x2d0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0xdf/0x130 mm/kasan/report.c:451
 ntfs_iget5+0x14a/0x3670 fs/ntfs3/inode.c:526
 ntfs_fill_super+0x2068/0x3c10 fs/ntfs3/super.c:1004
 get_tree_bdev+0x3f1/0x610 fs/super.c:1325
 vfs_get_tree+0x88/0x270 fs/super.c:1530
 do_new_mount+0x24a/0xa40 fs/namespace.c:3010
 do_mount fs/namespace.c:3353 [inline]
 __do_sys_mount fs/namespace.c:3561 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3538
 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:0x7fa84ed5f0ca
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:00007fa84cbc4e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fa84cbc4ef0 RCX: 00007fa84ed5f0ca
RDX: 000020000001f380 RSI: 000020000001f3c0 RDI: 00007fa84cbc4eb0
RBP: 000020000001f380 R08: 00007fa84cbc4ef0 R09: 0000000000000002
R10: 0000000000000002 R11: 0000000000000246 R12: 000020000001f3c0
R13: 00007fa84cbc4eb0 R14: 000000000001f369 R15: 000020000001f400
 </TASK>

Allocated by task 4296:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 __kasan_slab_alloc+0x9c/0xd0 mm/kasan/common.c:467
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3220 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 kmem_cache_alloc+0x100/0x290 mm/slub.c:3233
 sock_alloc_inode+0x17/0xb0 net/socket.c:303
 alloc_inode fs/inode.c:261 [inline]
 new_inode_pseudo+0x5f/0x210 fs/inode.c:1001
 sock_alloc net/socket.c:626 [inline]
 __sock_create+0x129/0x900 net/socket.c:1450
 sock_create net/socket.c:1542 [inline]
 __sys_socket+0xe2/0x170 net/socket.c:1584
 __do_sys_socket net/socket.c:1593 [inline]
 __se_sys_socket net/socket.c:1591 [inline]
 __x64_sys_socket+0x76/0x80 net/socket.c:1591
 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

Freed by task 20:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
 ____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
 kasan_slab_free include/linux/kasan.h:230 [inline]
 slab_free_hook mm/slub.c:1705 [inline]
 slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731
 slab_free mm/slub.c:3499 [inline]
 kmem_cache_free+0x8f/0x210 mm/slub.c:3515
 rcu_do_batch kernel/rcu/tree.c:2523 [inline]
 rcu_core+0x962/0x15d0 kernel/rcu/tree.c:2763
 handle_softirqs+0x328/0x820 kernel/softirq.c:576
 run_ksoftirqd+0x98/0xf0 kernel/softirq.c:943
 smpboot_thread_fn+0x4f6/0x970 kernel/smpboot.c:164
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Last potentially related work creation:
 kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
 __call_rcu kernel/rcu/tree.c:3007 [inline]
 call_rcu+0x179/0x920 kernel/rcu/tree.c:3087
 destroy_inode fs/inode.c:316 [inline]
 evict+0x7da/0x870 fs/inode.c:662
 __dentry_kill+0x431/0x650 fs/dcache.c:586
 dentry_kill+0xb8/0x290 fs/dcache.c:-1
 dput+0xd8/0x1a0 fs/dcache.c:893
 __fput+0x5ee/0x930 fs/file_table.c:319
 task_work_run+0x125/0x1a0 kernel/task_work.c:188
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Second to last potentially related work creation:
 kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
 __call_rcu kernel/rcu/tree.c:3007 [inline]
 call_rcu+0x179/0x920 kernel/rcu/tree.c:3087
 destroy_inode fs/inode.c:316 [inline]
 evict+0x7da/0x870 fs/inode.c:662
 __dentry_kill+0x431/0x650 fs/dcache.c:586
 dentry_kill+0xb8/0x290 fs/dcache.c:-1
 dput+0xd8/0x1a0 fs/dcache.c:893
 __fput+0x5ee/0x930 fs/file_table.c:319
 task_work_run+0x125/0x1a0 kernel/task_work.c:188
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff88807322f800
 which belongs to the cache sock_inode_cache of size 1408
The buggy address is located 480 bytes to the right of
 1408-byte region [ffff88807322f800, ffff88807322fd80)
The buggy address belongs to the page:
page:ffffea0001cc8a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x73228
head:ffffea0001cc8a00 order:3 compound_mapcount:0 compound_pincount:0
memcg:ffff888072f9b001
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0001cc1e00 0000000300000003 ffff888144bf1500
raw: 0000000000000000 0000000000150015 00000001ffffffff ffff888072f9b001
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 4296, ts 78921817862, free_ts 78754629886
 prep_new_page mm/page_alloc.c:2426 [inline]
 get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474
 alloc_slab_page mm/slub.c:1775 [inline]
 allocate_slab mm/slub.c:1912 [inline]
 new_slab+0xc0/0x4b0 mm/slub.c:1975
 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008
 __slab_alloc mm/slub.c:3095 [inline]
 slab_alloc_node mm/slub.c:3186 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 kmem_cache_alloc+0x195/0x290 mm/slub.c:3233
 sock_alloc_inode+0x17/0xb0 net/socket.c:303
 alloc_inode fs/inode.c:261 [inline]
 new_inode_pseudo+0x5f/0x210 fs/inode.c:1001
 sock_alloc net/socket.c:626 [inline]
 __sock_create+0x129/0x900 net/socket.c:1450
 sock_create net/socket.c:1542 [inline]
 __sys_socket+0xe2/0x170 net/socket.c:1584
 __do_sys_socket net/socket.c:1593 [inline]
 __se_sys_socket net/socket.c:1591 [inline]
 __x64_sys_socket+0x76/0x80 net/socket.c:1591
 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 last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1340 [inline]
 free_pcp_prepare mm/page_alloc.c:1391 [inline]
 free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
 free_unref_page+0x94/0x280 mm/page_alloc.c:3396
 qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xd0 mm/kasan/common.c:444
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3220 [inline]
 kmem_cache_alloc_node+0x12d/0x2d0 mm/slub.c:3256
 __alloc_skb+0xf4/0x750 net/core/skbuff.c:415
 alloc_skb include/linux/skbuff.h:1162 [inline]
 mld_newpack+0x12a/0xb90 net/ipv6/mcast.c:1746
 add_grhead+0x5a/0x240 net/ipv6/mcast.c:1857
 add_grec+0x1341/0x15d0 net/ipv6/mcast.c:1995
 mld_send_cr net/ipv6/mcast.c:2121 [inline]
 mld_ifc_work+0x6e7/0xb40 net/ipv6/mcast.c:2659
 process_one_work+0x863/0x1000 kernel/workqueue.c:2310
 worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

Memory state around the buggy address:
 ffff88807322fe00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88807322fe80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807322ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                       ^
 ffff88807322ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888073230000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (25):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/23 21:47 linux-5.15.y 1c700860e8bc e2f27c35 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_iget5
2025/05/14 12:43 linux-5.15.y 3b8db0e4f263 a4fa04ef .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_iget5
2024/12/03 01:28 linux-5.15.y 0a51d2d4527b 578925bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: slab-out-of-bounds Read in ntfs_iget5
2025/03/07 13:56 linux-5.15.y c16c81c81336 7e3bd60d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_iget5
2025/01/20 15:26 linux-5.15.y 4735586da88e 6e87cfa2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Read in ntfs_iget5
2025/06/27 22:16 linux-5.15.y 3dea0e7f549e fc9d8ee5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in ntfs_iget5
2025/06/17 01:44 linux-5.15.y 1c700860e8bc cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2025/06/09 08:16 linux-5.15.y 1c700860e8bc 4826c28e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2025/06/04 14:11 linux-5.15.y 1c700860e8bc e565f08d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2025/05/23 00:14 linux-5.15.y 98f47d0e9b8c fa44301a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2025/05/21 11:48 linux-5.15.y a68c15152131 dc5d3808 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2025/05/09 08:56 linux-5.15.y 3b8db0e4f263 bb813bcc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2025/05/09 00:34 linux-5.15.y 16fdf2c7111b bb813bcc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2025/05/06 18:12 linux-5.15.y 16fdf2c7111b 350f4ffc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2025/04/03 18:12 linux-5.15.y 0c935c049b5c d7ae3a11 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan general protection fault in ntfs_iget5
2024/12/22 10:36 linux-5.15.y 91786f140358 b4fbdbd4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2024/12/14 19:51 linux-5.15.y 963e654022cc 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan KASAN: use-after-free Read in ntfs_iget5
2025/06/04 10:06 linux-5.15.y 98f47d0e9b8c e565f08d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in ntfs_iget5
2025/05/15 00:58 linux-5.15.y 3b8db0e4f263 d6b2ee52 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in ntfs_iget5
2025/05/01 12:46 linux-5.15.y f7347f400572 51b137cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in ntfs_iget5
2025/04/25 17:59 linux-5.15.y f7347f400572 c6b4fb39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in ntfs_iget5
2025/03/21 20:20 linux-5.15.y 0c935c049b5c c6512ef7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in ntfs_iget5
2025/02/24 03:12 linux-5.15.y c16c81c81336 d34966d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in ntfs_iget5
2025/02/18 22:44 linux-5.15.y c16c81c81336 9a14138f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in ntfs_iget5
2025/01/15 03:59 linux-5.15.y 4735586da88e 7315a7cf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: use-after-free Read in ntfs_iget5
* Struck through repros no longer work on HEAD.