syzbot


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

Status: auto-closed as invalid on 2022/06/16 22:11
Reported-by: syzbot+90f10e584ced7f8e109e@syzkaller.appspotmail.com
First crash: 791d, last: 791d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in ntfs_test_inode ntfs3 C done 402 132d 1067d 25/26 fixed on 2023/12/21 01:43
linux-5.15 KASAN: use-after-free Read in ntfs_test_inode 6 190d 390d 0/3 auto-obsoleted due to no activity on 2024/01/19 06:00
upstream KASAN: slab-use-after-free Read in ntfs_test_inode fs 5 99d 99d 0/26 upstream: reported on 2024/01/09 20:01
linux-4.19 KASAN: use-after-free Read in ntfs_test_inode 1 506d 506d 0/1 auto-obsoleted due to no activity on 2023/03/28 18:25
linux-6.1 KASAN: use-after-free Read in ntfs_test_inode 2 24d 26d 0/3 upstream: reported on 2024/03/23 06:24

Sample crash report:
ntfs: volume version 3.1.
==================================================================
BUG: KASAN: slab-out-of-bounds in constant_test_bit arch/x86/include/asm/bitops.h:328 [inline]
BUG: KASAN: slab-out-of-bounds in NInoAttr fs/ntfs/inode.h:214 [inline]
BUG: KASAN: slab-out-of-bounds in ntfs_test_inode+0x213/0x270 fs/ntfs/inode.c:68
Read of size 8 at addr ffff88803e3430e8 by task syz-executor.5/16136

CPU: 1 PID: 16136 Comm: syz-executor.5 Not tainted 4.14.267-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 constant_test_bit arch/x86/include/asm/bitops.h:328 [inline]
 NInoAttr fs/ntfs/inode.h:214 [inline]
 ntfs_test_inode+0x213/0x270 fs/ntfs/inode.c:68
 find_inode+0xde/0x190 fs/inode.c:804
 iget5_locked+0x89/0x450 fs/inode.c:1038
 ntfs_iget+0x8d/0x130 fs/ntfs/inode.c:181
 load_and_check_logfile fs/ntfs/super.c:1222 [inline]
 load_system_files fs/ntfs/super.c:1955 [inline]
 ntfs_fill_super+0x4bf9/0x7170 fs/ntfs/super.c:2908
 mount_bdev+0x2b3/0x360 fs/super.c:1134
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a10 fs/namespace.c:2902
 SYSC_mount fs/namespace.c:3118 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3095
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x7fc569a1d58a
RSP: 002b:00007fc568390f88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007fc569a1d58a
RDX: 0000000020000000 RSI: 0000000020000100 RDI: 00007fc568390fe0
RBP: 00007fc568391020 R08: 00007fc568391020 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000
R13: 0000000020000100 R14: 00007fc568390fe0 R15: 0000000020000040

Allocated by task 14748:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
 kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552
 reiserfs_alloc_inode+0x18/0xa0 fs/reiserfs/super.c:642
 alloc_inode+0x5d/0x170 fs/inode.c:210
 iget5_locked+0x169/0x450 fs/inode.c:1050
 reiserfs_fill_super+0xe28/0x2980 fs/reiserfs/super.c:2066
 mount_bdev+0x2b3/0x360 fs/super.c:1134
 mount_fs+0x92/0x2a0 fs/super.c:1237
 vfs_kern_mount.part.0+0x5b/0x470 fs/namespace.c:1046
 vfs_kern_mount fs/namespace.c:1036 [inline]
 do_new_mount fs/namespace.c:2572 [inline]
 do_mount+0xe65/0x2a10 fs/namespace.c:2902
 SYSC_mount fs/namespace.c:3118 [inline]
 SyS_mount+0xa8/0x120 fs/namespace.c:3095
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 13694:
 save_stack mm/kasan/kasan.c:447 [inline]
 set_track mm/kasan/kasan.c:459 [inline]
 kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
 __cache_free mm/slab.c:3496 [inline]
 kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758
 __rcu_reclaim kernel/rcu/rcu.h:195 [inline]
 rcu_do_batch kernel/rcu/tree.c:2699 [inline]
 invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline]
 __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline]
 rcu_process_callbacks+0x780/0x1180 kernel/rcu/tree.c:2946
 __do_softirq+0x24d/0x9ff kernel/softirq.c:288

The buggy address belongs to the object at ffff88803e343200
 which belongs to the cache reiser_inode_cache of size 1312
The buggy address is located 280 bytes to the left of
 1312-byte region [ffff88803e343200, ffff88803e343720)
The buggy address belongs to the page:
page:ffffea0000f8d0c0 count:1 mapcount:0 mapping:ffff88803e343200 index:0xffff88803e343ffe
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffff88803e343200 ffff88803e343ffe 0000000100000002
raw: ffffea00015af560 ffff8880b10a9b48 ffff8880b177eb00 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88803e342f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88803e343000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88803e343080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                          ^
 ffff88803e343100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88803e343180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/02/16 22:11 linux-4.14.y a35d65bedfbc 50221962 .config console log report info ci2-linux-4-14 KASAN: slab-out-of-bounds Read in ntfs_test_inode
* Struck through repros no longer work on HEAD.