[syzbot] [squashfs?] UBSAN: shift-out-of-bounds in squashfs_xz_comp_opts

1 view
Skip to first unread message

syzbot

unread,
2:48 PM (3 hours ago) 2:48 PM
to linux-...@vger.kernel.org, phi...@squashfs.org.uk, squashf...@lists.sourceforge.net, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c22e26bd0906 Merge tag 'landlock-7.0-rc1' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1393f15a580000
kernel config: https://syzkaller.appspot.com/x/.config?x=6428d17febdfb14e
dashboard link: https://syzkaller.appspot.com/bug?extid=99fc070a2affcd27784b
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1793f15a580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=169e1c02580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/d68a15a17667/disk-c22e26bd.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b8799409c3a5/vmlinux-c22e26bd.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2c41c867ca47/bzImage-c22e26bd.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/9183f225328f/mount_0.gz

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

loop3: detected capacity change from 0 to 8
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in fs/squashfs/xz_wrapper.c:62:29
shift exponent -1 is negative
CPU: 1 UID: 0 PID: 6061 Comm: syz.3.20 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
ubsan_epilogue+0xa/0x30 lib/ubsan.c:233
__ubsan_handle_shift_out_of_bounds+0x385/0x410 lib/ubsan.c:494
squashfs_xz_comp_opts+0x259/0x300 fs/squashfs/xz_wrapper.c:62
squashfs_comp_opts fs/squashfs/decompressor.h:31 [inline]
get_comp_opts fs/squashfs/decompressor.c:119 [inline]
squashfs_decompressor_setup+0x123/0x2c0 fs/squashfs/decompressor.c:131
squashfs_fill_super+0x10a4/0x22c0 fs/squashfs/super.c:353
get_tree_bdev_flags+0x431/0x4f0 fs/super.c:1694
vfs_get_tree+0x92/0x2a0 fs/super.c:1754
fc_mount fs/namespace.c:1193 [inline]
do_new_mount_fc fs/namespace.c:3760 [inline]
do_new_mount+0x341/0xd30 fs/namespace.c:3836
do_mount fs/namespace.c:4159 [inline]
__do_sys_mount fs/namespace.c:4348 [inline]
__se_sys_mount+0x31d/0x420 fs/namespace.c:4325
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3a0dbdd20a
Code: 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffef042a358 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffef042a3e0 RCX: 00007f3a0dbdd20a
RDX: 00002000000002c0 RSI: 0000200000000580 RDI: 00007ffef042a3a0
RBP: 00002000000002c0 R08: 00007ffef042a3e0 R09: 0000000000000005
R10: 0000000000000005 R11: 0000000000000246 R12: 0000200000000580
R13: 00007ffef042a3a0 R14: 0000000000000199 R15: 0000200000000000
</TASK>
---[ end trace ]---


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