CVE-2026-138370: lwext4 through 1.0.0 Out-of-Bounds Write via ext4_fs_mark_bitmap_end
lwext4 through 1.0.0 contains an out-of-bounds write vulnerability in ext4fsmarkbitmapend() in src/ext4fs.c that allows attackers to corrupt heap memory via a crafted ext4 image. Attackers can supply superblock fields yielding groupblocks above INTMAX, making startbit negative and writing hundreds of MiB past the bitmap buffer, crashing the mounting application.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Applications using lwext4 through version 1.0.0 that mount or otherwise process attacker-supplied ext4 images are exposed. The vulnerable operation occurs while handling ext4 filesystem metadata.
What does an attacker need to exploit it?
An attacker needs to provide a crafted ext4 image with superblock fields that cause group_blocks to exceed INT_MAX, then have the target mounting application process that image. The supplied image can cause a negative start_bit value and writes far beyond the bitmap buffer.
What can be done before an update is available?
Do not mount or process ext4 images from untrusted sources with affected lwext4 deployments. Restricting image input to trusted, validated sources prevents the crafted filesystem metadata required for exploitation.
How can I determine whether my application is potentially affected?
Check whether the application includes lwext4 version 1.0.0 or an earlier version and uses its ext4 image mounting or processing functionality. The affected code is ext4_fs_mark_bitmap_end() in src/ext4_fs.c.