# CVE-2026-13478: Out-of-bounds read in Zephyr ext2 block-bitmap validation from a crafted s\_blocks\_count

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.14% (percentile 2, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2026-08-25T16:05:39.217Z
- **Modified:** 2026-11-04T05:18:42.167Z

## 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 validates the on-disk block bitmap in ext2\_init\_fs() (subsys/fs/ext2/ext2\_impl.c) by passing fs\_blocks = s\_blocks\_count - s\_first\_data\_block to ext2\_bitmap\_count\_set(). That helper (subsys/fs/ext2/ext2\_bitmap.c) treats its argument as a number of bits and reads one bitmap byte per eight bits, but the bitmap buffer (BGROUP\_BLOCK\_BITMAP) is a single fetched block of only fs-\>block\_size bytes (capacity fs-\>block\_size \* 8 bits). s\_blocks\_count and s\_first\_data\_block are taken verbatim from the superblock and were never bounded against this single-group capacity; ext2\_verify\_disk\_superblock() checks the magic, revision, and block-size shift but not the block count.

A crafted ext2 image with an oversized s\_blocks\_count (up to ~4 billion, against a maximum 4096-byte block / 32768-bit bitmap) makes ext2\_bitmap\_count\_set() scan roughly 512 MB of memory past the bitmap block — a large out-of-bounds read of the static block slab and adjacent memory.

The defect is reached during mount: ext2\_init\_fs() is invoked from ext2\_mount() (subsys/fs/ext2/ext2\_ops.c), the registered .mount operation. Any path that mounts an attacker-supplied ext2 image (removable media, a disk/flash partition, or a downloaded image) triggers it. The kernel-privileged parser operates on attacker-controlled data, so the bug is exploitable wherever untrusted ext2 media can be mounted.

Impact is an out-of-bounds read only: the resulting bit count is compared internally and the mount is rejected, so no attacker-controlled bytes are returned (not a useful information leak). The ~512 MB over-read will almost certainly cross an unmapped or MPU-protected boundary and fault, crashing the system — a denial of service triggered by mounting a single malformed image. The fix rejects any image whose fs\_blocks exceeds fs-\>block\_size \* 8 before the scan.

## 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-13478. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-13478.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-13478 being exploited?

There is no confirmed exploitation: CVE-2026-13478 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.14% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-13478?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-13478?

zephyrproject zephyr \>= 3.5.0, \< 4.3.2; \>= 4.4.0, \< 4.4.2.

### Is there a fix for CVE-2026-13478?

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-13478?

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-gj29-7f7m-4c29>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/9c0f869da07009d9d4bca7a99e995f9b8cea7da2>

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

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