Skip to content

Validate ICMP extension checksums and legacy detection - #158

Merged
lance0 merged 1 commit into
masterfrom
fix/icmp-extension-checksums
Oct 16, 2026
Merged

lance0 merged 1 commit into
masterfrom
fix/icmp-extension-checksums

Conversation

@lance0

@lance0 lance0 commented Oct 16, 2026

Copy link
Copy Markdown
Owner

ICMP extension metadata was accepted on version alone, so damaged extensions and ordinary quoted payload could appear as MPLS/interface information. Validate every transmitted extension checksum and require a transmitted, valid checksum for legacy zero-length detection. Explicit-length extensions may still omit their checksum as RFC 4884 permits. Reject object lengths that are not whole 32-bit words, while preserving the correlated ICMP response when extension metadata is invalid.

Validation: full cargo build --locked, cargo test --locked, strict all-target Clippy, formatting, private-item rustdoc, and Rust 1.88 check passed. Regressions cover IPv4/IPv6, 128/160-byte quotes, omitted/valid/corrupt checksums, unknown objects, unaligned objects, and damaged real Arista captures. Existing real captures and parser property tests pass.

References: RFC 4884 §§5.2, 5.5, 7–9. Independent of #144; the padding correction and these checks can be reviewed separately.

@lance0
lance0 marked this pull request as ready for review October 16, 2026 15:40
@lance0
lance0 merged commit 29eae41 into master Oct 16, 2026
6 checks passed
@lance0
lance0 deleted the fix/icmp-extension-checksums branch October 16, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant