PT-2026-117650 · Zephyrproject · Zephyr

CVE-2026-76787

·

تاريخ النشر

2026-10-19

·

تاريخ التحديث

2026-10-19

CVSS v3.1

5.9

متوسطة

المتجهAV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
The UpdateHub firmware-over-the-air client parses the CoAP probe response with Zephyr's JSON library in z impl updatehub probe() (subsys/mgmt/updatehub/updatehub.c). The decoder treats every descriptor field as optional — json obj parse() returns a bitmask of the fields it actually decoded and never fails on a missing one — so a response that omits the "sha256sum" string leaves the corresponding const char * in the zero-initialised struct resp probe any boards / struct resp probe some boards at NULL. Both metadata branches then computed sha256size = strlen(...objects.sha256sum) + 1 before any validation, dereferencing that NULL pointer; the SHA256 HEX DIGEST SIZE test that follows operates on a value the bad read has already produced and cannot prevent it.
The metadata is supplied entirely by the network peer: probe cb() accepts the datagram, runs coap packet parse() and copies the payload with no token matching and no cryptographic check. With CONFIG UPDATEHUB DTLS unset — the default — start coap client() uses plain CoAP over UDP on port 5683 with no peer authentication and resolves the server via unauthenticated DNS, so an on-path attacker, a DNS spoofer, or an off-path attacker who wins the race with a forged source address can deliver the malformed metadata. A probe response as simple as "objects":[[{}],[{}]] suffices, and no user interaction is required because updatehub autohandler() polls on CONFIG UPDATEHUB POLL INTERVAL. When CONFIG UPDATEHUB DTLS=y the trigger narrows to a malicious or compromised update server.
The primitive is a read at address zero, not a write, so the impact is availability only. On targets where the low address range is unmapped or protected — MMU-based architectures, builds with CONFIG NULL POINTER EXCEPTION DETECTION DWT/ MPU/ PMP, TrustZone non-secure images, and SoCs such as nRF54L whose 0x0–0x400 window is unmapped — the load faults and Zephyr's default fatal handler halts the system, giving a remotely re-triggerable denial of service on every poll. On classic Cortex-M targets where the vector table is readable at address zero the walk usually terminates immediately and the request is rejected by the length check, so the outcome is configuration- and SoC-dependent. There is no memory write, and the copied bytes are only compared against the locally computed image hash, so there is no information-disclosure channel.
The fix adds an explicit sha256sum == NULL test that returns UPDATEHUB METADATA ERROR ahead of the strlen() in both metadata branches. Debug builds (CONFIG UPDATEHUB LOG LEVEL=4) still format the same pointers with %s in a LOG DBG() loop that runs before the new checks, so that variant remains in debug configurations only.

إصلاح

NULL Pointer Dereference

وجدت خطأً في الوصف؟ لديك ما تضيفه؟ لا تتردد في مراسلتنا 👾

تصنيف نقاط الضعف

المعرّفات ذات الصلة

CVE-2026-76787

المنتجات المتأثرة

Zephyr