Skip to content
Heist/ feed
Back to feed
Low

Cross-session AES key confusion in the Espressif ESP32 hardware crypto driver

Type: advisorySources: Official CVE List

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 und

Products
zephyr
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-82390
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 16:00 UTC · Revision 1

Source evidence

Cross-session AES key confusion in the Espressif ESP32 hardware crypto driver

core-cve · Original source

Published 26 Oct 2026, 16:08 UTC

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 und

cve:CVE-2026-82390

zephyr

Fixed versions: Not specified

Complete source record
{
  "id": "f9800dda2b25ce87e5ba25353c3aae85993f4b291829f93a091cd5b3c7adc63b",
  "url": "https://www.cve.org/CVERecord?id=CVE-2026-82390",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Cross-session AES key confusion in the Espressif ESP32 hardware crypto driver",
    "summary": "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 und",
    "evidence": "cve:CVE-2026-82390",
    "products": [
      {
        "name": {
          "value": "zephyr",
          "evidence": "/containers/cna/affected/0/product"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": []
      }
    ],
    "severity": "low",
    "structured": {
      "id": "CVE-2026-82390",
      "aliases": [
        "CVE-2026-82390"
      ],
      "metrics": [
        {
          "format": "CVSS",
          "cvssV3_1": {
            "version": "3.1",
            "baseScore": 3.7,
            "baseSeverity": "LOW",
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
          }
        }
      ],
      "affected": [
        {
          "vendor": "zephyrproject",
          "product": "zephyr",
          "versions": [
            {
              "status": "affected",
              "version": "4.3.0",
              "versionType": "semver",
              "lessThanOrEqual": "4.4.2"
            }
          ],
          "packageName": "zephyr",
          "programFiles": [
            "drivers/crypto/crypto_esp32_aes.c"
          ],
          "collectionURL": "https://github.com/zephyrproject-rtos/zephyr",
          "defaultStatus": "unaffected",
          "programRoutines": [
            {
              "name": "aes_begin_session"
            },
            {
              "name": "aes_cbc_op"
            },
            {
              "name": "aes_ctr_op"
            },
            {
              "name": "aes_ecb_op"
            }
          ]
        }
      ],
      "modified": "2026-10-26T17:37:10.530Z",
      "provider": "cve",
      "references": [
        "https://github.com/zephyrproject-rtos/zephyr/commit/cb4168ab3f6bd1bfc26060fd33cfcd00e8e641f1",
        "https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-rvww-w3mx-r99q"
      ],
      "provider_metadata": {
        "adp": [
          {
            "title": "CISA ADP Vulnrichment",
            "metrics": [
              {
                "other": {
                  "type": "ssvc",
                  "content": {
                    "id": "CVE-2026-82390",
                    "role": "CISA Coordinator",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "version": "2.0.3",
                    "timestamp": "2026-10-26T16:49:07.670669Z"
                  }
                }
              }
            ],
            "providerMetadata": {
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP",
              "dateUpdated": "2026-10-26T17:37:10.530Z"
            }
          }
        ],
        "cna": {
          "orgId": "e2e69745-5e70-4e92-8431-deb5529a81ad",
          "shortName": "zephyr",
          "dateUpdated": "2026-10-26T16:08:54.724Z"
        }
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-82390",
        "evidence": "/cveMetadata/cveId"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/containers/cna/metrics"
  },
  "source_id": "core-cve",
  "document_id": 326396,
  "published_at": "2026-10-26T16:08:54.724+00:00"
}