icmpv6: bail out for icmpv6.hdr keyword if not ICMPv6

pull/5948/head
Philippe Antoine 5 years ago committed by Victor Julien
parent 538fc58b37
commit ddb4d289ae

@ -105,7 +105,10 @@ static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
InspectionBuffer *buffer = InspectionBufferGet(det_ctx, list_id);
if (buffer->inspect == NULL) {
uint32_t hlen = ICMPV6_HEADER_LEN;
DEBUG_VALIDATE_BUG_ON(p->icmpv6h == NULL);
if (p->icmpv6h == NULL) {
// DETECT_PROTO_IPV6 does not prefilter
return NULL;
}
if (((uint8_t *)p->icmpv6h + (ptrdiff_t)hlen) >
((uint8_t *)GET_PKT_DATA(p) + (ptrdiff_t)GET_PKT_LEN(p)))
{

Loading…
Cancel
Save