Victor Julien
8b8cc697d5
detect/http-server-body: clean up test
5 years ago
Philippe Antoine
52ea3fc7ac
fuzz: more precise assertion for protocol detection
...
Only in the cases of stream start is the assertion valable.
Otherwise, it can only be best effort.
6 years ago
Ilya Bakhtin
b3b64803e5
stream: TcpStreamCnf.midstream type changed to bool
6 years ago
Philippe Antoine
18fcbb20e2
fuzz: fix typo in comment
6 years ago
Philippe Antoine
707f027231
protos: renaming ALPROTO_HTTP* constants
...
Having now ALPROTO_HTTP1, ALPROTO_HTTP2 and ALPROTO_HTTP
Run with 3 sed commands
git grep ALPROTO_HTTP | cut -d: -f1 | uniq |
xargs sed -i -e 's/ALPROTO_HTTP/ALPROTO_HTTP1/g'
git grep ALPROTO_HTTP12 | cut -d: -f1 | uniq |
xargs sed -i -e 's/ALPROTO_HTTP12/ALPROTO_HTTP2/g'
git grep ALPROTO_HTTP1_ANY | cut -d: -f1 | uniq |
xargs sed -i -e 's/ALPROTO_HTTP1_ANY/ALPROTO_HTTP/g'
and then running clang-format
6 years ago
Victor Julien
3ce05a3583
fuzz: run OSS-Fuzz corpus and track coverage
6 years ago
Philippe Antoine
b5d24a9a57
fuzz: driver running directories as well as single files
6 years ago
Philippe Antoine
62e665c848
fuzz: rightly uses PacketFreeOrRelease in target
...
instead of PacketFree because packets
may belong to the pool
6 years ago
Philippe Antoine
e586d8526b
fuzz: use some value for max_pending_packets
...
so as not to timeout waiting forever for the condition
in PacketPoolWait
6 years ago
Philippe Antoine
a6bbb608f7
fuzz: makes target sigpcap more reproducible
...
By removing the temporary rules file if it existed
before the first run
6 years ago
Victor Julien
b66d013294
detect/http_client_body: minor test cleanups
6 years ago
Victor Julien
191461a028
detect/file_data: cleanup tests
6 years ago
Victor Julien
116c089de0
stream/tests: minor cleanups
6 years ago
Victor Julien
ee6d792b02
stream: move tests into tests/
6 years ago
Victor Julien
bc9e7743f3
detect/http-ua: cleanup tests
6 years ago
Victor Julien
b6b317cae6
http: enable and fix content range tests
6 years ago
Jason Ish
d5bf748c90
ja3: remove requirement on NSS
6 years ago
Gianni Tedesco
10ea60a237
detect: Validate that NOOPT options don't have optvals
...
Without this, a simple typo between : and ; is able to hide actual bugs
in rules.
I discovered 2 bugs in ET open ruleset this way.
6 years ago
Victor Julien
3c7c361b60
detect/stream: fix async stream inspection
...
Move raw progress forward only if detect uses stream data, indicated
by the PKT_DETECT_HAS_STREAMDATA flag.
6 years ago
Philippe Antoine
8d659c6500
fuzz: improves sigpcap target with PacketPoolInit
6 years ago
Philippe Antoine
6d2247391e
ssl: improves keyword ssl_version parsing
...
Removes the use of PCRE for performance
Forbids empty negations after a valid pattern
Forbids mixing negative and positive forms as it is irrelevant
Forbids useless repetition of a version
6 years ago
Philippe Antoine
33905b0910
fuzz: check PacketCopyData return value before processing packet
6 years ago
Philippe Antoine
80dc6c6f1e
fuzz: improves detect proto target
...
By mimicking assert message so as to clusterfuzz differentiates
between failures
6 years ago
Jeff Lucovsky
ac8532966b
detect: Add icmpv4.hdr sticky buffer
...
This commit adds a new sticky buffer to access the ICMPv4 header.
6 years ago
Philippe Antoine
7d594d8710
fuzz: better packet recycling in sigpcap target
...
need especially to set datalink for every packet
6 years ago
Philippe Antoine
c93cbe66c2
fuzz: applayer target uses yaml config
...
so that every app-layer protocol is enabled
6 years ago
Victor Julien
479078d377
detect/content: add more negation tests
6 years ago
Philippe Antoine
547d6c2d78
applayer: pass parameter to StateAlloc
...
This parameter is NULL or the pointer to the previous state
for the previous protocol in the case of a protocol change,
for instance from HTTP1 to HTTP2
This way, the new protocol can use the old protocol context.
For instance, HTTP2 mimicks the HTTP1 request, to have a HTTP2
transaction with both request and response
6 years ago
Victor Julien
ac491c6e8d
fuzz/pcap: add missing flow queue
6 years ago
Victor Julien
107ad95c41
fuzz/pcap: enable http2
6 years ago
Jason Ish
900f1522b4
plugins: config.h: move into src and rename to autoconf.h
...
While fixing files that include config.h, just remove the
include if possible.
6 years ago
Philippe Antoine
1422b18a99
http2: initial support
6 years ago
Victor Julien
1c748f394b
fuzz/pcap: enable MQTT parser
6 years ago
Victor Julien
4f73943df9
app-layer: split EOF flag per direction
6 years ago
Roland Fischer
9f1efa3c10
pcap: 32bit counters can wrap-around
...
Fixes issue 2845.
pcap_stats is based on 32bit counters and given a big enough throughput
will overflow them. This was reported by people using Myricom cards which
should only be a happenstance. The problem exists for all pcap-based
interfaces.
Let's use internal 64bit counters that drag along the pcap_stats and
handle pcap_stats wrap-around as we update the 64bit stats "often enough"
before the pcap_stats can wrap around twice.
6 years ago
Emmanuel Thompson
275f6ae96f
detect/asn1: Remove asn1 C parser
...
- In favor of rust parser
6 years ago
Victor Julien
a98a209732
fuzz/sigpcap: make sure hassh is enabled
6 years ago
Philippe Antoine
00509da286
fuzz: improves fuzz target applayerparserparse
...
Does not proceed final chunk if we got an error previously
Flips the direction for last chunk as usual
6 years ago
Philippe Antoine
ac76ff9e47
detect: fail properly on invalid transform pcrexform
6 years ago
Philippe Antoine
2fe82ce0d6
fuzz: do not reuse global variable named suricata
6 years ago
Philippe Antoine
304aedfa95
fuzz: improves sigpcap target
...
So that it can cover alert generation
ie in function DetectRun, get past scratch.sgh == NULL condition
6 years ago
Victor Julien
a0392c6027
fuzz/sigpcap: enable protocols, add more outputs
6 years ago
Victor Julien
3ed188e0bc
ssl: support multi-frag certificate assembly
...
Support reassembling multi-frag certificates. For this the cert queuing
code is changed to queue just the cert, not entire tls record.
Improve message tracking. Better track where a message starts and ends
before passing data around.
Add wrapper macros to check for 'impossible' conditions that are activate
in debug validation mode. This helps fuzzers find input that might trigger
these conditions, if they exist.
6 years ago
Jeff Lucovsky
d3a65fe156
detect: Provide `de_ctx` to free functions
...
This commit makes sure that the `DetectEngineCtx *` is available
to each detector's "free" function.
6 years ago
Victor Julien
cb4b5296da
fuzz: include pcap headers through suricata-common.h
6 years ago
Victor Julien
967340e901
fuzz: fix applayer eof check segv
6 years ago
Philippe Antoine
4fda7ed4bd
fuzz: stop app layer target as Suricata
...
Before being overwhelmed by successive errors
6 years ago
Victor Julien
dfdf2eb050
fuzz: add missing debug validation to configure
6 years ago
Victor Julien
c76f98073e
fuzz: add configure wrapper for oss-fuzz
6 years ago
Victor Julien
f6bf86f136
fuzz/sigpcap: enable all of eve
6 years ago