Skip to content

Drop reassembled IPv4 packets exceeding maximum total length. - #15227

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl989856429
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl989856429

Conversation

@copybara-service

Copy link
Copy Markdown

Drop reassembled IPv4 packets exceeding maximum total length.

Check that the reassembled IPv4 packet total length (header + payload) does
not exceed math.MaxUint16 before casting to uint16.

Previously, a reassembled packet with IPv4 options could exceed 65535 bytes
and wrap uint16, writing a truncated TotalLength into the header and causing
sendICMPEchoReply to panic when validating the outgoing IPv4 header.

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Oct 2, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl989856429 branch 2 times, most recently from 9003a44 to 5c22ac4 Compare October 3, 2026 13:35
Check that the reassembled IPv4 packet total length (header + payload) does
not exceed math.MaxUint16 before casting to uint16.

Previously, a reassembled packet with IPv4 options could exceed 65535 bytes
and wrap uint16, writing a truncated TotalLength into the header and causing
sendICMPEchoReply to panic when validating the outgoing IPv4 header.

PiperOrigin-RevId: 989856429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant