You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFC 7252: reject malformed datagrams before dispatch #20
At baseline 1abe69a, the decoder path needs an explicit malformed-datagram boundary. The current DatagramReader can return zero-filled bytes when the input is truncated, and the endpoint does not consistently gate dispatch on IsWellFormed. This can make truncated headers, tokens, options, or payload markers look parseable.
References:
RFC 7252 §3 (fixed 4-byte header and Version)
RFC 7252 §3.1 (TKL and token bounds)
RFC 7252 §4.1–§4.2 (message validity and Empty messages)
RFC 7252 §5.5.2 (error handling for options)
Acceptance criteria
Inputs shorter than the fixed header, with truncated token/option/value, TKL 9–15, reserved option nibbles, or a payload marker without payload are rejected before resource dispatch.
Empty messages contain no token, options, or payload; invalid Version is ignored.
Decode failures for responses, ACKs, and RSTs do not escape the receive executor.
RST is emitted only when the message header is sufficiently valid and the RFC permits a response; malformed/unknown messages must not cause reflection.
Add regression tests that fail on the baseline and pass after the fix.
Keep unknown critical-option policy separate until an option-registry/extension contract is defined. Do not silently claim Q-Block or other new options in this issue.
Activity