Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-12233

CVE-2026-12233: PSA Protected Storage DoS Vulnerability

CVE-2026-12233 is a denial of service vulnerability in PSA Protected Storage that causes kernel panic through NULL pointer dereference. This article covers technical details, affected configurations, and mitigation strategies.

Published:

CVE-2026-12233 Overview

CVE-2026-12233 is an improper initialization vulnerability [CWE-665] in the Zephyr RTOS PSA Protected Storage credential backend. The file subsys/net/lib/tls_credentials/tls_credentials_trusted.c declares its credential-store mutex as a plain zero-filled static struct k_mutex credential_lock and never calls k_mutex_init() on it. Under contention, the kernel dereferences a NULL pointer in the mutex wait queue, causing a deterministic kernel panic. The defect only affects builds with CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE enabled on PSA Protected Storage or TF-M platforms.

Critical Impact

A remote attacker can trigger a device reset by initiating concurrent TLS handshakes against an affected Zephyr deployment, resulting in denial of service on embedded and IoT devices.

Affected Products

  • Zephyr RTOS builds with CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE enabled
  • PSA Protected Storage platforms using the TLS credentials subsystem
  • TF-M (Trusted Firmware-M) based Zephyr deployments handling TLS

Discovery Timeline

  • 2026-08-12 - CVE-2026-12233 published to NVD
  • 2026-08-12 - Last updated in NVD database

Technical Details for CVE-2026-12233

Vulnerability Analysis

The PSA Protected Storage credential backend declares its mutex statically without invoking the required initialization macro. A statically zero-filled k_mutex has an uninitialized wait queue where the dlist head and tail pointers are NULL instead of the self-referential sentinels that k_mutex_init() or K_MUTEX_DEFINE install.

The uncontended lock path never touches the wait queue, so the defect remains latent during serialized use. Standard testing with sequential credential operations completes successfully, masking the flaw during quality assurance.

When two execution contexts contend on the lock, k_mutex_lock() pends the blocking thread on the wait queue via z_pend_curr(). This function calls sys_dlist_append() on the zeroed list and dereferences a NULL tail pointer through the operation tail->next = node, faulting the kernel.

Root Cause

The root cause is missing initialization of a synchronization primitive [CWE-665]. Zephyr requires k_mutex structures to be initialized either via runtime k_mutex_init() calls or the compile-time K_MUTEX_DEFINE macro. The credential backend used neither, leaving the wait queue linked list in an invalid zeroed state.

Attack Vector

The lock is held during TLS handshake credential loading and by all credential add, get, and delete operations. A deployment performing concurrent TLS handshakes, such as a server handling multiple simultaneous connections from a remote peer, can trigger the dereference. A credential-management operation running concurrently with a handshake produces the same result. The default volatile RAM backend initializes its lock correctly and is unaffected.

c
 static psa_storage_uid_t credentials_toc[CRED_MAX_SLOTS];
 
 /* A mutex for protecting access to the credentials array. */
-static struct k_mutex credential_lock;
+static K_MUTEX_DEFINE(credential_lock);
 
 /* Construct PSA PS uid from tag & type */
 static inline psa_storage_uid_t tls_credential_get_uid(uint32_t tag,

Source: Zephyr GitHub Commit 29581d5. The patch replaces the uninitialized static declaration with K_MUTEX_DEFINE, which installs valid sentinel pointers in the wait queue at compile time.

Detection Methods for CVE-2026-12233

Indicators of Compromise

  • Unexpected kernel panic or device reset coinciding with incoming TLS connection attempts
  • Crash logs referencing sys_dlist_append, z_pend_curr, or k_mutex_lock in the fault backtrace
  • Device reboots triggered when multiple simultaneous TLS handshakes arrive at the affected endpoint

Detection Strategies

  • Audit Zephyr build configurations for CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=y combined with pre-patch source
  • Review firmware images for the vulnerable tls_credentials_trusted.c declaration pattern
  • Correlate device availability telemetry with inbound TLS connection burst events

Monitoring Recommendations

  • Monitor embedded device uptime metrics for unexplained resets on TLS-enabled endpoints
  • Collect and centralize crash dumps from Zephyr devices to identify NULL dereferences in kernel scheduling paths
  • Track network telemetry for concurrent TLS handshake attempts against IoT fleets running Zephyr

How to Mitigate CVE-2026-12233

Immediate Actions Required

  • Apply the upstream Zephyr patch from commit 29581d586f3d68ec8bb1448b522e5470d4a06aa9 to affected firmware builds
  • Inventory deployed devices to identify those built with CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE enabled
  • Rebuild and redistribute firmware to production devices through your existing OTA update pipeline

Patch Information

The fix initializes the mutex statically with K_MUTEX_DEFINE(credential_lock), providing a valid wait queue so the contended path no longer touches a NULL list. See the GitHub Security Advisory GHSA-57c4-xcq2-fqj7 and the upstream commit for full patch details.

Workarounds

  • Switch to the default volatile RAM credential backend by disabling CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE where PSA storage is not required
  • Serialize TLS handshake handling in application code to prevent contention on the credential lock
  • Rate-limit inbound TLS connections at a network gateway to reduce the probability of concurrent handshakes
bash
# Configuration example: disable the vulnerable backend in prj.conf
# CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE=n
# Use the default volatile backend instead
CONFIG_TLS_CREDENTIALS=y
CONFIG_TLS_CREDENTIALS_BACKEND_VOLATILE=y

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.