CVE-2026-15890: crypto in zephyrproject zephyr
The default AEAD nonce provider for the PSA Internal Trusted Storage transform module, secure_storage_its_transform_aead_get_nonce() in subsys/secure_storage/src/its/transform/aead_get.c, stores its nonce counter in unsynchronized function-local static variables (s_nonce and s_nonce_initialized). Every ITS write obtains its AES-GCM or ChaCha20-Poly1305 nonce here via secure_storage_its_transform_to_store(). Because the function held no lock, two threads calling it concurrently race on the shared statics: the initialization path (psa_generate_random() followed by memcpy()) and the non-atomic increment-then-copy path can each hand the same nonce value to two distinct encryption operations, and can lose increments so the counter repeats values it was designed never to repeat. The ITS layer (secure_storage_its_set() in subsys/secure_storage/src/its/implementation.c) performs no serialization of its own, so concurrent same-UID writes reach the racy provider directly. Reusing a nonce with the same key under AES-GCM or ChaCha20-Poly1305 is a catastrophic AEAD failure: it leaks the XOR of the two plaintexts (ITS routinely stores secrets, including PSA persistent keys) and, for GCM, exposes the authentication key, enabling forgery of stored entries. Because the AEAD key is derived per entry UID, the security-relevant collision is two concurrent writes to the same UID both receiving the same nonce; an adversary able to read the raw backing storage can then exploit the reuse. Both ITS store back-ends shipped with Zephyr, zms.c and the settings/NVS back-end in settings.c, are log-structured flash stores with deferred garbage collection, so an entry superseded by a rewrite remains physically present in the partition until its sector is reclaimed. Two same-UID writes that race therefore leave both ciphertexts readable in the raw image at once, which is the condition the nonce reuse needs to be exploitable. The trigger remains narrow: both built-in key providers (DEVICE_ID_HASH and ENTRY_UID_HASH) salt the derived key with the entry UID, so reuse across different UIDs is harmless, and the exposure requires an application that writes the same UID concurrently from two threads. The fix serializes the provider with a K_MUTEX_DEFINE(s_nonce_mutex) held for the duration of nonce generation.
AI Analysis
Technical Summary
The vulnerability arises from the default AEAD nonce provider in Zephyr's PSA Internal Trusted Storage transform module, which stores its nonce counter in unsynchronized static variables. Concurrent calls to the nonce provider can race, causing the same nonce value to be used for multiple encryption operations under the same key. Since the AEAD key is derived per entry UID, nonce reuse is only security-critical for concurrent writes to the same UID. This nonce reuse can leak the XOR of plaintexts and, for AES-GCM, expose the authentication key, enabling forgery of stored entries. Both ITS store back-ends use log-structured flash storage, so superseded entries remain physically present, making the nonce reuse exploitable if an adversary can read raw storage. The fix introduces a mutex to serialize nonce generation, preventing race conditions.
Potential Impact
The vulnerability can lead to catastrophic AEAD failures including plaintext leakage and authentication key exposure, which compromises confidentiality and integrity of stored secrets such as PSA persistent keys. Exploitation requires concurrent writes to the same UID and access to raw storage, making the attack vector narrow but severe for affected use cases.
Mitigation Recommendations
A fix is available that serializes nonce generation using a mutex to prevent race conditions. Users should upgrade to Zephyr versions 4.3.2 or later in the 4.0.x series, or 4.4.2 or later in the 4.4.x series, where this issue is resolved. No additional mitigation is required if the fix is applied.
CVE-2026-15890: crypto in zephyrproject zephyr
Description
The default AEAD nonce provider for the PSA Internal Trusted Storage transform module, secure_storage_its_transform_aead_get_nonce() in subsys/secure_storage/src/its/transform/aead_get.c, stores its nonce counter in unsynchronized function-local static variables (s_nonce and s_nonce_initialized). Every ITS write obtains its AES-GCM or ChaCha20-Poly1305 nonce here via secure_storage_its_transform_to_store(). Because the function held no lock, two threads calling it concurrently race on the shared statics: the initialization path (psa_generate_random() followed by memcpy()) and the non-atomic increment-then-copy path can each hand the same nonce value to two distinct encryption operations, and can lose increments so the counter repeats values it was designed never to repeat. The ITS layer (secure_storage_its_set() in subsys/secure_storage/src/its/implementation.c) performs no serialization of its own, so concurrent same-UID writes reach the racy provider directly. Reusing a nonce with the same key under AES-GCM or ChaCha20-Poly1305 is a catastrophic AEAD failure: it leaks the XOR of the two plaintexts (ITS routinely stores secrets, including PSA persistent keys) and, for GCM, exposes the authentication key, enabling forgery of stored entries. Because the AEAD key is derived per entry UID, the security-relevant collision is two concurrent writes to the same UID both receiving the same nonce; an adversary able to read the raw backing storage can then exploit the reuse. Both ITS store back-ends shipped with Zephyr, zms.c and the settings/NVS back-end in settings.c, are log-structured flash stores with deferred garbage collection, so an entry superseded by a rewrite remains physically present in the partition until its sector is reclaimed. Two same-UID writes that race therefore leave both ciphertexts readable in the raw image at once, which is the condition the nonce reuse needs to be exploitable. The trigger remains narrow: both built-in key providers (DEVICE_ID_HASH and ENTRY_UID_HASH) salt the derived key with the entry UID, so reuse across different UIDs is harmless, and the exposure requires an application that writes the same UID concurrently from two threads. The fix serializes the provider with a K_MUTEX_DEFINE(s_nonce_mutex) held for the duration of nonce generation.
CVSS v3.1
Score 5.3medium
Affected software
zephyrproject
zephyr
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from the default AEAD nonce provider in Zephyr's PSA Internal Trusted Storage transform module, which stores its nonce counter in unsynchronized static variables. Concurrent calls to the nonce provider can race, causing the same nonce value to be used for multiple encryption operations under the same key. Since the AEAD key is derived per entry UID, nonce reuse is only security-critical for concurrent writes to the same UID. This nonce reuse can leak the XOR of plaintexts and, for AES-GCM, expose the authentication key, enabling forgery of stored entries. Both ITS store back-ends use log-structured flash storage, so superseded entries remain physically present, making the nonce reuse exploitable if an adversary can read raw storage. The fix introduces a mutex to serialize nonce generation, preventing race conditions.
Potential Impact
The vulnerability can lead to catastrophic AEAD failures including plaintext leakage and authentication key exposure, which compromises confidentiality and integrity of stored secrets such as PSA persistent keys. Exploitation requires concurrent writes to the same UID and access to raw storage, making the attack vector narrow but severe for affected use cases.
Mitigation Recommendations
A fix is available that serializes nonce generation using a mutex to prevent race conditions. Users should upgrade to Zephyr versions 4.3.2 or later in the 4.0.x series, or 4.4.2 or later in the 4.4.x series, where this issue is resolved. No additional mitigation is required if the fix is applied.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-07-15T17:38:06.560Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ab1a26455bf5e2cf5800119
Added to database: 09/21/2026, 21:32:20 UTC
Last enriched: 09/21/2026, 21:47:05 UTC
Last updated: 09/21/2026, 23:56:12 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.