{"id":"CVE-2026-11812","aliases":["CVE-2026-11812"],"related":[],"kind":"vulnerability","state":"published","title":"UpdateHub: race condition on shared context causes out-of-bounds write and DoS","summary":"The UpdateHub management subsystem (subsys/mgmt/updatehub/updatehub.c) drives every update operation through a single file-scope ctx structure that holds the CoAP block context, payload buffer, status code, socket, and a one-element poll-fd array fds[1]. Access to ctx was not serialized, and prepare_fds() wrote ctx.fds[ctx.nfds] and incremented ctx.nfds with no bounds check.\n\nTwo independent paths mutate ctx concurrently: the background autohandler running on the system workqueue, and user-triggered operations reached through the updatehub run shell command, direct API calls, or — since the operations are exposed as syscalls — userspace threads. When a second flow enters prepare_fds() while ctx.nfds is already 1, the write lands one element past the array; by struct layout it overlaps the adjacent ctx.sock/ctx.nfds members. More broadly, the unsynchronized sharing lets two flows interleave connection setup and teardown, double-closing a socket descriptor or scribbling the shared buffers.\n\nThe result is corruption of the update subsystem's internal state and denial of service of the firmware-update path; the out-of-bounds write is contained within the ctx structure and there is no demonstrated path to memory outside it or to code execution. Triggering requires a local actor able to invoke update operations (or, with CONFIG_USERSPACE, an unprivileged userspace thread) and to win a timing race against the background handler; remote peers cannot control the race timing. The fix serializes the entry points with a mutex and adds a bounds check to prepare_fds().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The UpdateHub management subsystem (subsys/mgmt/updatehub/updatehub.c) drives every update operation through a single file-scope ctx structure that holds the CoAP block context, payload buffer, status code, socket, and a one-element poll-fd array fds[1]. Access to ctx was not serialized, and prepare_fds() wrote ctx.fds[ctx.nfds] and incremented ctx.nfds with no bounds check.\n\nTwo independent paths mutate ctx concurrently: the background autohandler running on the system workqueue, and user-triggered operations reached through the updatehub run shell command, direct API calls, or — since the operations are exposed as syscalls — userspace threads. When a second flow enters prepare_fds() while ctx.nfds is already 1, the write lands one element past the array; by struct layout it overlaps the adjacent ctx.sock/ctx.nfds members. More broadly, the unsynchronized sharing lets two flows interleave connection setup and teardown, double-closing a socket descriptor or scribbling the shared buffers.\n\nThe result is corruption of the update subsystem's internal state and denial of service of the firmware-update path; the out-of-bounds write is contained within the ctx structure and there is no demonstrated path to memory outside it or to code execution. Triggering requires a local actor able to invoke update operations (or, with CONFIG_USERSPACE, an unprivileged userspace thread) and to win a timing race against the background handler; remote peers cannot control the race timing. The fix serializes the entry points with a mutex and adds a bounds check to prepare_fds().","source":"cvelist"},{"lang":"es","text":"El subsistema de gestión de UpdateHub (subsys/mgmt/updatehub/updatehub.c) impulsa cada operación de actualización a través de una única estructura ctx de ámbito de archivo que contiene el contexto del bloque CoAP, el búfer de carga útil, el código de estado, el socket y un array poll-fd de un elemento fds[1]. El acceso a ctx no estaba serializado, y prepare_fds() escribió ctx.fds[ctx.nfds] e incrementó ctx.nfds sin una comprobación de límites.\n\nDos rutas independientes mutan ctx concurrentemente: el autogestor en segundo plano ejecutándose en la cola de trabajo del sistema, y operaciones activadas por el usuario a las que se accede a través del comando de shell updatehub run, llamadas directas a la API, o - dado que las operaciones se exponen como llamadas al sistema (syscalls) - hilos de espacio de usuario. Cuando un segundo flujo entra en prepare_fds() mientras ctx.nfds ya es 1, la escritura se produce un elemento más allá del array; por la disposición de la estructura, se superpone a los miembros adyacentes ctx.sock/ctx.nfds. En términos más generales, el intercambio no sincronizado permite que dos flujos intercalen el establecimiento y la desconexión de la conexión, cerrando dos veces un descriptor de socket o sobrescribiendo los búferes compartidos.\n\nEl resultado es la corrupción del estado interno del subsistema de actualización y la denegación de servicio de la ruta de actualización del firmware; la escritura fuera de límites está contenida dentro de la estructura ctx y no hay una ruta demostrada a la memoria fuera de ella o a la ejecución de código. El desencadenamiento requiere un actor local capaz de invocar operaciones de actualización (o, con CONFIG_USERSPACE, un hilo de espacio de usuario sin privilegios) y de ganar una carrera de tiempo contra el gestor en segundo plano; los pares remotos no pueden controlar el tiempo de la carrera. La solución serializa los puntos de entrada con un mutex y añade una comprobación de límites a prepare_fds().","source":"nvd"}],"published":"2026-08-10T23:09:17.542Z","modified":"2026-11-04T05:18:30.557Z","severity":{"scorer":"zephyr","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L","score":2.5,"rating":"LOW"},"severities":[{"scorer":"zephyr","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L","score":2.5,"rating":"LOW"}],"cwes":["CWE-362"],"affected":[{"ranges":[{"type":"semver","introduced":"2.0.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/551d3f92b36e9604f039101c4e4f623682d02159","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-vprh-rff6-46xp","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"zephyr","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-08-12T18:51:06.812Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-11812","url":"https://www.cve.org/CVERecord?id=CVE-2026-11812","licence":"CVE Terms of Use","modified":"2026-11-04T04:59:15.164Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-11812","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-11812","licence":"Public domain","modified":"2026-11-04T05:18:30.557Z"}],"updatedAt":"2026-11-25T22:59:32.180Z","epss":{"score":0.00081,"percentile":0.0019,"date":"2026-12-01T12:00:22.000Z"}}