MEDIUM 4.7

CVE-2026-10659: Zephyr Dhara FTL NULL Pointer Dereference Denial of Service

A NULL pointer dereference vulnerability exists in Zephyr's Dhara flash translation layer driver. When the driver initializes or mounts a flash-based storage disk, it may attempt to read checkpoint pages to resume the filesystem state. If the flash hardware returns an error (such as a corrected ECC failure or bad block detection), the driver code unconditionally writes the error code through a NULL pointer instead of using the library's safe error-handling function. This causes a kernel fault and system crash. The vulnerability requires local access and depends on specific flash health conditions or crafted on-disk content, making it a localized but critical availability risk for embedded systems relying on Zephyr's flash storage.

Source data · NVD / CISA · public domain

CVSS
3.1 · 4.7 MEDIUM · CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-476
Affected products
1 configuration(s)
Published / Modified
2026-07-07 / 2026-07-14

NVD description (verbatim)

The Dhara flash translation layer disk driver (drivers/disk/ftl_dhara.c) implemented the dhara_nand_ callbacks so that, on a flash error, the error code was written unconditionally through the caller-supplied dhara_error_t err pointer (e.g. *err = DHARA_E_ECC in dhara_nand_read, and similar in dhara_nand_erase/prog/copy). The upstream Dhara library calls these callbacks with err == NULL along its journal-resume binary search: find_last_checkblock() invokes find_checkblock(j, mid, &found, NULL), which forwards the NULL pointer into dhara_nand_read(). This path runs during disk_ftl_access_init() -> dhara_map_resume() whenever the FTL disk is mounted/initialised. If a flash read error (uncorrectable ECC, bad block, controller error) occurs on one of the probed checkpoint pages, the driver dereferences and writes to NULL, faulting the kernel (denial of service). The trigger is conditioned on the NAND medium content/health, which can be influenced by media wear, induced faults, or a corrupted/crafted on-flash image. The fix routes all error assignments through the library's NULL-safe dhara_set_error() helper. Affects Zephyr v4.4.0, where the driver was introduced.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-10659 involves an unsafe NULL pointer dereference in drivers/disk/ftl_dhara.c, the Zephyr FTL driver for NAND flash. The vulnerability occurs because the driver's dhara_nand_read(), dhara_nand_erase(), dhara_nand_prog(), and dhara_nand_copy() callbacks write error codes unconditionally via the err parameter without checking for NULL. During initialization—specifically in disk_ftl_access_init() → dhara_map_resume() → find_last_checkblock() → find_checkblock()—the Dhara library calls these callbacks with err=NULL as part of a binary search to locate the last valid checkpoint block. When a NAND error occurs (uncorrectable ECC, bad block, or controller error), the code executes *err = DHARA_E_* on a NULL pointer, triggering a kernel panic. The fix replaces direct pointer assignments with the library's NULL-safe dhara_set_error() helper. Affected versions include Zephyr v4.4.0, where the driver was first introduced.

Business impact

For organizations deploying Zephyr-based IoT devices, edge gateways, or embedded storage systems, this vulnerability presents an availability risk. An attacker with local access—or an adversary who can induce flash faults or flash wear through repeated I/O—can cause a denial of service by triggering a kernel crash during storage initialization. In mission-critical IoT or industrial control scenarios, such crashes disable device operation and may require remote intervention or physical recovery. Devices with degrading NAND health are particularly vulnerable; the issue may manifest spontaneously as media ages. The attack surface is limited to systems where an unprivileged local user can mount or reinitialize flash storage, but the impact is severe within those constraints.

Affected systems

Zephyr v4.4.0 is the confirmed affected version; the driver was introduced in this release. Any Zephyr-based embedded system, IoT device, or development board that uses the Dhara FTL (flash translation layer) for NAND storage is at risk if running v4.4.0. Users of prior Zephyr versions (pre-4.4.0) are not affected because the vulnerable driver did not exist. Later versions depend on whether a patch has been applied; consult the Zephyr project advisory to confirm patched versions.

Exploitability

Exploitability is moderate. The vulnerability requires local access (CWE-476 NULL pointer dereference; CVSS attack vector: local) and moderate complexity—an attacker must either wait for natural flash degradation or deliberately induce a flash error condition by crafting a malicious on-disk FTL image or exhausting the NAND's error correction capability. Unprivileged local users (PR:L in CVSS) can trigger re-initialization of the FTL, which increases exposure. Once triggered, the outcome is deterministic: the kernel crashes. There is no known public exploit code, but the conditions are reproducible in a lab environment with access to the target device and flash storage.

Remediation

The recommended fix is to apply the Zephyr project's official patch that routes all error assignments in dhara_nand_* callbacks through the dhara_set_error() helper function, which safely handles NULL pointers. Upgrade to a patched version of Zephyr v4.4.0 or later (verify exact version numbers in the official Zephyr advisory). For organizations unable to patch immediately, mitigate by restricting local access to devices and monitoring for kernel crashes or unexpected reboots that may indicate exploitation attempts.

Patch guidance

Consult the Zephyr project's official security advisory and release notes for the specific patched version number for v4.4.0. Apply the patch or upgrade to a confirmed fixed release. Patches typically involve replacing direct pointer dereferences (e.g., *err = DHARA_E_ECC) with calls to dhara_set_error(err, DHARA_E_ECC) throughout drivers/disk/ftl_dhara.c. Test the patched driver thoroughly on your target hardware and NAND configuration to ensure FTL initialization and checkpoint recovery function correctly.

Detection guidance

Monitor kernel logs and device crash reports for NULL pointer dereference panics originating from the FTL or Dhara driver code. Examine stack traces that reference disk_ftl_access_init(), dhara_map_resume(), or dhara_nand_* functions. Review NAND flash health metrics (ECC error counts, bad block counts) on deployed devices; a spike may precede exploitation. In a lab environment, tools like sanitizers and static analysis (e.g., Coverity) can identify unsafe NULL dereferences in custom Zephyr builds. If possible, enable debug logging in the Dhara driver to capture error conditions and their handling.

Why prioritize this

Although the CVSS score is 4.7 (MEDIUM), prioritization depends on your environment. For Zephyr deployments in safety-critical or highly available IoT systems (industrial control, medical devices, unattended edge gateways), this should be treated as HIGH priority because any kernel crash is unacceptable. For development or non-critical testing environments, MEDIUM priority is appropriate. The lack of KEV (Known Exploited Vulnerability) status and active public exploitation reduces urgency, but proactive patching is still strongly advised for production systems.

Risk score, explained

The CVSS 3.1 score of 4.7 reflects: (1) local attack vector (AV:L)—requires local access; (2) high attack complexity (AC:H)—conditional on NAND health or crafted image; (3) low privilege (PR:L)—unprivileged local user can trigger; (4) no scope change (S:U); (5) no impact on confidentiality or integrity (C:N, I:N); (6) high impact on availability (A:H)—kernel crash. The MEDIUM severity rating is conservative; in real-world IoT deployments where availability is paramount, the practical risk may be higher.

Frequently asked questions

Can this vulnerability be exploited remotely?

No. The vulnerability requires local access to the device running Zephyr and the ability to trigger FTL reinitialization or flash operations. It cannot be exploited over a network without first gaining local code execution or filesystem access.

Does every Zephyr system using Dhara FTL have this vulnerability?

No. Only Zephyr v4.4.0 systems using the Dhara FTL driver for NAND storage are affected. Systems using other storage drivers, ROM-based systems, or non-Zephyr platforms are not affected. Zephyr versions prior to 4.4.0 did not include this driver.

What happens if my NAND flash is healthy and has no errors?

If your NAND flash is error-free, the NULL pointer dereference code path is never executed because the error callbacks are only invoked when a flash error is detected. However, the vulnerability still exists in the code; healthy flash only masks the issue. As the flash ages and ECC errors accumulate, the risk increases.

Is there a workaround if I cannot patch immediately?

Restrict local access to the device and monitor for kernel crashes. Avoid triggering FTL reinitialization or mounting flash storage unnecessarily. However, patching is the only complete fix; workarounds are temporary measures only.

This analysis is provided for informational purposes by SEC.co and is based on publicly disclosed vulnerability data as of the publication date. CVSS scores, affected versions, and patch availability are subject to change; always verify against the official Zephyr project security advisory and vendor guidance before making remediation decisions. SEC.co does not provide warranty or liability regarding the accuracy or completeness of this information. Security teams should conduct their own assessment of risk and applicability to their environment. If exploit activity is detected, engage your incident response team and contact the Zephyr project or relevant vendors immediately. Source: NVD (public-domain), retrieved 2026-08-16. Analysis generated by SEC.co (claude-haiku-4-5).