Bug #167
closedasn1 keyword needs to be able to support negative values for relative offsets.
Description
asn1 keyword needs to be able to support negative values for relative offsets. See sids 2578 and 2579 in the VRT exploit.rules for example usage. Below is the error given by suricata when trying to use a value of -1 i.e. move the cursor to be one byte previous to the last match.
[23964] 26/5/2010 -- 06:51:06 - (util-byte.c:167) <Error> (ByteExtractStringUint32) -- [ERRCODE: SC_ERR_NUMERIC_VALUE_ERANGE(59)] - Numeric value out of range (ffffffff != ffffffffffffffff)
[23964] 26/5/2010 -- 06:51:06 - (detect-asn1.c:250) <Error> (DetectAsn1Parse) -- [ERRCODE: SC_ERR_INVALID_VALUE(126)] - Malformed value for relative_offset: 1 06:51:06 - (detect.c:321) <Error> (DetectLoadSigFile) -- [ERRCODE: SC_ERR_INVALID_SIGNATURE(37)] - Error parsing signature "VRT RULE HERE" from file /etc/suricata/exploit.rules at line 90
[23964] 26/5/2010 -
[23964] 26/5/2010 -- 06:51:06 - (util-byte.c:167) <Error> (ByteExtractStringUint32) -- [ERRCODE: SC_ERR_NUMERIC_VALUE_ERANGE(59)] - Numeric value out of range (ffffffff != ffffffffffffffff)
[23964] 26/5/2010 -- 06:51:06 - (detect-asn1.c:250) <Error> (DetectAsn1Parse) -- [ERRCODE: SC_ERR_INVALID_VALUE(126)] - Malformed value for relative_offset: 1 06:51:06 - (detect.c:321) <Error> (DetectLoadSigFile) -- [ERRCODE: SC_ERR_INVALID_SIGNATURE(37)] - Error parsing signature "VRT RULE HERE" from file /etc/suricata/exploit.rules at line 91
[23964] 26/5/2010 -
Files