Skip to main content
Vulnerability Database/CVE-2024-26982

CVE-2024-26982: Linux Kernel Buffer Overflow Vulnerability

CVE-2024-26982 is a buffer overflow flaw in the Linux Kernel Squashfs filesystem that causes out-of-bounds memory access through invalid inode handling. This article covers technical details, impact analysis, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-26982 Overview

CVE-2024-26982 is an out-of-bounds read vulnerability [CWE-125] in the Squashfs filesystem implementation of the Linux kernel. The flaw was discovered by Syzkaller fuzzing and resolved upstream. It stems from the fill_meta_index() function failing to validate that an inode number is non-zero before caching metadata index entries. A local attacker who can mount or trigger reads from a crafted Squashfs image can cause an out-of-bounds memory access in the kernel. The vulnerability affects multiple Linux kernel versions and has been addressed by patches that reject inodes with the invalid value of zero during creation.

Critical Impact

Local attackers can trigger an out-of-bounds kernel memory read, resulting in kernel memory corruption or a denial-of-service condition on affected Linux systems.

Affected Products

  • Linux Kernel (multiple stable branches prior to the fix commits)
  • Linux Kernel 6.9-rc1, 6.9-rc2, 6.9-rc3, 6.9-rc4
  • Downstream distributions including Debian LTS, Fedora, and Siemens industrial products

Discovery Timeline

  • 2024-05-01 - CVE-2024-26982 published to NVD
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2024-26982

Vulnerability Analysis

The vulnerability resides in the Squashfs filesystem driver, specifically in the metadata index caching logic implemented by fill_meta_index(). Squashfs uses metadata indexes to accelerate block lookups within compressed filesystem images. Each cached index is associated with an inode number, and the value zero is reserved to indicate an unused slot.

When fill_meta_index() allocates a new empty metadata index via empty_meta_index() and then encounters a data read error, it aborts and resets the index inode number to zero to mark the slot as unused. If the underlying inode itself legitimately carries an inode number of zero, which should never occur for a valid Squashfs inode, this reset creates ambiguity between a valid-but-aborted entry and a genuinely unused slot.

On a subsequent read, locate_meta_index() matches the zero inode number and returns the stale, partially initialized index. The caller assumes the index has been fully populated and performs array indexing on uninitialized fields, producing an out-of-bounds access in kernel memory [CWE-125].

Root Cause

The root cause is missing input validation during Squashfs inode construction. The kernel accepted inodes carrying an inode number of zero even though zero is reserved as the "unused" sentinel in the metadata index cache. The patch adds a sanity check at inode creation time and returns -EINVAL if the inode number is zero.

Attack Vector

Exploitation requires local access and the ability to supply or mount a malformed Squashfs image. An attacker crafts a Squashfs filesystem whose inode table contains an inode with number zero. When the kernel parses the image and performs read operations that trigger the metadata index path, the out-of-bounds access occurs within kernel context, enabling denial of service or potential information disclosure from adjacent kernel memory.

No public proof-of-concept exploit code is available for this issue. The vulnerability was identified through Syzkaller kernel fuzzing. Technical details are available in the upstream fix commits, including Kernel Commit 7def00e and Kernel Commit 9253c54.

Detection Methods for CVE-2024-26982

Indicators of Compromise

  • Unexpected kernel oops or BUG: messages referencing fill_meta_index, locate_meta_index, or squashfs symbols in dmesg or /var/log/kern.log.
  • Mount attempts of Squashfs images from untrusted sources, especially from user-writable paths such as /tmp or removable media.
  • KASAN (Kernel Address Sanitizer) reports flagging out-of-bounds reads in Squashfs code paths.

Detection Strategies

  • Monitor kernel logs for Squashfs-related warnings, oops entries, and panic traces originating from the metadata index code path.
  • Audit mount syscalls for Squashfs filesystem types using Linux Audit (auditd) rules and correlate with the invoking user and image source.
  • Deploy kernel version inventory checks across the fleet to identify hosts running unpatched builds against the fixed stable commits.

Monitoring Recommendations

  • Alert on repeated Squashfs mount failures or kernel crashes on the same host, which may indicate exploitation attempts.
  • Collect kernel telemetry and system logs into a centralized data lake for cross-host correlation and historical analysis.
  • Track privileged use of mount, losetup, and unsquashfs by non-administrative users.

How to Mitigate CVE-2024-26982

Immediate Actions Required

  • Upgrade to a Linux kernel build that includes the Squashfs inode validation fix for your distribution's supported branch.
  • Restrict the ability of unprivileged users to mount filesystems, including via FUSE and user namespaces, where operationally feasible.
  • Review and remove any sudoers or Polkit rules that allow non-administrators to mount arbitrary Squashfs images.

Patch Information

The upstream fix adds a sanity check rejecting inodes with an inode number of zero and returning -EINVAL. The fix has been backported across stable branches in commits 7def00e, 9253c54, and be383ef. Distribution updates are available via the Debian LTS Announcement #30, Debian LTS Announcement #45, Fedora package announcements, and Siemens advisories SSA-265688, SSA-503939, and SSA-784472.

Workarounds

  • Disable the Squashfs kernel module (squashfs.ko) on systems that do not require it using modprobe blacklisting.
  • Prevent automatic mounting of removable media and user-supplied Squashfs images by hardening udev and systemd-automount rules.
  • Enforce mandatory access control policies (SELinux or AppArmor) to restrict which processes can invoke the mount syscall with Squashfs filesystem types.
bash
# Blacklist the Squashfs module where not required
echo "blacklist squashfs" | sudo tee /etc/modprobe.d/blacklist-squashfs.conf
sudo depmod -a
sudo update-initramfs -u

# Verify installed kernel version against your distribution's fixed release
uname -r

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.