syzbot


UBSAN: shift-out-of-bounds in ntfs_iget

Status: upstream: reported C repro on 2023/05/31 18:24
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+4163e97ae5421debdf5d@syzkaller.appspotmail.com
First crash: 338d, last: 7d22h
Fix bisection: failed (error log, bisect log)
  
Bug presence (3)
Date Name Commit Repro Result
2024/04/25 linux-5.15.y (ToT) c52b9710c83d C [report] UBSAN: shift-out-of-bounds in ntfs_iget
2023/10/12 upstream (ToT) 401644852d0b C [report] UBSAN: shift-out-of-bounds in ntfs_iget
2024/04/25 upstream (ToT) a93289b830ce C Didn't crash
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
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
linux-6.1 UBSAN: shift-out-of-bounds in ntfs_iget origin:upstream missing-backport C 2 11d 337d 0/3 upstream: reported C repro on 2023/06/01 07:48
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2023/11/14 00:02 0m bisect fix linux-5.15.y error job log (0)
2023/10/12 05:37 1h15m bisect fix linux-5.15.y job log (0) log
2023/08/29 04:04 2h12m bisect fix linux-5.15.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: 3498 Comm: syz-executor287 Not tainted 5.15.118-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+0x1c11/0x5700 fs/ntfs/super.c:1810
 ntfs_fill_super+0x1c7f/0x2e20 fs/ntfs/super.c:2894
 mount_bdev+0x2c9/0x3f0 fs/super.c:1378
 legacy_get_tree+0xeb/0x180 fs/fs_context.c:610
 vfs_get_tree+0x88/0x270 fs/super.c:1508
 do_new_mount+0x28b/0xae0 fs/namespace.c:2994
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3522
 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+0x61/0xcb
RIP: 0033:0x7fe9518f3b0a
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:00007ffe393e0718 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe9518f3b0a
RDX: 0000000020000000 RSI: 000000002001ee80 RDI: 00007ffe393e0730
RBP: 00007ffe393e0730 R08: 00007ffe393e0770 R09: 000000000001ee62
R10: 0000000000000010 R11: 0000000000000286 R12: 0000000000000004
R13: 0000555555a472c0 R14: 0000000000000010 R15: 00007ffe393e0770
 </TASK>
================================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/23 21:50 linux-5.15.y f67653019430 79782afc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan UBSAN: shift-out-of-bounds in ntfs_iget
2023/05/31 18:24 linux-5.15.y 0ab06468cbd1 09898419 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan-arm64 UBSAN: shift-out-of-bounds in ntfs_iget
* Struck through repros no longer work on HEAD.