feat(kernel): harden GRE protocol 47 admission - #187
Merged
Conversation
Reject GRE headers with reserved or deprecated flag bits, add parser coverage for optional-field offsets and truncation, and route IPv4 protocol 47 through the audited framing gate. The full-suite gate follows after the independent Landlock host-test race is fixed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audit the GRE receive parser and wire IPv4 protocol 47 into
NetworkStackas a structural admission gate. Malformed GRE remains silently consumed/dropped at the public boundary, with saturating admitted/dropped counters making the verdict observable.Changes
Related Issues
None.
Verification
cargo fmt --all -- --checkcargo clippy --workspace -- -D warningscargo build --workspacebash scripts/run-tests.sh: 4,650 passed, 0 skippedbash scripts/run-qemu-test.sh: x86_64, aarch64, and riscv64 passedvalidate_gre_packetmakes the corrupt boundary test failChecklist
///commentsunsafeblocks or external dependenciesFollow-up
IPv4 fragment reassembly is not implemented. A fragmented GRE packet can currently affect admission telemetry, but payloads are not decapsulated or delivered. Fragment rejection or reassembly should be addressed before live tunnel delivery.
Screenshots
Not applicable.