Direct naar de inhoud
⚡ Kritieke cyberalerts voor jouw sector & systemen — direct in je inbox. Aanmelden →
cybernieuws.nl Cybersecurity en informatiebeveiling nieuws alerts live · 4 min 121 bronnen 1 kritiek 22 vandaag
CVE's Videos Dagbriefing

← Terug naar CVE-database

CVE-2026-10849

HIGH · 8.2 CVSS Gepubliceerd: CWE-122

Beschrijving NL

De hawkBit-apparaatbeheerclient in subsys/mgmt/hawkbit accumuleert de body van een HTTP-reactie van de updateserver in een heapbuffer in response_json_cb() (subsys/mgmt/hawkbit/hawkbit.c). De buffer heeft de grootte om de ontvangen body-bytes vast te houden, maar reserveert geen ruimte voor een terminerende nul. Wanneer het volledige antwoord is aangekomen, schrijft de code response_data[gedownload_grootte] = '' — en wanneer de geaccumuleerde lichaamslengte gelijk is aan de toewijzing, landt die terminator één byte voorbij het einde van het heapobject (een heap-based out-of-bounds write, CWE-122 / CWE-787). De lichaamslengte en fragmentatie worden rechtstreeks overgenomen van de geparseerde HTTP-respons (rsp- >body_frag_start / rsp->body_frag_len) en worden volledig beheerd door de externe hawkBit-server, die zijn eigen reactielengte kiest. De precieze trigger hangt af van hoe de buffer groeit en beide vormen zijn op afstand bereikbaar. Sinds v4.0.0 is de herallocatie gedownloade_size + body_len, dus elke respons body groter dan de initiële buffer van 1100 bytes maakt de out-of-bounds schrijven deterministisch; dergelijke responsgroottes zijn normaal voor hawkBit implementatie metadata. Vóór v4.0.0 groeide de buffer door verdubbeling en de groeicontrole ((gedownload_size + body_len) > response_buffer_size) is onwaar bij gelijkheid, dus een responsorgaan waarvan de lengte precies de huidige toewijzing is — 1100 bytes met de standaard initiële buffer — slaat de herverdeling volledig over en schrijft de terminator op response_data[1100] van een 1100-byte object. De HTTP-lengte-mismatchcontrole vangt dit niet op, omdat de aangegeven en ontvangen lengtes het er echt mee eens zijn. Beide vormen zijn bereikbaar via een kwaadwillende, gecompromitteerde of man-in-the-middle updateserver (TLS is optioneel en beschermt, indien ingeschakeld, niet tegen een vijandige server), zonder authenticatie van responsinhoud en zonder limiet aan de clientzijde die het schrijven beschermt. Het out-of-bounds schrijven is een vaste enkele NUL-byte onmiddellijk na de toewijzing, waardoor de metagegevens van de aangrenzende allocator of de volgende toewijzing worden beschadigd. De praktische impact is heap-corruptie die leidt tot denial of service (fout bij een volgende toewijzing of gratis), met de begrensde, allocator-afhankelijke mogelijkheid van verdere corruptie. De fix past de buffer aan op de lichaamslengte plus één en kopieert met memcpy, zodat de terminator altijd binnen de toewijzing terechtkomt.

Origineel (Engels) tonen

The hawkBit device management client in subsys/mgmt/hawkbit accumulates the body of an HTTP response from the update server into a heap buffer in response_json_cb() (subsys/mgmt/hawkbit/hawkbit.c). The buffer is sized to hold the received body bytes but reserves no space for a terminating NUL. When the full response has arrived, the code writes response_data[downloaded_size] = '' — and whenever the accumulated body length equals the allocation, that terminator lands one byte past the end of the heap object (a heap-based out-of-bounds write, CWE-122 / CWE-787).

The body length and fragmentation are taken directly from the parsed HTTP response (rsp->body_frag_start / rsp->body_frag_len) and are fully controlled by the remote hawkBit server, which chooses its own response length. The precise trigger depends on how the buffer grows, and both forms are remotely reachable. Since v4.0.0 the reallocation is sized to exactly downloaded_size + body_len, so any response body larger than the 1100-byte initial buffer makes the out-of-bounds write deterministic; such response sizes are normal for hawkBit deployment metadata. Before v4.0.0 the buffer grew by doubling and the growth check ((downloaded_size + body_len) > response_buffer_size) is false at equality, so a response body whose length is exactly the current allocation — 1100 bytes with the default initial buffer — skips the reallocation entirely and writes the terminator at response_data[1100] of an 1100-byte object. The HTTP length-mismatch check does not catch this, because the declared and received lengths genuinely agree. Either form is reachable by a malicious, compromised, or man-in-the-middle update server (TLS is optional and, when enabled, does not protect against a hostile server), with no authentication of response content and no client-side length cap protecting the write.

The out-of-bounds write is a fixed single NUL byte immediately following the allocation, corrupting adjacent allocator metadata or the next allocation. The practical impact is heap corruption leading to denial of service (fault on a subsequent allocation or free), with the bounded, allocator-dependent possibility of further corruption. The fix sizes the buffer to the body length plus one and copies with memcpy, ensuring the terminator always lands within the allocation.

Vendors

Zephyrproject

Affected products

Zephyr

References