Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle IPv6 fragment extension header #832

Conversation

ChuckCottrill
Copy link
Contributor

Description:
Handle IPv6 fragment extension header
only return NULL when reached end of packet (no data)

Explanation:
When issue #488 was fixed (pr #496) (version=4.3.0, and carried forward to version=4.4.0), the fix prevented IPv6
fragment extension header handling. The need was to prevent addressing headers beyond packet length (to avoid
heap corruption). However, the fix prevents any further processing of the packet after fragment extension header found.
When the extension header proto=TCPR_IPV6_NH_FRAGMENT, we can skip that header (fixed length=32 bits),
process any further extension headers, and return a pointer to packet data.

When issue #611 was fixed (pr #613), the solution was to leave any IPv6 packets with fragment extension header
untouched (and generate TCPEDIT_SOFT_ERROR). This change allowed tcprewrite to continue, and these packets
could be skipped (use option --skip-soft-errors). This was to avoid abort/failure of the code to run on pcap having
any fragment headers.

Both of these issues are handled by this PR.

Reference:

@fklassen
Copy link
Member

Thanks for the PR. Opened issue #837 to track.

Merging into a working branch for testing and documentation.

Targetting 4.5 release.

@fklassen fklassen changed the base branch from master to Bug_#837_handle_IPv6_fragment_extension_header December 26, 2023 20:59
@fklassen fklassen merged commit d60b917 into appneta:Bug_#837_handle_IPv6_fragment_extension_header Dec 26, 2023
3 checks passed
fklassen added a commit that referenced this pull request Dec 26, 2023
downstream PR #832 from Chuck Cottrill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants