CVE-2026-15890: AEAD nonce reuse in Zephyr secure_storage ITS default nonce provider due to missing thread synchronization
The default AEAD nonce provider for the PSA Internal Trusted Storage transform module, securestorageitstransformaeadgetnonce() in subsys/securestorage/src/its/transform/aeadget.c, stores its nonce counter in unsynchronized function-local static variables (snonce and snonceinitialized). Every ITS write obtains its AES-GCM or ChaCha20-Poly1305 nonce here via securestorageitstransformtostore().
Because the function held no lock, two threads calling it concurrently race on the shared statics: the initialization path (psageneraterandom() 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 (securestorageitsset() in subsys/securestorage/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 (DEVICEIDHASH and ENTRYUIDHASH) 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 KMUTEXDEFINE(snoncemutex) held for the duration of nonce generation.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments using Zephyr's PSA Internal Trusted Storage transform module with its default AEAD nonce provider are exposed when multiple threads can perform ITS writes concurrently. The ITS layer does not serialize those writes before they reach the nonce provider.
What access would an attacker need?
The supplied vector indicates local access, low privileges, and high attack complexity. Exploitation also depends on causing concurrent ITS write activity that reaches the shared nonce-generation state.
Are default configurations affected?
Yes. The affected component is explicitly the default AEAD nonce provider used by the ITS transform module.