🔍 CVE-2026-76787

5.9
CVSS Score
MEDIUM
2026-10-19
2026-10-20 19:59
✅ 완료

🇰🇷 한글 설명

UpdateHub의 FOTA 클라이언트가 CoAP 응답 내 JSON 데이터를 처리할 때 'sha256sum' 필드가 누락된 경우 NULL 포인터를 참조하여 시스템이 중단되는 취약점입니다. 공격자가 조작된 메타데이터를 전송하면 인증 없이도 원격에서 서비스 거부(DoS) 공격을 수행할 수 있습니다.

💡 쉬운 설명

업데이트 정보를 확인하는 과정에서 필수 정보가 빠진 가짜 정보를 보내 시스템을 멈추게 만드는 공격입니다. 인터넷을 통해 원격에서 기기를 강제로 재부팅시키거나 작동 불능 상태로 만들 수 있습니다.

🇺🇸 원문 (English)

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.

📍 영향받는 시스템

Zephyr OS 기반 UpdateHub 클라이언트 (CONFIG_UPDATEHUB_DTLS 미설정 시 취약)

⚔️ 공격 벡터

네트워크를 통한 조작된 CoAP 응답(JSON) 전송 (DNS 스푸핑 또는 중간자 공격)

🛡️ 대응 방법

sha256sum 필드의 NULL 여부를 검사하는 패치를 적용하거나 CONFIG_UPDATEHUB_DTLS를 활성화하여 인증을 강화해야 합니다.

🔧 검증 코드

코드 내에서 sha256sum 필드에 대한 NULL 체크 없이 strlen() 함수를 호출하는 부분이 있는지 확인합니다.

Shell / Script
grep -r "z_impl_updatehub_probe" . | grep "strlen(" | grep "sha256sum"

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Log Server