Description
The Espressif AES driver drivers/crypto/crypto_esp32_aes.c advertises a multi-session cipher API — it hands out up to CONFIG_ESP32_CRYPTO_AES_SESSIONS_MAX (default 4) independent sessions, each carrying its own key and direction. The AES peripheral, however, has a single chip-global set of key and mode registers, and aes_begin_session() programmed them exactly once, at session start, outside the aes_lock mutex that serialises the transforms. The per-operation handlers aes_ecb_op(), aes_cbc_op() and aes_ctr_op() then ran aes_hal_transform_block() against whatever key and direction the registers happened to hold.

As a result, once a second session is opened with a different key, every subsequent operation on the first session silently uses the second session's key and direction, and no error is reported. Because the key programming happened outside the lock, the correct usage pattern of "each thread does begin, then op, then free on its own session" also races: a second thread's cipher_begin_session() landing between the first thread's begin and its operation makes that operation run under the second thread's key. An attacker who can induce session creation on the device — for example a protocol peer whose connection causes a session key to be installed — can influence which key is resident when a victim operation runs.

The impact is a cryptographic failure rather than memory corruption: data the application believed it was protecting under one key is encrypted or decrypted under another. Where the resident key is one the attacker knows or supplied, the affected plaintext becomes recoverable by that attacker, and the operation's direction (encrypt versus decrypt) can likewise be inverted. Exposure requires an application that holds two or more concurrent sessions with different keys against this driver; no in-tree Zephyr subsystem does so today (the 802.15.4 security layer, which does open two sessions, uses CCM mode, which this driver rejects), so the risk falls on application code that uses the documented multi-session API.

The fix removes all hardware access from aes_begin_session() and reprograms the key and direction at the top of every operation, inside aes_lock, so the chip-global registers can no longer be observed stale by another session.
Published: 2026-10-26
Score: 3.7 Low
EPSS: n/a
KEV: No
Impact: Confidentiality Compromise due to AES key mis‑management
Action: Apply Patch
AI Analysis

Impact

The Espressif AES driver in Zephyr exposes a multi‑session API that should provide distinct keys per session. However, the driver programs the hardware key registers outside the session‑level mutex, so the registers are overwritten by any subsequent session. When a second session is opened with a different key, further operations on the first session silently use the second session’s key and mode. This race condition (CWE-362) can be induced by a protocol peer that creates a new session, allowing an attacker to control which key is resident during a victim’s operation. The result is a cryptographic failure: data the application believes is protected with one key may in fact be encrypted or decrypted with an attacker‑known key, exposing plaintext or inverting the operation. Because the flaw only affects key management, no memory corruption occurs, but confidentiality is compromised.

Affected Systems

Zephyr Project’s Zephyr RTOS, specifically the Espressif ESP32 hardware crypto driver. The vulnerability arises when an application opens two or more concurrent AES sessions with distinct keys. No built‑in Zephyr subsystem currently uses multiple sessions, so the risk lies with third‑party application code.

Risk and Exploitability

The CVSS score of 3.7 indicates a low severity. The EPSS score is not available and the vulnerability is not listed in CISA’s KEV catalog. The likely attack vector is via a protocol that triggers session creation on the device, giving an attacker remote influence over the key state. While the flaw does not directly trigger memory corruption or obvious denial‑of‑service, the ability to switch keys can lead to data exposure or operation inversion. The risk is therefore low and contingent upon the application’s use of multi‑session AES calls.

Generated by OpenCVE AI on October 26, 2026 at 18:39 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the Zephyr patch that removes hardware access from aes_begin_session() and reprograms the key and mode inside each operation’s mutex.
  • Inspect application code to ensure that at most one AES session is active at any time, or configure the driver to disallow multi‑session usage if supported.
  • After patching, review any third‑party libraries that invoke the Zephyr AES API to confirm they do not create concurrent sessions with different keys.

Generated by OpenCVE AI on October 26, 2026 at 18:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 26 Oct 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 26 Oct 2026 18:15:00 +0000

Type Values Removed Values Added
First Time appeared Zephyrproject
Zephyrproject zephyr
Vendors & Products Zephyrproject
Zephyrproject zephyr

Mon, 26 Oct 2026 16:30:00 +0000

Type Values Removed Values Added
Description The Espressif AES driver drivers/crypto/crypto_esp32_aes.c advertises a multi-session cipher API — it hands out up to CONFIG_ESP32_CRYPTO_AES_SESSIONS_MAX (default 4) independent sessions, each carrying its own key and direction. The AES peripheral, however, has a single chip-global set of key and mode registers, and aes_begin_session() programmed them exactly once, at session start, outside the aes_lock mutex that serialises the transforms. The per-operation handlers aes_ecb_op(), aes_cbc_op() and aes_ctr_op() then ran aes_hal_transform_block() against whatever key and direction the registers happened to hold. As a result, once a second session is opened with a different key, every subsequent operation on the first session silently uses the second session's key and direction, and no error is reported. Because the key programming happened outside the lock, the correct usage pattern of "each thread does begin, then op, then free on its own session" also races: a second thread's cipher_begin_session() landing between the first thread's begin and its operation makes that operation run under the second thread's key. An attacker who can induce session creation on the device — for example a protocol peer whose connection causes a session key to be installed — can influence which key is resident when a victim operation runs. The impact is a cryptographic failure rather than memory corruption: data the application believed it was protecting under one key is encrypted or decrypted under another. Where the resident key is one the attacker knows or supplied, the affected plaintext becomes recoverable by that attacker, and the operation's direction (encrypt versus decrypt) can likewise be inverted. Exposure requires an application that holds two or more concurrent sessions with different keys against this driver; no in-tree Zephyr subsystem does so today (the 802.15.4 security layer, which does open two sessions, uses CCM mode, which this driver rejects), so the risk falls on application code that uses the documented multi-session API. The fix removes all hardware access from aes_begin_session() and reprograms the key and direction at the top of every operation, inside aes_lock, so the chip-global registers can no longer be observed stale by another session.
Title Cross-session AES key confusion in the Espressif ESP32 hardware crypto driver
Weaknesses CWE-362
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N'}


Subscriptions

Zephyrproject Zephyr
cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-10-26T17:37:10.530Z

Reserved: 2026-08-28T21:11:44.241Z

Link: CVE-2026-82390

cve-icon Vulnrichment

Updated: 2026-10-26T17:35:17.842Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-26T17:17:30.883

Modified: 2026-10-26T18:34:17.050

Link: CVE-2026-82390

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-26T18:45:14Z

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')