Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

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

Quick assessment

Affected
zephyrproject zephyr
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Zephyr 操作系统的 ext2 文件系统驱动在挂载文件系统时,未能验证磁盘超级块中的 字段。 中的 函数仅校验了魔数(magic number)、版本、inode 大小和组计数,但并未对 进行边界检查。在验证通过后, 会根据攻击者可控的 32 位无符号整数 ,计算得出 。这可能导致移位溢出(产生未定义行为),或生成一个远大于 的块大小。 随后, 将该块大小传递给 ,试图从固定静态缓冲区 中分配 个块。该静态缓冲区的大小为 。然而, 并未验证请求的块是否适合该缓冲区,且 ext2 包装层丢弃了该函数的返回值,导致

CVSS 6.8 · Medium
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-13215

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Zephyr ext2 mount: unvalidated superblock block size causes out-of-bounds write from a crafted filesystem image
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
跨界内存写
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
zephyrproject zephyr 3.5.0 ~ 4.4.2 -

II. Public POCs for CVE-2026-13215

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-13215

登录查看更多情报信息。

Patches & Fixes for CVE-2026-13215 (1)

Vendor Advisories for CVE-2026-13215 (1)

Same Patch Batch · zephyrproject · 2026-08-25 · 5 CVEs total

CVE-2026-13214 9.8 CRITICAL Stack buffer overflow in OCPP GetConfiguration key parsing
CVE-2026-13216 6.1 MEDIUM Out-of-bounds stack write in Zephyr virtio PCI driver from unvalidated device-supplied cap
CVE-2026-13217 5.9 MEDIUM NULL-pointer dereference in Zephyr OCPP CALLRESULT parsing via unchecked strtok_r/atoi
CVE-2026-13478 5.5 MEDIUM Out-of-bounds read in Zephyr ext2 block-bitmap validation from a crafted s_blocks_count

IV. Related Vulnerabilities

V. Comments for CVE-2026-13215

No comments yet


Leave a comment