Skip to main content
Vulnerability Database/CVE-2026-71973

CVE-2026-71973: U-Boot SquashFS Buffer Overflow Vulnerability

CVE-2026-71973 is a buffer overflow flaw in U-Boot that occurs when processing SquashFS images, allowing attackers to corrupt heap memory and crash the bootloader. This article covers technical details, affected versions, and mitigation.

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-2026-71973 Overview

CVE-2026-71973 is an integer overflow vulnerability [CWE-190] in U-Boot versions before 2026.10-rc4. The flaw resides in the sqfs_read_directory_table() function within the SquashFS filesystem driver. An attacker-controlled metablks_count value in a crafted SquashFS superblock causes the multiplication used to size the directory table buffer to wrap. The undersized heap allocation is then written past its bounds, corrupting adjacent heap memory and crashing the bootloader. Exploitation requires physical access to supply the malicious SquashFS image to the boot process, limiting remote attack surface but posing risk to devices that mount untrusted storage during boot.

Critical Impact

A crafted SquashFS image can trigger heap corruption and bootloader crash on affected U-Boot builds, disrupting device boot integrity.

Affected Products

  • Das U-Boot bootloader versions prior to 2026.10-rc4
  • Embedded systems and IoT devices shipping vulnerable U-Boot builds with SquashFS support enabled
  • Firmware images relying on U-Boot's fs/squashfs/sqfs.c for boot-time filesystem parsing

Discovery Timeline

  • 2026-09-29 - CVE-2026-71973 published to NVD
  • 2026-09-29 - Last updated in NVD database

Technical Details for CVE-2026-71973

Vulnerability Analysis

The defect lives in sqfs_read_directory_table() in fs/squashfs/sqfs.c around line 814. The function allocates the directory table buffer by multiplying the attacker-controlled metablks_count value by SQFS_METADATA_BLOCK_SIZE. On 32-bit platforms, a sufficiently large metablks_count causes the product to overflow, yielding a small allocation. Subsequent parsing writes the full expected number of metadata blocks into the undersized buffer, producing an out-of-bounds heap write.

A second allocation on the same code path multiplies metablks_count by sizeof(u32) to build a position list, and suffers from the same overflow condition. Because U-Boot runs with minimal isolation and no memory protection, heap corruption typically results in an immediate crash, but controlled corruption of adjacent heap metadata can influence downstream boot behavior.

Root Cause

The root cause is missing overflow validation on attacker-controlled size arithmetic. The code trusts metablks_count extracted from the SquashFS superblock without checking whether the multiplication overflows the target integer width before calling malloc().

Attack Vector

Exploitation requires physical access to insert or modify a SquashFS-formatted storage medium (SD card, USB, eMMC, or attached flash) that U-Boot parses during boot. When U-Boot invokes sqfs_read_directory_table() against the crafted image, the undersized allocation and subsequent out-of-bounds write occur before the kernel is loaded.

c
	if (metablks_count < 1)
		goto out;
 
-	*dir_table = malloc(metablks_count * SQFS_METADATA_BLOCK_SIZE);
-	if (!*dir_table)
+	if (__builtin_mul_overflow(metablks_count, SQFS_METADATA_BLOCK_SIZE,
+				   &buf_size)) {
+		metablks_count = -1;
+		goto out;
+	}
+
+	*dir_table = malloc(buf_size);
+	if (!*dir_table) {
+		metablks_count = -1;
		goto out;
+	}
+
+	if (__builtin_mul_overflow(metablks_count, sizeof(u32), &buf_size)) {
+		metablks_count = -1;
		goto out;
+	}
 
-	*pos_list = malloc(metablks_count * sizeof(u32));
-	if (!*pos_list)
+	*pos_list = malloc(buf_size);
+	if (!*pos_list) {
+		metablks_count = -1;
		goto out;
+	}

Source: GitHub Commit 561ae28. The patch replaces raw multiplication with __builtin_mul_overflow() and aborts allocation when the size computation overflows.

Detection Methods for CVE-2026-71973

Indicators of Compromise

  • Repeated bootloader crashes or hangs when specific removable media are attached
  • SquashFS images on device storage containing anomalously large metablks_count values in the superblock
  • Boot process failures immediately preceding kernel handoff on devices that mount SquashFS at boot

Detection Strategies

  • Inventory firmware builds and identify U-Boot versions older than 2026.10-rc4 with CONFIG_FS_SQUASHFS enabled
  • Statically analyze SquashFS images consumed at boot for out-of-range directory_table_start, inode_table_start, and derived metablks_count values
  • Include U-Boot SquashFS parsing in fuzzing pipelines targeting boot-time filesystem drivers

Monitoring Recommendations

  • Log bootloader console output centrally where possible and alert on repeated allocation or parse failures
  • Track physical access events for devices deployed in untrusted or semi-trusted environments
  • Compare deployed U-Boot version strings against the fixed 2026.10-rc4 baseline in asset management

How to Mitigate CVE-2026-71973

Immediate Actions Required

  • Upgrade affected devices to U-Boot 2026.10-rc4 or later
  • Backport commit 561ae28cb56a082cfa90c1c421c4955bc215470b if you maintain a downstream U-Boot fork
  • Restrict physical access to devices that boot from removable media
  • Disable CONFIG_FS_SQUASHFS in U-Boot builds that do not require SquashFS boot support

Patch Information

The fix is committed to the U-Boot mainline as 561ae28 — see GitHub Commit 561ae28. The patch introduces __builtin_mul_overflow() checks around both allocations in sqfs_read_directory_table(). Additional context is available in the VulnCheck U-Boot Advisory and the U-Boot source at line 814.

Workarounds

  • Enable verified boot or signed-image mechanisms so U-Boot rejects unsigned SquashFS payloads
  • Configure U-Boot to boot only from fixed internal storage and disable USB, SD, and network boot paths
  • Physically seal or lock enclosures to prevent insertion of attacker-controlled media
bash
# Rebuild U-Boot without SquashFS support if not required
make menuconfig
# Navigate: File systems  --->  [ ] SquashFS filesystem support
make -j$(nproc)

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.