ike: validate ISAKMP message length

Follow-up on the todo left in this section of code.

Ticket: 8961.
(cherry picked from commit 42412fa5af)
pull/16211/head
Jason Ish 2 months ago committed by Philippe Antoine
parent 2d0f220831
commit 4614563b80

@ -211,6 +211,10 @@ impl IKEState {
Ok((rem, isakmp_header)) => {
current = rem;
if isakmp_header.length as usize != input.len() {
return AppLayerResult::err();
}
if isakmp_header.maj_ver != 1 && isakmp_header.maj_ver != 2 {
SCLogDebug!("Unsupported ISAKMP major_version");
return AppLayerResult::err();

Loading…
Cancel
Save