CVE-2026-138370

lwext4 through 1.0.0 Out-of-Bounds Write via ext4_fs_mark_bitmap_end

Published Nov 29, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
lwext4 through 1.0.0 contains an out-of-bounds write vulnerability in ext4_fs_mark_bitmap_end() in src/ext4_fs.c that allows attackers to corrupt heap memory via a crafted ext4 image. Attackers can supply superblock fields yielding group_blocks above INT_MAX, making start_bit negative and writing hundreds of MiB past the bitmap buffer, crashing the mounting application.

Analysis

AI-generated

Technical impact

The vulnerability resides in the ext4_fs_mark_bitmap_end() function of lwext4 up to version 1.0.0. By supplying a crafted ext4 image whose superblock fields cause group_blocks to exceed INT_MAX, an attacker can force start_bit to a negative value. This leads the routine to write beyond the end of the bitmap buffer, corrupting hundreds of megabytes of heap memory within the mounting process. The corruption can trigger a crash or, depending on the surrounding memory layout, may allow execution of arbitrary code. This is an out‑of‑bounds write, categorized as CWE‑787.

Affected Systems

The affected software is lwext4 version 1.0.0 and earlier, provided by gkostka. Any system that mounts ext4 filesystems using this library and processes untrusted image data is at risk. The vulnerability is known only in the open‑source repository; end‑users commonly use this component in embedded or firmware environments. No other vendors or product versions are presently listed.

Risk and Exploitability

The CVSS base score for the vulnerability is 6.9, which indicates moderate severity. The EPSS score is not available, so the current exploitation probability cannot be quantified from the data. The vulnerability is not listed in the CISA KEV catalog. Attackers would need to supply a malicious ext4 image to the target application. Once the image is processed, memory corruption occurs, potentially resulting in denial of service or a remote code execution vector if further exploitation is feasible. Because the flaw lies in parsing untrusted filesystem metadata, the attack vector is local to the mounting process and requires the ability to feed a crafted image to the application. The lack of a public exploit reference makes immediate damage uncertain, yet the impact scale is potentially significant if the affected firmware is widely deployed.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade lwext4 to a released version newer than 1.0.0, which contains a fixed implementation of ext4_fs_mark_bitmap_end().
  • If an upgrade is not immediately possible, restrict the mounting operation to privileged or immutable users and disable automatic mounting of untrusted images. This limits an attacker’s ability to trigger the vulnerable routine from external input.
  • Validate ext4 image superblock fields before attempting to mount them, ensuring that group_blocks does not exceed the 32‑bit signed integer limit. Implement input sanitization as a defense against out‑of‑bounds writes.
  • Deploy the system within a sandbox or container that isolates the mounting process, so that any heap corruption does not compromise the host environment.

Generated by OpenCVE AI on November 29, 2026 at 14:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description lwext4 through 1.0.0 contains an out-of-bounds write vulnerability in ext4_fs_mark_bitmap_end() in src/ext4_fs.c that allows attackers to corrupt heap memory via a crafted ext4 image. Attackers can supply superblock fields yielding group_blocks above INT_MAX, making start_bit negative and writing hundreds of MiB past the bitmap buffer, crashing the mounting application.
Title lwext4 through 1.0.0 Out-of-Bounds Write via ext4_fs_mark_bitmap_end
First Time appeared Gkostka
Gkostka lwext4
Weaknesses CWE-787
CPEs cpe:2.3:a:gkostka:lwext4:*:*:*:*:*:*:*:*
Vendors & Products Gkostka
Gkostka lwext4
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:H'}

cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 30, 2026, 5:28 PM
Reserved
Nov 29, 2026, 1:09 PM
Status
Received
Published
Nov 29, 2026, 2:17 PM
Modified
Nov 30, 2026, 6:18 PM