[v5.15] UBSAN: shift-out-of-bounds in ntfs_read_inode_mount

0 views
Skip to first unread message

syzbot

unread,
Jul 15, 2023, 5:00:26 PM7/15/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d54cfc420586 Linux 5.15.120
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14fe0efaa80000
kernel config: https://syzkaller.appspot.com/x/.config?x=f546a5c7ff981a94
dashboard link: https://syzkaller.appspot.com/bug?extid=ceb898a282f988805a64
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1332ec3aa80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13f39de4a80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/601dfce79849/disk-d54cfc42.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b8e802138c25/vmlinux-d54cfc42.xz
kernel image: https://storage.googleapis.com/syzbot-assets/9b3b48ff5c05/bzImage-d54cfc42.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/cc46210c7858/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ceb898...@syzkaller.appspotmail.com

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>
================================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages