CVE-2026-13215
Zephyr ext2 mount: unvalidated superblock block size causes out-of-bounds write from a crafted filesystem image
Mitigation
- Upgrade zephyr to 4.4.2 or later.
Who should check
- Anyone running zephyrproject zephyr >= 3.5.0, < 4.3.2; >= 4.4.0, < 4.4.2
Vulnerability facts
- Affected
- zephyrproject zephyr >= 3.5.0, < 4.3.2; >= 4.4.0, < 4.4.2
- Fixed in
- zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 6.8 (v3.1, CNA)CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Physical
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.28% chance of exploitation in 30 days (percentile 13, 2026-11-26)
- CWE
- CWE-787
- Modified
Description
The Zephyr ext2 filesystem driver fails to validate the s_log_block_size field of the on-disk superblock when mounting a filesystem. ext2_verify_disk_superblock() in subsys/fs/ext2/ext2_impl.c checks the magic number, revision, inode size and group counts, but never bounds s_log_block_size. On a successful verify, subsys/fs/ext2/ext2_ops.c computes fs->block_size = 1024 << superblock.s_log_block_size from this attacker-controlled uint32_t, so a crafted value either overflows the shift (undefined behaviour) or yields a block size far larger than CONFIG_EXT2_MAX_BLOCK_SIZE. That block size is then passed to k_mem_slab_init() by ext2_init_blocks_slab() to carve CONFIG_EXT2_MAX_BLOCK_COUNT blocks out of the fixed static buffer __ext2_block_memory_buffer, whose size is CONFIG_EXT2_MAX_BLOCK_COUNT * CONFIG_EXT2_MAX_BLOCK_SIZE. k_mem_slab_init() does not verify that the requested blocks fit the buffer, and the ext2 wrapper discards its return value, so the slab is laid out past the end of the static buffer. The mount immediately reads block-group, bitmap and inode blocks of fs->block_size bytes each into these slab blocks, producing an out-of-bounds write into adjacent static memory on the first block read. The entire path is gated only by data read from the mounted image, making this reachable by any attacker who can present a crafted ext2 image to a device that mounts it (for example a removable SD card or storage medium). Because the ext2 driver runs in kernel mode, supplying image bytes yields a supervisor-mode memory-corruption primitive, with impact ranging from denial of service to potential code execution. The fix rejects s_log_block_size values that overflow the shift (greater than 11) or that produce a block size exceeding CONFIG_EXT2_MAX_BLOCK_SIZE, so the block slab can no longer be initialized larger than its backing buffer.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| zephyrproject zephyr | >= 3.5.0, < 4.3.2; >= 4.4.0, < 4.4.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-13215. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-13215.md Affected: zephyrproject zephyr >= 3.5.0, < 4.3.2; >= 4.4.0, < 4.4.2 Fixed in: zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2 Steps: 1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-13215 being exploited?
There is no confirmed exploitation: CVE-2026-13215 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-13215?
Medium: CVSS 6.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2026-13215?
zephyrproject zephyr >= 3.5.0, < 4.3.2; >= 4.4.0, < 4.4.2.
Is there a fix for CVE-2026-13215?
Yes. Fixed in zephyrproject zephyr 4.3.2, zephyrproject zephyr 4.4.2. Upgrade zephyr to 4.4.2 or later.
How do I check if I'm affected by CVE-2026-13215?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.