syzbot


UBSAN: shift-out-of-bounds in ntfs_read_inode_mount

Status: upstream: reported C repro on 2023/07/15 21:00
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+ceb898a282f988805a64@syzkaller.appspotmail.com
First crash: 508d, last: 59d
Fix commit to backport (bisect log) :
tree: upstream
commit 7ffa8f3d30236e0ab897c30bdb01224ff1fe1c89
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
Date: Mon Jan 15 07:20:25 2024 +0000

  fs: Remove NTFS classic

  
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: UBSAN: shift-out-of-bounds in ntfs_read_inode_mount (log)
Repro: C syz .config
  
Bug presence (3)
Date Name Commit Repro Result
2024/04/29 linux-5.15.y (ToT) b925f60c6ee7 C [report] UBSAN: shift-out-of-bounds in ntfs_read_inode_mount
2023/07/15 upstream (ToT) 831fe284d827 C [report] UBSAN: shift-out-of-bounds in ntfs_read_inode_mount
2024/04/29 upstream (ToT) e67572cd2204 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_read_inode_mount ntfs3 C error done 6 331d 642d 0/28 auto-obsoleted due to no activity on 2024/04/18 03:17
linux-6.1 UBSAN: shift-out-of-bounds in ntfs_read_inode_mount origin:upstream missing-backport C done 2 154d 543d 0/3 upstream: reported C repro on 2023/06/11 05:24
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/10/07 00:11 11m retest repro linux-5.15.y report log
Fix bisection attempts (8)
Created Duration User Patch Repo Result
2024/05/10 14:32 3h48m fix candidate upstream OK (1) job log
2024/04/04 19:43 1h48m bisect fix linux-5.15.y OK (0) job log log
2024/03/04 15:44 1h06m bisect fix linux-5.15.y OK (0) job log log
2024/01/28 13:05 50m bisect fix linux-5.15.y OK (0) job log log
2023/12/28 23:21 52m bisect fix linux-5.15.y OK (0) job log log
2023/11/28 12:46 1h18m bisect fix linux-5.15.y OK (0) job log log
2023/10/27 20:20 49m bisect fix linux-5.15.y OK (0) job log log
2023/09/25 22:16 1h27m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
loop0: detected capacity change from 0 to 4096
ntfs: (device loop0): parse_options(): Option utf8 is no longer supported, using option nls=utf8. Please use option nls=utf8 in the future and make sure utf8 is compiled either as a module or into the kernel.
================================================================================
UBSAN: shift-out-of-bounds in fs/ntfs/inode.c:1080:43
shift exponent 267 is too large for 32-bit type 'unsigned int'
CPU: 1 PID: 3499 Comm: syz-executor310 Not tainted 5.15.120-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/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_read_inode_mount+0xda2/0x2660 fs/ntfs/inode.c:2098
 ntfs_fill_super+0x1a16/0x2e20 fs/ntfs/super.c:2857
 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:0x7fdd1fb25d3a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fffb7e458c8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fffb7e458e0 RCX: 00007fdd1fb25d3a
RDX: 0000000020000000 RSI: 000000002001ee80 RDI: 00007fffb7e458e0
RBP: 0000000000000004 R08: 00007fffb7e45920 R09: 000000000001ee6c
R10: 0000000000800804 R11: 0000000000000286 R12: 0000000000800804
R13: 00007fffb7e45920 R14: 0000000000000003 R15: 0000000000200000
 </TASK>
================================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/15 20:59 linux-5.15.y d54cfc420586 35d9ecc5 .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_read_inode_mount
* Struck through repros no longer work on HEAD.