CVE-2026-13478

Source
https://cve.org/CVERecord?id=CVE-2026-13478
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-13478.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-13478
Aliases
  • GHSA-gj29-7f7m-4c29
Published
2026-08-25T16:05:39.217Z
Modified
2026-08-28T14:32:48.540559Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
Out-of-bounds read in Zephyr ext2 block-bitmap validation from a crafted s_blocks_count
Details

The Zephyr ext2 filesystem driver validates the on-disk block bitmap in ext2initfs() (subsys/fs/ext2/ext2impl.c) by passing fsblocks = sblockscount - sfirstdatablock to ext2bitmapcountset(). That helper (subsys/fs/ext2/ext2bitmap.c) treats its argument as a number of bits and reads one bitmap byte per eight bits, but the bitmap buffer (BGROUPBLOCKBITMAP) is a single fetched block of only fs->blocksize bytes (capacity fs->blocksize * 8 bits). sblockscount and sfirstdatablock are taken verbatim from the superblock and were never bounded against this single-group capacity; ext2verifydisk_superblock() checks the magic, revision, and block-size shift but not the block count.

A crafted ext2 image with an oversized sblockscount (up to ~4 billion, against a maximum 4096-byte block / 32768-bit bitmap) makes ext2bitmapcount_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: ext2initfs() is invoked from ext2mount() (subsys/fs/ext2/ext2ops.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 fsblocks exceeds fs->blocksize * 8 before the scan.

Database specific
{
    "cna_assigner": "zephyr",
    "cwe_ids": [
        "CWE-125"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/13xxx/CVE-2026-13478.json"
}
References

Affected packages

Git / github.com/zephyrproject-rtos/zephyr

Affected ranges

Type
GIT
Repo
https://github.com/zephyrproject-rtos/zephyr
Events
Database specific
Show details
{
    "extracted_events": [
        {
            "introduced": "3.5.0"
        },
        {
            "fixed": "4.4.2"
        }
    ],
    "source": [
        "AFFECTED_FIELD",
        "REFERENCES"
    ]
}

Affected versions

v3.*
v3.5.0
v3.6.0
v3.6.0-rc1
v3.6.0-rc2
v3.6.0-rc3
v3.7.0
v3.7.0-rc1
v3.7.0-rc2
v3.7.0-rc3
v4.*
v4.0.0
v4.0.0-rc1
v4.0.0-rc2
v4.0.0-rc3
v4.1.0
v4.1.0-rc1
v4.1.0-rc2
v4.1.0-rc3
v4.2.0
v4.2.0-rc1
v4.2.0-rc2
v4.2.0-rc3
v4.3.0
v4.3.0-rc1
v4.3.0-rc2
v4.3.0-rc3
v4.4.0
v4.4.0-rc1
v4.4.0-rc2
v4.4.0-rc3
zephyr-v3.*
zephyr-v3.5.0

Database specific

vanir_signatures
[
    {
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/zephyrproject-rtos/zephyr/commit/9c0f869da07009d9d4bca7a99e995f9b8cea7da2",
        "id": "CVE-2026-13478-71ff6495",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "237063317660053419602987038656785327412",
                "289860565528130145462671730229321039800",
                "21575920350590289610715143231250589447"
            ]
        },
        "target": {
            "file": "subsys/fs/ext2/ext2_impl.c"
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/zephyrproject-rtos/zephyr/commit/9c0f869da07009d9d4bca7a99e995f9b8cea7da2",
        "id": "CVE-2026-13478-ebdbdfe5",
        "digest": {
            "function_hash": "229993982260619983220957148204655967385",
            "length": 1122.0
        },
        "target": {
            "file": "subsys/fs/ext2/ext2_impl.c",
            "function": "ext2_init_fs"
        },
        "deprecated": false
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-13478.json"
vanir_signatures_modified
"2026-08-28T14:32:48Z"