Skip to content

tests: ipv6 hop-by-hop option length past option area - #3188

Closed
uwezkhan wants to merge 1 commit into
OISF:masterfrom
uwezkhan:ipv6-hopopts-bound
Closed

tests: ipv6 hop-by-hop option length past option area#3188
uwezkhan wants to merge 1 commit into
OISF:masterfrom
uwezkhan:ipv6-hopopts-bound

Conversation

@uwezkhan

Copy link
Copy Markdown

Companion test for OISF/suricata#15695.

The hop-by-hop option loop in DecodeIPV6ExtHdrs gated each option on (offset + 1 + ip6_optlen) > optslen, which let an option whose data runs one byte past the option area through; the Router Alert memcpy then read one byte past the area. The fix bounds it on offset + 2 + ip6_optlen.

The pcap is an IPv6 packet (payload len 8, next header hop-by-hop) carrying an 8 byte hop-by-hop header with three Pad1 options and a Router Alert that declares 2 data bytes while only 1 fits in the 6 byte option area, so the option is rejected as decoder.ipv6.exthdr_invalid_optlen.

Branch named to match the suricata PR so the verify run is picked up.

@catenacyber

Copy link
Copy Markdown
Collaborator

Closing as suricata PR got closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires suricata pr Depends on a PR in Suricata

Development

Successfully merging this pull request may close these issues.

2 participants