Victor Julien
1de9256b18
byte-extract: switch to pcre_copy_substring
...
Fixes memory leaks (str_ptr was never freed).
Fixes cppcheck warning:
[src/detect-byte-extract.c:268]: (error) Uninitialized variable: str_ptr
Bug #1046 .
11 years ago
Victor Julien
684d787567
Coverity fix
...
Coverity 992695, fix potential array index with negative int. Very unlikely
case at rule keyword parsing stage.
12 years ago
Victor Julien
3fa958b9a7
byte_extract/test/jump: fix coverity issues
...
During keyword setup there was a path that in theory could lead to
indexing an array with a negative int.
Coverity 992695, 400605, 400604
12 years ago
Anoop Saldanha
b1dffdfbe0
Add app layer protocol packet event detection support.
12 years ago
Victor Julien
7292998a58
Content: set up sticky buffers like file_data and dce_stub_data w/o flags, but with a list variable
12 years ago
Anoop Saldanha
c3d98f9640
Fix the bug specified in the previous commit.
...
Bug emanates from byte_test, byte_jump and byte_extract keyword being
unable to handle negative offsets when the inspection pointer is at the
end of the buffer.
12 years ago
Anoop Saldanha
0b5d277254
code cleanup for all content based keywords.
13 years ago
Anoop Saldanha
51dcf19817
turn dce_stub_data into a sticky buffer.
13 years ago
Anoop Saldanha
a308d718ae
Allow the use of relative without the presence of a related previous keyword.
13 years ago
Last G
8ae11f73b2
Added parentheses to fix Eclipse static code analysis
...
Fixed bug in action priority (REJECT_DST had lowest prio)
13 years ago
Eric Leblond
e176be6fcc
Use unlikely for error treatment.
...
When handling error case on SCMallog, SCCalloc or SCStrdup
we are in an unlikely case. This patch adds the unlikely()
expression to indicate this to gcc.
This patch has been obtained via coccinelle. The transformation
is the following:
@istested@
identifier x;
statement S1;
identifier func =~ "(SCMalloc|SCStrdup|SCCalloc)";
@@
x = func(...)
... when != x
- if (x == NULL) S1
+ if (unlikely(x == NULL)) S1
13 years ago
Anoop Saldanha
5878d83174
byte_extract_id var now a non-global de_ctx specific var
13 years ago
Anoop Saldanha
bff2866aed
more coverity fixes
13 years ago
Anoop Saldanha
37f66e5f46
update handling negative offsets in byte_extract. Also improve validation in byte_extract to not extract values out of the buffer range
13 years ago
Victor Julien
d72b82fae0
Misc fixes.
14 years ago
Eileen Donlon
9b2bd9280a
fix invalid unittests with mixed content modifiers
...
Fixed some unittests that were incorrectly mixing relative and non-relative content modifiers.
14 years ago
Anoop Saldanha
1acb7cdc7d
All http_server_body modified patterns now are DETECT_CONTENT and not DETECT_AL_HTTP_SERVER_BODY
14 years ago
Anoop Saldanha
4810ee9c5f
All uricontent modified patterns now are DETECT_CONTENT and not DETECT_URICONTENT. Step towards unifying all content based patterns. Makes way for easier management of patterns
14 years ago
Anoop Saldanha
ac68c3f893
code cleanup - replace SigMatchAppendDcePayload with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
6cab663bf0
code cleanup - replace SigMatchAppendPayload with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
c4cb37b8da
code cleanup - replace SigMatchAppendUricontent with SigMatchAppendSMToList
14 years ago
Anoop Saldanha
603d4a719a
remove det_ctx->payload_offset and use det_ctx->buffer_offset. Update hscd and hsmd to use the new generic content inspection engine
14 years ago
Victor Julien
296ce8b5f9
file-data: make bytejump, bytetest, byteextract and isdataat work better with file_data.
14 years ago
Victor Julien
07e560b137
file-data: initial file_data support
...
Support file_data for: content, pcre (relative), byte_test, byte_jump,
byte_extract, isdataat.
File_data support is handled at signature parsing time, all matches
occurring after the file_data in the rule are converted to http_server_body
matches.
Content matches relative to the file_data are converted. Within to depth,
distance to offset. Relative to the start of the body buffer.
14 years ago
Anoop Saldanha
420befb180
Changed my email address to anoopsaldanha at gmail dot com from my current one
14 years ago
Victor Julien
2d16abcf8b
Minor code cleanups fixing all GCC 4.6 compiler warnings for default, debug and unittests mode.
14 years ago
Anoop Saldanha
ed3b44b3b5
fix parsing content keywords. We are more strict now. All content keywords need to be enclosed in double quotes. Better validation for sid, priority and rev keywords
14 years ago
Anoop Saldanha
c8701cf8d1
fix var name parsing in byte_extract
14 years ago
Victor Julien
22a97af226
Only compile byte_extract unittests if --enable-unittests is enabled.
14 years ago
Anoop Saldanha
5ccd9a8347
byte_extract support for isdataat added
14 years ago
Anoop Saldanha
35f3eafa5e
byte extract added to the engine. Detection support added for packet payload, uri and dce detection engines
14 years ago