---
id: "CVE-2026-98636"
kind: "vulnerability"
aliases: ["CVE-2026-98636"]
title: "Linux kernel: squashfs mount with zero dictionary size shifts out of bounds"
severity: "low"
cvss: null
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["linux-kernel", "runtime", "self-hosted", "squashfs"]
not_affected_if: ["no-squashfs-mounts", "trusted-images-only"]
published_at: "2026-10-18T16:17:16+00:00"
first_seen_at: "2026-10-23T21:57:16+00:00"
updated_at: "2026-10-25T05:21:00+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-98636", "first_seen_at": "2026-10-23T21:57:16+00:00"}]
---

# Linux kernel: squashfs mount with zero dictionary size shifts out of bounds

A crafted SquashFS image with the compression options flag set but a dictionary size of zero makes the kernel compute a negative shift exponent when it is mounted. The result is an undefined-behavior shift-out-of-bounds in the kernel's squashfs XZ option parsing.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `uname -r` and compare against the fixed kernel builds in the upstream stable advisory linked from NVD.
- unknown

## Fix

- Update the Linux kernel to a stable release that includes the squashfs dictionary size range check.
- Until patched, avoid mounting untrusted SquashFS images.

## Timeline

- 2026-10-23T21:57:16+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-98636

## From the sources

In the Linux kernel, the following vulnerability has been resolved:

squashfs: Add dictionary size range check to prevent shift-out-of-bounds

When an abnormal SquashFS image (COMP_OPTS flag is 1 but dictionary size
is 0) is mounted, and performs shift operations using dictionarysize, the
shift exponent is -1, causing a shift-out-of-bounds.

Detail as below:
squashfs_comp_opts(msblk, buffer, length)
  squashfs_xz_comp_opts()
    if (comp_opts)
      n = ffs(opts->dict_size) - 1;<----opts->dict_size=0, n=-1
      if (opts->dict_size != (1 << n) && opts->dict_size !=
	  	(1 << n) + (1 << (n + 1))) <----shift-out-of-bounds

Fix it by adding a dictionary size range check before the shift operation.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
