# CVE-2026-13215: Zephyr ext2 mount: unvalidated superblock block size causes out-of-bounds write from a crafted filesystem image

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.8
- **CVSS:** 6.8 (v3.1, CNA) `CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 13, 2026-11-28)
- **CWE:** CWE-787
- **Published:** 2026-08-25T04:37:21.765Z
- **Modified:** 2026-11-04T05:18:41.710Z

## Who should check

- Anyone running zephyrproject zephyr \>= 3.5.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2

## 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

- zephyrproject zephyr: \>= 3.5.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2 (cvelist)

## Mitigation

- Upgrade zephyr to 4.4.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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-28).

### 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.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-j52j-gfj9-rwjm>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/f270f4bd0e59585da31e1fbaa79c5abf73f1364b>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-13215>

HTML: <https://flawdb.com/CVE-2026-13215> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-13215>
