Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessUnprivileged thread granted flash device object
-
DeliveryInvoke flash_read syscall with crafted negative offset
-
ExploitSigned-to-unsigned conversion wraps bounds check
-
Executionmemcpy reads memory below flash base
-
ImpactArbitrary CPU-addressable memory disclosed to attacker buffer
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires two non-default conditions to be simultaneously present. First, the Zephyr firmware must have been explicitly compiled with CONFIG_USERSPACE enabled - this kernel feature is not active in default Zephyr builds and must be deliberately selected. Second, the SF32LB QSPI NOR flash device object must have been explicitly granted to an untrusted unprivileged thread using Zephyr's object access control APIs (k_object_access_grant or equivalent). These represent deliberate firmware design choices to provide isolated flash access, which the driver's deficient bounds check failed to enforce. Exploitation is further limited to hardware platforms incorporating the SF32LB SoC and its MPI QSPI NOR controller - no other Zephyr flash drivers are implicated. Read-path exploitation (memory disclosure) requires only the two conditions above; write-path exploitation additionally requires write permission on the device object for the thread. There is no network attack vector - access requires execution of code within the target device's thread context. |
| Impact | The provided CVSS 3.1 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L, score 6.6) accurately represents the attack surface: exploitation is local, low-complexity once prerequisites are satisfied, and gated behind low-privilege thread access to the flash device object. No EPSS score was supplied, so probabilistic exploitation likelihood cannot be quantified from available data. The vulnerability is not listed in the CISA KEV catalog and no public exploit code has been identified. Real-world risk is strongly conditioned on two non-default configuration prerequisites: CONFIG_USERSPACE must be explicitly enabled in the firmware build, and an untrusted thread must have been deliberately granted the flash device object - neither condition is present in the default Zephyr configuration. For affected deployments (embedded systems intentionally using CONFIG_USERSPACE with flash access delegation), the read path represents the highest priority concern due to its C:H rating: arbitrary memory disclosure could expose cryptographic material, runtime secrets, or other sensitive data resident in CPU-addressable memory. The write path's I:L and A:L ratings are lower in severity but may carry disproportionate consequences in safety-critical or industrial-control deployments using SF32LB-based hardware, where cache corruption or out-of-range flash programming could affect firmware integrity. There is no network-accessible attack surface, which substantially limits the pool of exploitable deployments. |
| Exploit ScenarioDerived | An attacker controlling an unprivileged Zephyr user-space thread that has been granted access to the SF32LB flash device calls flash_read() via the CONFIG_USERSPACE syscall interface, passing a crafted negative off_t offset alongside a valid destination buffer within its own memory domain. The signed-to-unsigned promotion causes the pre-fix bounds check to wrap and pass, and the subsequent memcpy copies data from arbitrary CPU-addressable memory below the flash base into the attacker's buffer, potentially disclosing cryptographic keys, runtime secrets, or other sensitive memory contents. No public exploit code was identified at time of analysis, but the vulnerability mechanics are well-understood and require only knowledge of the target device's memory layout to weaponize. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 07, 2026
Out-of-bounds memory read and write in the Zephyr RTOS SF32LB MPI QSPI NOR flash driver allows a low-privileged thread, when explicitly granted flash device access in a CONFIG_USERSPACE build, to disclose arbitrary CPU-addressable memory or corrupt flash and invalidate cache beyond the mapped flash window. The root cause is a signed/unsigned type confusion in the offset bounds check: a crafted negative off_t value converts to a large unsigned integer and the subsequent addition wraps to a small result that passes the check, allowing memcpy to read from or program flash at attacker-controlled addresses. No public exploit code has been identified at time of analysis; exploitation is nonetheless mechanically straightforward for any attacker familiar with signed/unsigned integer confusion vulnerabilities.
RemediationAI
The upstream fix is available as commit 909eb568750304d68ea481d1b56a489ae670bdae in the Zephyr repository at https://github.com/zephyrproject-rtos/zephyr/commit/909eb568750304d68ea481d1b56a489ae670bdae; a specific tagged release version incorporating this fix has not been independently confirmed from the available data, so integrators should verify against the Zephyr release changelog directly. The fix replaces the vulnerable (offset + size) > data->size check in both flash_sf32lb_mpi_qspi_nor_read() and flash_sf32lb_mpi_qspi_nor_write() with qspi_nor_range_is_valid(), which first rejects negative offsets and then performs the range comparison using overflow-safe 64-bit arithmetic, and additionally introduces a write_buf SRAM bounce buffer and source/destination overlap detection. If the patch cannot be applied immediately, the most targeted compensating control is to revoke any untrusted thread's access to the raw flash device object, which eliminates the attack path entirely without architectural side effects. Alternatively, disabling CONFIG_USERSPACE removes the user-space syscall surface but represents a significant firmware architecture change with broad functional consequences and should only be considered if the user-space separation model is not required. See https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-c6wh-gwg4-fj5j for official vendor guidance.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected component is the SF32LB MPI QSPI NOR flash driver (drivers/flash/flash_sf32lb_mpi_qspi_nor.c) in the Zephyr Project RTOS (CPE: cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*). The root cause is classified as CWE-125 (Out-of-Bounds Read), arising from a classic signed/unsigned type mismatch: the offset parameter is declared as off_t (a signed integer) while size is unsigned. The pre-fix bounds check (offset + size) > data->size is evaluated after implicit unsigned promotion - a negative off_t becomes a very large unsigned value, and the addition can wrap to a small positive result that passes the comparison. Zephyr's CONFIG_USERSPACE feature exposes flash_read and flash_write as system calls; the syscall entry points validate the device object and caller buffer but intentionally defer offset range checking to the driver itself, creating a direct path from unprivileged user space to the vulnerable arithmetic. The erase path had already been hardened against negative offsets; only the read and write paths were affected. The fix introduces qspi_nor_range_is_valid(), which explicitly rejects negative offsets and performs the range comparison in overflow-safe 64-bit arithmetic, alongside an SRAM DMA bounce buffer and source/destination overlap checks to close a secondary DMA bus-hang condition.
Know when Zephyr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
Local vector confirmed by thread execution context; PR:L because device object must be explicitly granted; C:H for arbitrary memory read; I:L/A:L for out-of-range flash write and cache invalidation.
Primary rating from Vendor (zephyr).
CVSS VectorVendor: zephyr
DescriptionCVE.org
The SF32LB MPI QSPI NOR flash driver (drivers/flash/flash_sf32lb_mpi_qspi_nor.c) validated the flash offset and length on its read and write paths with the test (offset + size) > data->size. Because offset is a signed off_t while size is unsigned, a negative offset is converted to a large unsigned value and the addition can wrap to a small result that passes the check. The read path then performs memcpy(dst, (void *)(data->base + offset), size) and the write path programs flash at offset and cache-invalidates data->base + offset, in both cases accessing memory outside the mapped flash window. The driver's erase path already rejected negative offsets, but read and write did not.
In builds with CONFIG_USERSPACE, flash_read and flash_write are syscalls whose verifiers validate the device object and the caller's buffer but deliberately delegate offset bounds checking to the driver. An unprivileged thread that has been granted access to this flash device can therefore call the syscall with a crafted negative offset and a buffer valid in its own memory domain, and reach the unchecked access.
The most direct impact is on the read path: by choosing a negative offset and matching size, an attacker slides the memcpy source below the flash base and copies arbitrary CPU-addressable memory into its own buffer, disclosing memory it is not authorized to read. The write path additionally allows programming flash at an out-of-range address and invalidating an attacker-chosen cache range, affecting integrity and availability. Reachability requires userspace to be enabled and the raw flash device object to be granted to an untrusted thread.
The fix replaces the check with qspi_nor_range_is_valid(), which rejects negative offsets and performs the bound comparison in overflow-safe 64-bit arithmetic on both paths, and additionally adds an SRAM DMA bounce buffer plus source/destination overlap rejection to prevent a separate DMA bus-hang condition.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on
Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS
Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner
Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability
Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul
zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(
Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul
The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte
Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c
EUVD-2026-54682
NVD
CVE.org
EPSS
GitHub
Exploit-DB