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

0 views
Skip to first unread message

syzbot

unread,
Nov 19, 2023, 3:08:27 PM11/19/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 80529b4968a8 Linux 5.15.138
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=110a4310e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=c431dbb457f792c5
dashboard link: https://syzkaller.appspot.com/bug?extid=de6af439f087e7e7b142
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=12904614e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=157f1a00e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4fd4b10a6041/disk-80529b49.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/60443f81279e/vmlinux-80529b49.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c7f38af1be13/bzImage-80529b49.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/3ae6c88554d0/mount_0.gz

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

loop0: detected capacity change from 0 to 512
EXT4-fs (loop0): Mount option "nouser_xattr" will be removed by 3.5
Contact linux...@vger.kernel.org if you think we should keep it.
================================================================================
UBSAN: shift-out-of-bounds in fs/ext4/super.c:2494:15
shift exponent 1919383155 is too large for 32-bit type 'int'
CPU: 1 PID: 3698 Comm: syz-executor195 Not tainted 5.15.138-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/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
parse_options+0x324d/0x32b0 fs/ext4/super.c:2494
ext4_fill_super+0x236e/0xa110 fs/ext4/super.c:4168
mount_bdev+0x2c9/0x3f0 fs/super.c:1387
legacy_get_tree+0xeb/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1517
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:0x7f48459ca0aa
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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f4845985088 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 00007f48459ca0aa
RDX: 0000000020000040 RSI: 0000000020000500 RDI: 00007f48459850a0
RBP: 00007f48459850a0 R08: 00007f48459850e0 R09: 00007f48459850e0
R10: 0000000000004500 R11: 0000000000000206 R12: 00007f48459850e0
R13: 0000000000004500 R14: 0000000000000003 R15: 0000000000040000
</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 report is already addressed, 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 overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, 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