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

- Severity: Medium 4.9 (CVSS:3.1, scored by zephyr) `CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.11%, higher than 1% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-22T23:48:11.747Z
- Modified: 2026-11-04T05:18:23.483Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: zephyr

## Description

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 block or whose rec_len crosses the block boundary in every traversal caller.

(As written by CVE List.)

## Affected

- zephyr: from 3.5.0 before 4.6.0
- zephyrproject zephyr: up to 4.4.1

## Every score

- zephyr: CVSS:3.1 4.9 Medium `CVSS:3.1/AV:P/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`

## References

- <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-hwrh-9h3x-vccm> (exploit, patch, vendor-advisory)
- <https://github.com/zephyrproject-rtos/zephyr/commit/7cdb534a3c3daeaec18f656953857dcafa33a2bf> (patch)

## Sources

- CVE List: [CVE-2026-10645](https://www.cve.org/CVERecord?id=CVE-2026-10645), CVE Terms of Use, modified 2026-11-04
- NVD: [CVE-2026-10645](https://nvd.nist.gov/vuln/detail/CVE-2026-10645), Public domain, modified 2026-11-04

---

Page: https://cve.day/CVE-2026-10645 · Whole record: https://cve.day/CVE-2026-10645.json · Rebuilt by cve.day 2026-11-25T22:59:25.441Z
