syzbot


UBSAN: shift-out-of-bounds in squashfs_xz_comp_opts

Status: upstream: reported C repro on 2026/02/17 19:48
Subsystems: squashfs
[Documentation on labels]
Reported-by: syzbot+99fc070a2affcd27784b@syzkaller.appspotmail.com
First crash: 3d21h, last: 3d16h
Cause bisection: failed (error log, bisect log)
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] Squashfs: check xz dictionary size isn't zero 1 (1) 2026/02/17 23:15
[syzbot] [squashfs?] UBSAN: shift-out-of-bounds in squashfs_xz_comp_opts 0 (1) 2026/02/17 19:48

Sample crash report:
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 ]---

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/02/16 18:06 upstream c22e26bd0906 5d52cba5 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs UBSAN: shift-out-of-bounds in squashfs_xz_comp_opts
2026/02/16 17:28 upstream c22e26bd0906 5d52cba5 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs UBSAN: shift-out-of-bounds in squashfs_xz_comp_opts
2026/02/16 13:45 upstream c22e26bd0906 1e62d198 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs UBSAN: shift-out-of-bounds in squashfs_xz_comp_opts
* Struck through repros no longer work on HEAD.