syzbot


UBSAN: shift-out-of-bounds in ntfs_iget

Status: upstream: reported C repro on 2023/06/01 07:48
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+4df7b7b6f7cb16c5bfd0@syzkaller.appspotmail.com
First crash: 337d, last: 11d
Bug presence (3)
Date Name Commit Repro Result
2024/04/22 linux-6.1.y (ToT) 6741e066ec76 C [report] UBSAN: shift-out-of-bounds in ntfs_iget
2023/11/24 upstream (ToT) f1a09972a45a C [report] UBSAN: shift-out-of-bounds in ntfs_iget
2024/04/22 upstream (ToT) ed30a4a51bb1 C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 UBSAN: shift-out-of-bounds in ntfs_iget origin:upstream missing-backport C error 2 7d23h 338d 0/3 upstream: reported C repro on 2023/05/31 18:24
upstream UBSAN: shift-out-of-bounds in ntfs_iget ntfs3 C error done 9 96d 338d 26/26 fixed on 2024/03/20 11:33
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2024/04/03 10:12 2h41m bisect fix linux-6.1.y job log (0) log
2024/03/03 18:03 1h25m bisect fix linux-6.1.y job log (0) log
2024/01/25 18:51 1h46m bisect fix linux-6.1.y job log (0) log
2023/12/25 13:58 1h11m bisect fix linux-6.1.y job log (0) log
2023/11/24 14:41 1h03m bisect fix linux-6.1.y job log (0) log
2023/10/21 09:23 1h53m bisect fix linux-6.1.y job log (0) log
2023/09/16 00:00 1h58m bisect fix linux-6.1.y job log (0) log
2023/07/01 15:03 1h24m bisect fix linux-6.1.y job log (0) log

Sample crash report:
ntfs: (device loop0): ntfs_attr_find(): Inode is corrupt.  Run chkdsk.
ntfs: (device loop0): ntfs_read_locked_inode(): Failed to lookup $DATA attribute.
ntfs: (device loop0): ntfs_read_locked_inode(): Failed with error code -5.  Marking corrupt inode 0x1 as bad.  Run chkdsk.
ntfs: (device loop0): load_system_files(): Failed to load $MFTMirr.  Mounting read-only.  Run ntfsfix and/or chkdsk.
================================================================================
UBSAN: shift-out-of-bounds in fs/ntfs/inode.c:1080:43
shift exponent 44 is too large for 32-bit type 'unsigned int'
CPU: 1 PID: 3543 Comm: syz-executor834 Not tainted 6.1.37-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 ubsan_epilogue lib/ubsan.c:151 [inline]
 __ubsan_handle_shift_out_of_bounds+0x3bf/0x420 lib/ubsan.c:321
 ntfs_read_locked_inode+0x4665/0x49c0 fs/ntfs/inode.c:1080
 ntfs_iget+0x10f/0x190 fs/ntfs/inode.c:177
 load_and_init_upcase fs/ntfs/super.c:1655 [inline]
 load_system_files+0x1518/0x4830 fs/ntfs/super.c:1810
 ntfs_fill_super+0x19b0/0x2bd0 fs/ntfs/super.c:2892
 mount_bdev+0x2c9/0x3f0 fs/super.c:1423
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:610
 vfs_get_tree+0x88/0x270 fs/super.c:1553
 do_new_mount+0x28b/0xae0 fs/namespace.c:3040
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f84650c7b0a
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffe5bbe238 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f84650c7b0a
RDX: 0000000020000000 RSI: 000000002001ee80 RDI: 00007fffe5bbe250
RBP: 00007fffe5bbe250 R08: 00007fffe5bbe290 R09: 000000000001ee62
R10: 0000000000000010 R11: 0000000000000286 R12: 0000000000000004
R13: 0000555556caa2c0 R14: 0000000000000010 R15: 00007fffe5bbe290
 </TASK>
================================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/03 08:58 linux-6.1.y 0f4ac6b4c5f0 bfc47836 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan UBSAN: shift-out-of-bounds in ntfs_iget
2023/06/01 07:46 linux-6.1.y d2869ace6eeb babc4389 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 UBSAN: shift-out-of-bounds in ntfs_iget
* Struck through repros no longer work on HEAD.