Executive brief
The UpdateHub subsystem in Zephyr RTOS, which manages firmware updates, contains an unsynchronized access flaw that allows local actors to trigger concurrent state corruption. An attacker with permission to initiate update operations can race against the background update handler to corrupt the subsystem's internal state, causing firmware-update operations to fail. The vulnerability is a local denial-of-service issue with no exposure of sensitive data or code execution capability.
Technical details
The vulnerability is a race condition and out-of-bounds write in subsys/mgmt/updatehub/updatehub.c. The UpdateHub management subsystem uses a single file-scope ctx structure to track CoAP block context, payload buffers, status codes, and socket state across multiple code paths. Access to ctx is not serialized, and the prepare_fds() function writes to ctx.fds[ctx.nfds] and increments ctx.nfds without bounds checking. Two independent execution paths mutate ctx concurrently: the background autohandler on the system workqueue and user-triggered operations via shell commands, API calls, or syscalls. When a second flow enters prepare_fds() while ctx.nfds is already 1, the write exceeds the one-element fds[1] array and corrupts adjacent ctx.sock/ctx.nfds members. Attack requires local access to invoke update operations and success depends on winning a timing race against the background handler. The fix adds mutex serialization and bounds checking.
Affected products
- Zephyr RTOS <UNKNOWN>
Timeline
- 2026-08-10: disclosed