{"id":"CVE-2026-12233","aliases":["CVE-2026-12233"],"related":[],"kind":"vulnerability","state":"published","title":"Uninitialized mutex in TLS trusted-credential backend causes kernel NULL-deref DoS under contention","summary":"The PSA Protected Storage credential backend (subsys/net/lib/tls_credentials/tls_credentials_trusted.c) declared its credential-store mutex as a plain zero-filled static struct k_mutex credential_lock; and never called k_mutex_init() on it. A statically zero-filled k_mutex has an uninitialized wait queue (its dlist head/tail are NULL instead of the self-referential sentinels that k_mutex_init/K_MUTEX_DEFINE install). The uncontended lock path does not touch the wait queue, so the defect is latent and serialized use behaves correctly.\n\nWhen two execution contexts contend on the lock, k_mutex_lock() pends the blocking thread on the wait queue via z_pend_curr(), which calls sys_dlist_append() on the zeroed list and dereferences a NULL tail pointer (tail->next = node), faulting the kernel. The lock is held during TLS handshake credential loading and by all credential add/get/delete operations, so a deployment performing concurrent TLS handshakes (for example a server handling multiple simultaneous connections from a remote peer) or a credential-management operation concurrent with a handshake can trigger the dereference.\n\nThe impact is a denial of service: a deterministic kernel panic / device reset on the first contention. There is no memory corruption beyond the NULL dereference and no confidentiality or integrity impact; mutual exclusion on the fast path remains correct. Exposure is limited to builds with CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE enabled (PSA Protected Storage / TF-M platforms); the default volatile RAM backend initializes its lock correctly and is unaffected.\n\nThe fix initializes the mutex statically with K_MUTEX_DEFINE(credential_lock), providing a valid wait queue so the contended path no longer touches a NULL list.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The PSA Protected Storage credential backend (subsys/net/lib/tls_credentials/tls_credentials_trusted.c) declared its credential-store mutex as a plain zero-filled static struct k_mutex credential_lock; and never called k_mutex_init() on it. A statically zero-filled k_mutex has an uninitialized wait queue (its dlist head/tail are NULL instead of the self-referential sentinels that k_mutex_init/K_MUTEX_DEFINE install). The uncontended lock path does not touch the wait queue, so the defect is latent and serialized use behaves correctly.\n\nWhen two execution contexts contend on the lock, k_mutex_lock() pends the blocking thread on the wait queue via z_pend_curr(), which calls sys_dlist_append() on the zeroed list and dereferences a NULL tail pointer (tail->next = node), faulting the kernel. The lock is held during TLS handshake credential loading and by all credential add/get/delete operations, so a deployment performing concurrent TLS handshakes (for example a server handling multiple simultaneous connections from a remote peer) or a credential-management operation concurrent with a handshake can trigger the dereference.\n\nThe impact is a denial of service: a deterministic kernel panic / device reset on the first contention. There is no memory corruption beyond the NULL dereference and no confidentiality or integrity impact; mutual exclusion on the fast path remains correct. Exposure is limited to builds with CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE enabled (PSA Protected Storage / TF-M platforms); the default volatile RAM backend initializes its lock correctly and is unaffected.\n\nThe fix initializes the mutex statically with K_MUTEX_DEFINE(credential_lock), providing a valid wait queue so the contended path no longer touches a NULL list.","source":"cvelist"},{"lang":"es","text":"El backend de credenciales de PSA Protected Storage (subsys/net/lib/tls_credentials/tls_credentials_trusted.c) declaró su mutex de almacén de credenciales como una struct k_mutex credential_lock estática simple rellenada con ceros; y nunca llamó a k_mutex_init() sobre ella. Un k_mutex rellenado con ceros estáticamente tiene una cola de espera no inicializada (su cabeza/cola de dlist son NULL en lugar de los centinelas autorreferenciales que instalan k_mutex_init/K_MUTEX_DEFINE). La ruta de bloqueo sin contención no toca la cola de espera, por lo que el defecto es latente y el uso serializado se comporta correctamente.\n\nCuando dos contextos de ejecución compiten por el bloqueo, k_mutex_lock() suspende el hilo bloqueante en la cola de espera a través de z_pend_curr(), que llama a sys_dlist_append() en la lista con ceros y desreferencia un puntero de cola NULL (tail  ->  next = node), provocando un fallo en el kernel. El bloqueo se mantiene durante la carga de credenciales del handshake TLS y por todas las operaciones de añadir/obtener/eliminar credenciales, por lo que un despliegue que realice handshakes TLS concurrentes (por ejemplo, un servidor que maneja múltiples conexiones simultáneas de un par remoto) o una operación de gestión de credenciales concurrente con un handshake puede desencadenar la desreferencia.\n\nEl impacto es una denegación de servicio: un pánico de kernel determinista / reinicio del dispositivo en la primera contención. No hay corrupción de memoria más allá de la desreferencia NULL y ningún impacto en la confidencialidad o integridad; la exclusión mutua en la ruta rápida sigue siendo correcta. La exposición se limita a las compilaciones con CONFIG_TLS_CREDENTIALS_BACKEND_PROTECTED_STORAGE habilitado (plataformas PSA Protected Storage / TF-M); el backend de RAM volátil predeterminado inicializa su bloqueo correctamente y no se ve afectado.\n\nLa solución inicializa el mutex estáticamente con K_MUTEX_DEFINE(credential_lock), proporcionando una cola de espera válida para que la ruta con contención ya no toque una lista NULL.","source":"nvd"}],"published":"2026-08-12T03:54:38.100Z","modified":"2026-11-04T05:18:38.073Z","severity":{"scorer":"zephyr","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"zephyr","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"}],"cwes":["CWE-665"],"affected":[{"ranges":[{"type":"semver","introduced":"3.2.0","fixed":"4.3.2","status":"affected"},{"type":"semver","introduced":"4.4.0","fixed":"4.4.2","status":"affected"}],"vendor":"zephyrproject","product":"zephyr","package":"zephyr","source":"cvelist"}],"references":[{"url":"https://github.com/zephyrproject-rtos/zephyr/commit/29581d586f3d68ec8bb1448b522e5470d4a06aa9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-57c4-xcq2-fqj7","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"zephyr","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-13T15:09:49.771Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-12233","url":"https://www.cve.org/CVERecord?id=CVE-2026-12233","licence":"CVE Terms of Use","modified":"2026-11-04T04:59:22.323Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-12233","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12233","licence":"Public domain","modified":"2026-11-04T05:18:38.073Z"}],"updatedAt":"2026-11-25T22:59:32.538Z","epss":{"score":0.00307,"percentile":0.25285,"date":"2026-12-01T12:00:22.000Z"}}