Files
opendht/tests
Cyrille BéraudandCopilot b7d4cf35d0 net: reject malformed error and request fields
An error array was read at index 0 without checking its size, so a packet
carrying "e":[] dereferenced a null element pointer and crashed the process
on unauthenticated UDP input.

When a message had an error array but no "a", "r" or "u" map, the same object
was then walked through the map view of the msgpack union. A two-element array
appeared to hold two key/value pairs, reading past its allocation. A request
field that was not a map was never type-checked either.

Validate the error array size, restrict request parsing to "a", "r" and "u",
and require those to be maps. Add parser regressions for the empty error
array, the error-only message and the non-map request; the first one
segfaults without this change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-03 15:46:57 -04:00
..
2026-02-26 22:52:48 -05:00
2026-02-26 22:52:48 -05:00
2026-02-26 22:52:48 -05:00
2026-02-26 22:52:48 -05:00