syzbot


UBSAN: shift-out-of-bounds in squashfs_xz_comp_opts

Status: upstream: reported C repro on 2026/02/17 19:48
Subsystems: squashfs
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+99fc070a2affcd27784b@syzkaller.appspotmail.com
Fix commit: Squashfs: check xz dictionary size isn't zero
Patched on: [ci-upstream-linux-next-kasan-gce-root ci-upstream-rust-kasan-gce], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 107d, last: 68d
Cause bisection: failed (error log, bisect log)
  
✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision Error
f4743a74-6e55-4c90-a3ba-6ac56996033d assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ✅ NetworkTrigger: ❌ PeripheralTrigger: ✅ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ UBSAN: shift-out-of-bounds in squashfs_xz_comp_opts 2026/05/31 01:11 2026/05/31 01:11 2026/05/31 02:06 6b4a844333e83556da95d61d7f207e7ef5cd4bc6
858dafc5-7f2e-4ea8-9be0-e0b0de3600ab assessment-security 💥 UBSAN: shift-out-of-bounds in squashfs_xz_comp_opts 2026/05/14 13:29 2026/05/14 13:29 2026/05/14 13:30 6ccb967e465e832a7bfd7a116ad00d52a0923a5d failed to run ["git" "pull" "origin" "HEAD" "--depth=1" "--allow-unrelated-histories"]: exit status 128 From /app/workdir/repo/linux * branch HEAD -> FETCH_HEAD Updating files: 20% (19077/92606) Updating files: 21% (19448/92606) Updating files: 22% (20374/92606) Updating files: 23% (21300/92606) Updating files: 24% (22226/92606) Updating files: 25% (23152/92606) Updating files: 26% (24078/92606) Updating files: 27% (25004/92606) Updating files: 28% (25930/92606) Updating files: 29% (26856/92606) Updating files: 30% (27782/92606) Updating files: 30% (28373/92606) Updating files: 31% (28708/92606) Updating files: 32% (29634/92606) Updating files: 33% (30560/92606) Updating files: 34% (31487/92606) error: unable to write file drivers/clk/clk-qoriq.c error: unable to write file drivers/clk/clk-renesas-pcie.c error: unable to write file drivers/clk/clk-rk808.c error: unable to write file drivers/clk/clk-rp1.c error: unable to write file drivers/clk/clk-rpmi.c error: unable to write file drivers/clk/clk-s2mps11.c error: unable to write file drivers/clk/clk-scmi.c error: unable to write file drivers/clk/clk-scpi.c error: unable to write file drivers/clk/clk-si514.c error: unable to write file drivers/clk/clk-si521xx.c error: unable to write file drivers/clk/clk-si5341.c error: unable to write file drivers/clk/clk-si5351.c error: unable to write file drivers/clk/clk-si5351.h error: unable to write file drivers/clk/clk-si544.c error: unable to write file drivers/clk/clk-si570.c error: unable to write file drivers/clk/clk-sp7021.c error: unable to write file drivers/clk/clk-sparx5.c error: unable to write file drivers/clk/clk-stm32f4.c error: unable to write file drivers/clk/clk-stm32h7.c error: unable to write file drivers/clk/clk-tps68470.c error: unable to write file drivers/clk/clk-twl.c error: unable to write file drivers/clk/clk-twl6040.c error: unable to write file drivers/clk/clk-versaclock3.c error: unable to write file drivers/clk/clk-versaclock5.c error: unable to write file drivers/clk/clk-versaclock7.c error: unable to write file drivers/clk/clk-vt8500.c error: unable to write file drivers/clk/clk-wm831x.c error: unable to write file drivers/clk/clk-xgene.c error: unable to write file drivers/clk/clk.c error: unable to write file drivers/clk/clk.h error: unable to write file drivers/clk/clk_kunit_helpers.c error: unable to write file drivers/clk/clk_parent_data_test.h error: unable to write file drivers/clk/clk_test.c error: unable to write file drivers/clk/clkdev.c fatal: cannot create directory at 'drivers/clk/davinci': No space left on device
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 (4):
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/03/28 00:28 upstream 7df48e363130 74a13a23 .config console log report info [disk image] [vmlinux] [kernel image] 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.