syzbot


KASAN: use-after-free Read in ntfs_test_inode

Status: auto-obsoleted due to no activity on 2023/03/28 18:25
Reported-by: syzbot+fae66716d840f5ea75d0@syzkaller.appspotmail.com
First crash: 724d, last: 724d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 KASAN: use-after-free Read in ntfs_test_inode (2) 2 55d 87d 0/3 upstream: reported on 2024/08/26 01:18
upstream KASAN: use-after-free Read in ntfs_test_inode ntfs3 C done 402 350d 1284d 25/28 fixed on 2023/12/21 01:43
linux-6.1 KASAN: use-after-free Read in ntfs_test_inode 2 241d 243d 0/3 auto-obsoleted due to no activity on 2024/07/03 10:22
linux-5.15 KASAN: use-after-free Read in ntfs_test_inode 6 407d 607d 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 316d 316d 0/28 auto-obsoleted due to no activity on 2024/04/18 20:01
linux-4.14 KASAN: slab-out-of-bounds Read in ntfs_test_inode 1 1008d 1008d 0/1 auto-closed as invalid on 2022/06/16 22:11

Sample crash report:
ntfs: volume version 3.1.
==================================================================
BUG: KASAN: use-after-free in constant_test_bit arch/x86/include/asm/bitops.h:317 [inline]
BUG: KASAN: use-after-free in NInoAttr fs/ntfs/inode.h:214 [inline]
BUG: KASAN: use-after-free in ntfs_test_inode+0x26e/0x2d0 fs/ntfs/inode.c:68
Read of size 8 at addr ffff8880b1a6e540 by task syz-executor.3/17730

CPU: 1 PID: 17730 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report mm/kasan/report.c:412 [inline]
 __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433
 constant_test_bit arch/x86/include/asm/bitops.h:317 [inline]
 NInoAttr fs/ntfs/inode.h:214 [inline]
 ntfs_test_inode+0x26e/0x2d0 fs/ntfs/inode.c:68
 find_inode+0xe4/0x220 fs/inode.c:808
 ilookup5_nowait+0x6f/0xb0 fs/inode.c:1321
 ilookup5+0x3c/0x140 fs/inode.c:1350
 iget5_locked+0x2f/0xd0 fs/inode.c:1128
 ntfs_iget+0x9d/0x180 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+0x5765/0x7e10 fs/ntfs/super.c:2908
 mount_bdev+0x2fc/0x3b0 fs/super.c:1158
 mount_fs+0xa3/0x310 fs/super.c:1261
 vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
 vfs_kern_mount fs/namespace.c:951 [inline]
 do_new_mount fs/namespace.c:2492 [inline]
 do_mount+0x115c/0x2f50 fs/namespace.c:2822
 ksys_mount+0xcf/0x130 fs/namespace.c:3038
 __do_sys_mount fs/namespace.c:3052 [inline]
 __se_sys_mount fs/namespace.c:3049 [inline]
 __x64_sys_mount+0xba/0x150 fs/namespace.c:3049
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f5f8352a60a
Code: 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5f81a9af88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 000000000001ec51 RCX: 00007f5f8352a60a
RDX: 000000002001ec80 RSI: 000000002001ecc0 RDI: 00007f5f81a9afe0
RBP: 00007f5f81a9b020 R08: 00007f5f81a9b020 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000000002001ec80
R13: 000000002001ecc0 R14: 00007f5f81a9afe0 R15: 000000002001ed00

Allocated by task 17280:
 kmem_cache_alloc+0x122/0x370 mm/slab.c:3559
 reiserfs_alloc_inode+0x19/0xb0 fs/reiserfs/super.c:642
 alloc_inode+0x5d/0x180 fs/inode.c:211
 new_inode_pseudo fs/inode.c:911 [inline]
 new_inode+0x1d/0xf0 fs/inode.c:940
 reiserfs_create+0x1b6/0x720 fs/reiserfs/namei.c:642
 xattr_create fs/reiserfs/xattr.c:69 [inline]
 xattr_lookup+0x318/0x3c0 fs/reiserfs/xattr.c:412
 reiserfs_xattr_set_handle+0xfd/0xb40 fs/reiserfs/xattr.c:531
 reiserfs_xattr_set+0x411/0x570 fs/reiserfs/xattr.c:631
 trusted_set+0xa6/0xd0 fs/reiserfs/xattr_trusted.c:30
 __vfs_setxattr+0x10e/0x170 fs/xattr.c:149
 __vfs_setxattr_noperm+0x11a/0x420 fs/xattr.c:180
 __vfs_setxattr_locked+0x176/0x250 fs/xattr.c:238
 vfs_setxattr+0xe5/0x270 fs/xattr.c:255
 setxattr+0x23d/0x330 fs/xattr.c:520
 path_setxattr+0x170/0x190 fs/xattr.c:539
 __do_sys_lsetxattr fs/xattr.c:561 [inline]
 __se_sys_lsetxattr fs/xattr.c:557 [inline]
 __x64_sys_lsetxattr+0xbd/0x150 fs/xattr.c:557
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 29121:
 __cache_free mm/slab.c:3503 [inline]
 kmem_cache_free+0x7f/0x260 mm/slab.c:3765
 __rcu_reclaim kernel/rcu/rcu.h:236 [inline]
 rcu_do_batch kernel/rcu/tree.c:2584 [inline]
 invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline]
 __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline]
 rcu_process_callbacks+0x8ff/0x18b0 kernel/rcu/tree.c:2881
 __do_softirq+0x265/0x980 kernel/softirq.c:292

The buggy address belongs to the object at ffff8880b1a6e0c0
 which belongs to the cache reiser_inode_cache of size 1304
The buggy address is located 1152 bytes inside of
 1304-byte region [ffff8880b1a6e0c0, ffff8880b1a6e5d8)
The buggy address belongs to the page:
page:ffffea0002c69b80 count:1 mapcount:0 mapping:ffff88823a4bde00 index:0xffff8880b1a6effe
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffffea00022af448 ffffea0001334708 ffff88823a4bde00
raw: ffff8880b1a6effe ffff8880b1a6e0c0 0000000100000002 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8880b1a6e400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8880b1a6e480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880b1a6e500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                           ^
 ffff8880b1a6e580: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc
 ffff8880b1a6e600: fc fc fc fc fc fc fc fc fc fc fc 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/28 18:25 linux-4.19.y 3f8a27f9e27b 247de55b .config console log report info [disk image] [vmlinux] ci2-linux-4-19 KASAN: use-after-free Read in ntfs_test_inode
* Struck through repros no longer work on HEAD.