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
fix(internet): a cut behind an IPv4 Total Length of 0 reads checksums INVALID #2689
Found by the short-read audit, and confirmed by an independent re-probe. Neither case is a regression; the first is the #2653 symptom on the TSO path, which #2668 left out.
IPv4 with Total Length 0 (TSO), cut by snaplen.IPv4.read reads a Total Length of 0 as "the rest of the frame", so the frame's lengths are the only record of the cut. Internet._decode_next_layer clears frame_length regardless, so GRE, ICMP and IGMP behind such a packet read their checksum INVALID and raise a false ChecksumWarning. The NOTE in _decode_next_layer admits the cut is lost.
GRE(cut) constructed directly, with the header cut inside the checksum or an earlier field. It verifies the zero-filled checksum and reads INVALID. It never consults the header's __short_read__, which it already has.
Fix:
_decode_next_layer keeps the cut when the layer declared no length. The re-probe validated a declared=False path that the shared verifier carries to ICMP and IGMP, and that AH passes on.
GRE.read reports TRUNCATED whenever its header carries a short-read record.
Tests cover each protocol behind a TSO IPv4 at every cut, and a GRE header cut directly.
Activity
JarryShaw commentedon Nov 2, 2026
Filed from the short-read audit, and confirmed by an independent re-probe. A worker is on it now. Moved to
wip.JarryShaw commentedon Nov 2, 2026
The PR is #2699. A Sonnet review is running.
fix(internet): read a checksum behind a cut TSO IPv4 as truncated (#2689
fix(internet): read a checksum behind a cut TSO IPv4 as truncated (#2689