CVE-2026-10645: Out-of-bounds read in Zephyr ext2 directory entry traversal from a crafted filesystem image

Published Jun 22, 2026
·
Updated

The Zephyr ext2 filesystem driver (subsys/fs/ext2) trusted the on-disk directory entry fields dereclen and denamelen when walking a directory block. ext2fetchdirentry() guarded only with denamelen > EXT2MAXFILENAME, but denamelen is a uint8t and EXT2MAXFILENAME is 255, so the check is always false; the function then memcpy'd up to 255 name bytes and the lookup/readdir paths advanced traversal by an unvalidated dereclen. Each directory block is read into a blocksize-sized slab buffer, and blockoff can be driven near the block end by preceding entries' reclen, so the 8-byte header read and the subsequent name memcpy can read up to ~263 bytes past the end of the block buffer into adjacent heap/slab memory. On the readdir path those bytes are returned to the caller in fsdirent.name, leaking adjacent kernel heap memory; a dereclen of 0 also causes a zero-progress infinite loop (denial of service), and the unlink path's memmove(de, next, nextreclen) over unvalidated records is an additional OOB read/write source. The defect is reached by any path-based operation (open, stat, unlink, rename, mkdir) or directory listing on a mounted ext2 volume, so a crafted or corrupted ext2 image on attacker-supplied storage (SD card, USB mass storage, or otherwise mounted image) triggers it. Affected: Zephyr ext2 from its introduction in v3.5.0 through v4.4.0. The fix validates reclen and namelen in the parser and rejects entries whose header does not fit the remaining block or whose reclen crosses the block boundary in every traversal caller.

Affected Software

2 affected components
Zephyr Project Zephyr RTOS
zephyrproject zephyr<=4.4.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In the ext2 directory parser (ext2_fetch_direntry and every traversal caller), validate that de_rec_len and de_name_len do not cause reads/writes beyond the remaining directory block (block_size). Reject directory entries whose header does not fit the remaining block or whose rec_len crosses the block boundary, instead of memcpy’ing the name using unvalidated de_name_len and advancing traversal using unvalidated de_rec_len.

    Zephyr ext2 directory entry traversal (subsys/fs/ext2) Validate on-disk ext2 directory entry header fields (de_rec_len, de_name_len) and reject invalid entries = Enable strict bounds checks so entries whose header does not fit the remaining block or whose rec_len crosses the block boundary are rejected
  2. Compensating control

    Assume any crafted/corrupted ext2 image on attacker-supplied storage can trigger the bug via path-based operations (open, stat, unlink, rename, mkdir) or directory listing. Prevent untrusted ext2 images from being mounted (e.g., only mount trusted media/images).

Event History

Jun 22, 2026
CVE Published
via MITRE·11:48 PM
Data Sourced
via MITRE·11:48 PM
DescriptionSeverityWeakness
Jun 23, 2026
Data Sourced
via NVD·01:16 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-10645?

The severity of CVE-2026-10645 is classified as medium with a score of 4.9.

2

How does CVE-2026-10645 affect the system?

CVE-2026-10645 can lead to out-of-bounds read and zero-progress directory traversal due to missing structural validation in directory entries.

3

Which software is impacted by CVE-2026-10645?

CVE-2026-10645 affects the Zephyr Project Zephyr RTOS.

4

Can CVE-2026-10645 be exploited remotely?

CVE-2026-10645 has an attack vector of P (physical), indicating that remote exploitation may not be possible.

5

What is the recommended action to mitigate CVE-2026-10645?

To mitigate CVE-2026-10645, it is advised to apply patches provided by the Zephyr Project for the directory entry validation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203