Skip to content
Heist/ feed
Medium

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

Type: advisorySource: Official CVE List1 source record

The Zephyr ext2 filesystem driver (subsys/fs/ext2) trusted the on-disk directory entry fields de_rec_len and de_name_len when walking a directory block. ext2_fetch_direntry() guarded only with de_name_len > EXT2_MAX_FILE_NAME, but de_name_len is a uint8_t and EXT2_MAX_FILE_NAME 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 de_rec_len. Each directory block is read into a block_size-sized slab buffer, and block_off can be driven near the block end by preceding entries' rec_len, 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 fs_dirent.name, leaking adjacent kernel heap memory; a de_rec_len of 0 also causes a zero-progress infinite loop (denial of service), and the unlink path's memmove(de, next, next_reclen) 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 rec_len and name_len in the parser and rejects entries whose header does not fit the remaining

Announced Group revision 1
Original source ↗

CVE-2026-10645

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-10645

zephyr

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "zephyrproject",
    "product": "zephyr",
    "versions": [
      {
        "status": "affected",
        "version": "3.5.0",
        "lessThan": "4.3.1",
        "versionType": "semver"
      },
      {
        "status": "affected",
        "version": "4.4.0",
        "lessThan": "4.4.1",
        "versionType": "semver"
      }
    ],
    "packageName": "zephyr",
    "programFiles": [
      "subsys/fs/ext2/ext2_diskops.c",
      "subsys/fs/ext2/ext2_diskops.h",
      "subsys/fs/ext2/ext2_impl.c"
    ],
    "collectionURL": "https://github.com/zephyrproject-rtos/zephyr",
    "defaultStatus": "unaffected"
  }
]
Related CVEs
CVE-2026-10645

Source reference: /cveMetadata/cveId

Publisher severity

medium

Source reference: /containers/cna/metrics

Event
#30754 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement