{"id":"CVE-2026-82390","kind":"vulnerability","aliases":["CVE-2026-82390"],"related":[],"title":"Zephyr ESP32 AES driver: concurrent sessions run operations under the wrong key","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.\n\nAs 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.\n\nThe 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.\n\nThe 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.","summary":"The Espressif AES driver shares one set of hardware key and direction registers across all its sessions, and programs them only at session start outside the lock. An application holding two sessions with different keys can have one session's operations silently run under the other session's key or direction, causing data to be encrypted or decrypted with the wrong key.","severity":"low","cvss":3.7,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["crypto","embedded","esp32","runtime","zephyr"],"not_affected_if":["no-esp32-aes-driver","single-session-use"],"how_to_check":"- Check whether the application opens more than one AES session on the ESP32 crypto driver (drivers/crypto/crypto_esp32_aes.c) with different keys.\n- Check the Zephyr version in use and whether the driver includes the fix that reprograms the key inside aes_lock on every operation.","fix":"- Update Zephyr to a release that includes the fix moving key and direction programming into each operation under aes_lock (version unknown from the sources).\n- Until updated, avoid holding concurrent AES sessions with different keys on this driver.","status":"open","published_at":"2026-10-26T17:17:30+00:00","first_seen_at":"2026-10-26T17:31:22+00:00","triaged_at":"2026-10-26T17:33:31+00:00","updated_at":"2026-10-26T17:33:31+00:00","category":"runtime","confidence":0.6,"triage":{"at":"2026-10-26T17:33:31Z","model":"claude-haiku-5-5","output":{"fix":"- Update Zephyr to a release that includes the fix moving key and direction programming into each operation under aes_lock (version unknown from the sources).\n- Until updated, avoid holding concurrent AES sessions with different keys on this driver.","reach":"unknown","title":"Zephyr ESP32 AES driver: concurrent sessions run operations under the wrong key","impact":"medium","summary":"The Espressif AES driver shares one set of hardware key and direction registers across all its sessions, and programs them only at session start outside the lock. An application holding two sessions with different keys can have one session's operations silently run under the other session's key or direction, causing data to be encrypted or decrypted with the wrong key.","category":"runtime","nicknames":[],"who_cares":["zephyr","esp32","embedded","crypto"],"confidence":0.6,"needs_auth":"unknown","worst_case":"Data encrypted or decrypted under another session's key, possibly with direction inverted.","analyst_note":"Confirm the fixed Zephyr release version and check the NVD entry for the exact affected version range, since the sources give no version or fix details.","how_to_check":"- Check whether the application opens more than one AES session on the ESP32 crypto driver (drivers/crypto/crypto_esp32_aes.c) with different keys.\n- Check the Zephyr version in use and whether the driver includes the fix that reprograms the key inside aes_lock on every operation.","needs_analyst":true,"not_affected_if":["single-session-use","no-esp32-aes-driver"],"who_is_affected":"Only applications built on Zephyr for ESP32 that open two or more concurrent cipher sessions with different keys through the multi-session API. The sources state no in-tree Zephyr subsystem does this today; the 802.15.4 security layer uses CCM mode, which this driver rejects. Systems using a single session at a time, or no ESP32 AES driver, can skip it.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"low"},"cost_usd":0.000739,"input_tokens":3939,"output_tokens":690,"severity_before":"low"},"analyst_status":null,"analyst_note":null,"search":"'-2026':14A,17A '-82390':15A,18A '4':110C '802.15.4':394C 'access':429C 'across':37B 'advertis':91C 'ae':3A,26B,88C,106C,121C,137C,149C,161C,164C,168C,173C,431C,447C 'affect':348C 'also':246C 'anoth':335C,462C 'api':97C,423C 'applic':52B,322C,370C,414C 'attack':276C,343C,354C 'becom':350C 'begin':138C,237C,253C,261C,432C 'believ':323C 'block':176C 'carri':114C 'caus':75B,292C 'cbc':165C 'ccm':403C 'chip':128C,452C 'chip-glob':127C,451C 'cipher':96C,252C 'code':415C 'concurr':5A,376C 'config':103C 'connect':291C 'correct':230C 'corrupt':319C 'creation':281C 'crypto':19B,105C 'cryptograph':314C 'ctr':169C 'cve':13A,16A 'data':76B,320C 'decrypt':81B,333C,362C 'default':109C 'devic':284C 'differ':57B,198C,379C 'direct':35B,74B,119C,181C,215C,359C,439C 'document':419C 'driver':4A,27B,89C,383C,407C 'drivers/crypto/crypto_esp32_aes.c':90C 'ecb':162C 'embed':20B 'encrypt':79B,331C,360C 'error':218C 'esp32':2A,21B,104C 'espressif':25B,87C 'everi':200C,444C 'exact':142C 'exampl':286C 'exposur':367C 'failur':315C 'fall':412C 'first':205C,258C 'fix':425C 'free':241C 'global':129C,453C 'hal':174C 'hand':99C 'handler':160C 'happen':184C,225C 'hardwar':32B,428C 'hold':53B,186C,372C 'howev':123C 'impact':311C 'in-tre':385C 'independ':111C 'induc':279C 'influenc':300C 'insid':446C 'instal':298C 'invert':366C 'key':12A,33B,58B,72B,85B,117C,132C,179C,199C,213C,223C,274C,295C,302C,329C,339C,380C,437C 'know':344C 'land':255C 'layer':396C 'likewis':364C 'lock':50B,150C,228C,448C 'longer':457C 'make':265C 'max':108C 'memori':318C 'mode':134C,404C 'multi':94C,421C 'multi-sess':93C,420C 'mutex':151C 'observ':459C 'one':29B,61B,328C,341C 'op':163C,166C,170C,239C 'open':195C,399C 'oper':8A,64B,159C,202C,264C,267C,308C,357C,445C 'outsid':48B,147C,226C 'pattern':232C 'peer':289C 'per':158C 'per-oper':157C 'peripher':122C 'plaintext':349C 'program':42B,140C,224C 'protect':326C 'protocol':288C 'race':247C 'ran':172C 'rather':316C 'recover':351C 'regist':36B,135C,183C,454C 'reject':408C 'remov':426C 'report':220C 'reprogram':435C 'requir':368C 'resid':304C,338C 'result':189C 'risk':411C 'run':7A,66B,268C,309C 'runtim':22B 'second':192C,210C,249C,271C 'secur':395C 'serialis':153C 'session':6A,40B,46B,55B,62B,70B,95C,107C,112C,139C,145C,193C,206C,211C,245C,254C,280C,294C,377C,401C,422C,433C,463C 'set':30B,130C 'share':28B 'silent':65B,207C 'singl':126C 'stale':460C 'start':47B,146C 'subsequ':201C 'subsystem':389C 'suppli':346C 'thread':235C,250C,259C,272C 'today':392C 'top':442C 'transform':155C,175C 'tree':387C 'two':54B,373C,400C 'usag':231C 'use':208C,402C,417C 'versus':361C 'victim':307C 'whatev':178C 'whose':290C 'wrong':11A,84B 'zephyr':1A,23B,388C","nicknames":[],"mitigations":[],"who_affected":"Only applications built on Zephyr for ESP32 that open two or more concurrent cipher sessions with different keys through the multi-session API. The sources state no in-tree Zephyr subsystem does this today; the 802.15.4 security layer uses CCM mode, which this driver rejects. Systems using a single session at a time, or no ESP32 AES driver, can skip it.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-26T17:17:30+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","cvss_by":"vulnerabilities@zephyrproject.org","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-82390","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-82390","severity":null,"published_at":"2026-10-26T17:17:30+00:00","modified_at":"2026-10-26T17:17:30+00:00","first_seen_at":"2026-10-26T17:31:22+00:00","fetched_at":"2026-10-26T17:31:22+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}