]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
4 years agostream/tcp: fix stream side after direction change 5908/head
Ilya Bakhtin [Tue, 28 Jul 2020 14:33:23 +0000 (16:33 +0200)] 
stream/tcp: fix stream side after direction change

4 years agodoc/quickstart: use new test url that works
Jason Ish [Mon, 22 Feb 2021 21:23:52 +0000 (15:23 -0600)] 
doc/quickstart: use new test url that works

Replace http://testmyids.org with http://testmynids.org/uid/index.html,
as testmyids.org now always redirects to https.

4 years agodoc: update installation documentation for CentOS and Fedora
Josh Stroschein [Fri, 18 Dec 2020 18:09:48 +0000 (12:09 -0600)] 
doc: update installation documentation for CentOS and Fedora

4 years agohttp: makes decompression time limit configurable 5899/head
Philippe Antoine [Wed, 17 Feb 2021 08:37:57 +0000 (09:37 +0100)] 
http: makes decompression time limit configurable

4 years agoutil/thash: fix memcap consolidate function 5891/head
Eric Leblond [Thu, 11 Feb 2021 10:01:18 +0000 (11:01 +0100)] 
util/thash: fix memcap consolidate function

The function THashConsolidateMemcap is used to allow to load a
dataset even when the memcap is not set. But the implementation
was in fact resetting the memcap value to the max of memory
usaga after loading and default memcap. As a result, the
function was resetting memcap to the default memcap even if
a huge memcap was set in the dataset definition. In the case
of dataset where we add to the set it was leading to memcap
limit hitting despite the settings of memcap by the user.

This patch udpates the code to set the final memcap value to
the max of memory usage after loading and set memcap.

4 years agostream: TcpStreamCnf.midstream type changed to bool
Ilya Bakhtin [Thu, 18 Feb 2021 20:25:58 +0000 (21:25 +0100)] 
stream: TcpStreamCnf.midstream type changed to bool

4 years agoprotodetect: improve midstream handling
Ilya Bakhtin [Mon, 15 Feb 2021 17:36:46 +0000 (18:36 +0100)] 
protodetect: improve midstream handling

Set "done flag" only if parsers for both directions are not found in a
case of midstream parsers from other direction are tried if nothing is found
for the initial one. "done flag" must be set if nothing is found in both
directions. Otherwise processing of incomplete data is terminated at the very
first try.

4 years agodcerpc/udp: improve detection
Shivani Bhardwaj [Sat, 13 Feb 2021 12:27:42 +0000 (17:57 +0530)] 
dcerpc/udp: improve detection

Lately, Wireguard proto starting w pattern |04 00| is misdetected as
DCERPC/UDP which also starts with the same pattern, add more checks
to make sure that it is the best guess for packet to be dcerpc/udp.

4 years agodcerpc: add probe function
Shivani Bhardwaj [Sat, 20 Feb 2021 06:32:28 +0000 (12:02 +0530)] 
dcerpc: add probe function

4 years agorust/applayer: split EOF flag per direction
Shivani Bhardwaj [Sat, 20 Feb 2021 06:31:20 +0000 (12:01 +0530)] 
rust/applayer: split EOF flag per direction

4 years agodcerpc/udp: remove transmute
Shivani Bhardwaj [Sat, 20 Feb 2021 06:30:17 +0000 (12:00 +0530)] 
dcerpc/udp: remove transmute

The book defines transmute as "This is really, truly, the most horribly unsafe
thing you can do in Rust. The guardrails here are dental floss."
Transmute can result into mind boggling undefined behaviors. Get rid of
it wherever possible.

4 years agoprotodetect: rename direction to flags 5886/head
Philippe Antoine [Tue, 2 Feb 2021 10:12:12 +0000 (11:12 +0100)] 
protodetect: rename direction to flags

And use whole flags in AppLayerProtoDetectPPGetProto

4 years agotcp: remove debug asserts about large windows
Philippe Antoine [Wed, 17 Feb 2021 14:43:17 +0000 (15:43 +0100)] 
tcp: remove debug asserts about large windows

Completes 00d7c9034be7470177c01e8805831c258b016d0e

4 years agodetect/prefilter: fix handling of prefilter as fast_pattern alias
Victor Julien [Sat, 20 Feb 2021 14:53:51 +0000 (15:53 +0100)] 
detect/prefilter: fix handling of prefilter as fast_pattern alias

4 years agodetect: forbids unsupported prefilters
Philippe Antoine [Sun, 7 Feb 2021 20:34:12 +0000 (21:34 +0100)] 
detect: forbids unsupported prefilters

4 years agodetect/fast_pattern: add prefilter test
Victor Julien [Sat, 20 Feb 2021 14:51:50 +0000 (15:51 +0100)] 
detect/fast_pattern: add prefilter test

4 years agofuzz: fix typo in comment
Philippe Antoine [Tue, 2 Feb 2021 10:07:13 +0000 (11:07 +0100)] 
fuzz: fix typo in comment

4 years agohttp2: http.stat_msg keyword now works for HTTP2 5875/head
Philippe Antoine [Thu, 17 Dec 2020 14:57:00 +0000 (15:57 +0100)] 
http2: http.stat_msg keyword now works for HTTP2

4 years agohttp2: http.uri.raw keyword now works for HTTP2
Philippe Antoine [Thu, 17 Dec 2020 13:19:25 +0000 (14:19 +0100)] 
http2: http.uri.raw keyword now works for HTTP2

4 years agohttp2: http.user_agent keyword now works for HTTP2
Philippe Antoine [Thu, 17 Dec 2020 12:26:35 +0000 (13:26 +0100)] 
http2: http.user_agent keyword now works for HTTP2

4 years agohttp2: http.uri keyword now works for HTTP2
Philippe Antoine [Tue, 8 Dec 2020 11:46:24 +0000 (12:46 +0100)] 
http2: http.uri keyword now works for HTTP2

cf #4067

4 years agoprotos: renaming ALPROTO_HTTP* constants
Philippe Antoine [Thu, 17 Dec 2020 11:03:08 +0000 (12:03 +0100)] 
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

4 years agohttp: introduces ALPROTO_HTTP_ANY
Philippe Antoine [Thu, 17 Dec 2020 10:52:42 +0000 (11:52 +0100)] 
http: introduces ALPROTO_HTTP_ANY

For any versions of HTTP, both ALPROTO_HTTP and ALPROTO_HTTP2

4 years agoproto: introduce signature protocol, as extension to flow protocol
Philippe Antoine [Mon, 7 Dec 2020 13:41:00 +0000 (14:41 +0100)] 
proto: introduce signature protocol, as extension to flow protocol

AppProtoEquals function allows to check if a flow protocol
matches a signature protocol

4 years agogithub-ci: test install of library 5866/head
Jason Ish [Thu, 11 Feb 2021 22:34:34 +0000 (16:34 -0600)] 
github-ci: test install of library

Add library install test to Fedora 33 build. In this case the
shared library is disable so the test makes sure it is not
installed.

Also make sure the library and headers are not installed until
explicitly installed.

Add similar to test to an Ubuntu 24.04 build without disable-shared
and check that the shared library is installed.

4 years agoMakefile: break headers and source into 2 vars
Jason Ish [Fri, 5 Feb 2021 15:40:09 +0000 (09:40 -0600)] 
Makefile: break headers and source into 2 vars

Split the headers and source into 2 variables. Headers are
marked noinst so they don't get automatically installed on
"make install". Instead they will be installed by a custom
Makefile target, "make install-headers".

4 years agolibsuricata-config: program to print build flags
Jason Ish [Mon, 8 Feb 2021 22:59:20 +0000 (16:59 -0600)] 
libsuricata-config: program to print build flags

Following the pattern of many other libraries, provide a -config
program to output cflags and libs to properly link an application
against the library.

usage: libsuricata-config [--cflags] [--libs] [--static]

--cflags and --libs can be used infividually or together.

--static will link against the static libraries instead of the
shared library. Note that if the shared library is not available,
the static libraries will be provided even without this option.

4 years agorust: separate the rust lib from RUST_LDADD
Jason Ish [Wed, 10 Feb 2021 20:30:38 +0000 (14:30 -0600)] 
rust: separate the rust lib from RUST_LDADD

Fix another issue with library ordering when breaking apart
LDFLAGS from LIBS for outputting usable command lines for
users of a Suricata library.

RUST_LDADD should just contain the extra libs required by
Rust, not the actual Suricata Rust library.

4 years agoconfigure: put lua libs in LIBS not LDFLAGS
Jason Ish [Wed, 10 Feb 2021 20:29:23 +0000 (14:29 -0600)] 
configure: put lua libs in LIBS not LDFLAGS

This is required to separate LIBS from LDFLAGS when outputting
a usable LIBS configuration line for users of the shared library.

4 years agoinstall: makefile target to install libraries
Jason Ish [Thu, 11 Feb 2021 22:10:02 +0000 (16:10 -0600)] 
install: makefile target to install libraries

As we don't install the libraries by default, provide a make target,
"install-library" to install the libsuricata library files.

If shared library support exists, both the static and shared
libraries will be installed, otherwise only the static libraries
will be installed.

4 years agolib: build shared library on Linux
Jason Ish [Thu, 11 Feb 2021 22:07:30 +0000 (16:07 -0600)] 
lib: build shared library on Linux

Building the shared library on Linux is not something by default.
Instead a user must opt-in to building by running the
"make libsuricata.so" target in the src/ directory.

Currently shared library support is only available on Linux. More
OSs will be supported as we can test them.

4 years agorust: rename lib to libsuricata_rust
Jason Ish [Thu, 4 Feb 2021 21:41:00 +0000 (15:41 -0600)] 
rust: rename lib to libsuricata_rust

Previously it was libsuricata.a, but eventually we want to get
to a place where libsuricata.a is a combination of the Rust
and C code.

4 years agogithub-ci: add -fsanitize=address to LDFLAGS for asan builds
Jason Ish [Thu, 4 Feb 2021 21:47:05 +0000 (15:47 -0600)] 
github-ci: add -fsanitize=address to LDFLAGS for asan builds

With fPIC, -fsanitize-address also needs to be added to LDFLAGS
to build with ASAN support.

Also fix what looks to be a copy and paste typo.

4 years agorust/Makefile: add Cargo.toml as make dependency
Jason Ish [Thu, 10 Dec 2020 21:25:31 +0000 (15:25 -0600)] 
rust/Makefile: add Cargo.toml as make dependency

This will force Cargo.toml to be recreated if Cargo.toml.in
is modified.

4 years agobuild: use a static convenience library for C code
Jason Ish [Thu, 26 Nov 2020 22:27:36 +0000 (16:27 -0600)] 
build: use a static convenience library for C code

With the circular reference gone, we can now make use
of a convenience library for the Suricata program
as well as any other programs that depend on the same
source such as the fuzzer.

While its not a libtool convenience library, it serves
the same purpose and is a common idiom in Make and CMake
projects whereas the COMMON_SOURCES approach was more
of a hack we had to resort to until the circular
reference was resolved.

4 years agohost: improve compare logic 5855/head
Victor Julien [Sat, 13 Feb 2021 16:10:15 +0000 (17:10 +0100)] 
host: improve compare logic

The old compare macro would compare all bytes of an address, even
when for IPv4 addresses the additional bytes were not in use. This
made the logic vulnerable to mistakes like in issue #4280.

4 years agodetect/iprep: fix loading of mixed ipv4/ipv6 lists
Victor Julien [Sat, 13 Feb 2021 15:54:56 +0000 (16:54 +0100)] 
detect/iprep: fix loading of mixed ipv4/ipv6 lists

Improper reuse of the address data structure between loading
different lines in the iprep file would lead to the host using
a malformed address.

4 years agogithub-ci: run suricata-verify on centos-7 build 5840/head
Jason Ish [Wed, 10 Feb 2021 15:01:49 +0000 (09:01 -0600)] 
github-ci: run suricata-verify on centos-7 build

4 years agorust/ffi: provide AppLayerRegisterParser in context
Jason Ish [Thu, 26 Nov 2020 22:21:46 +0000 (16:21 -0600)] 
rust/ffi: provide AppLayerRegisterParser in context

AppLayerRegisterParser was creating a link error when attempting
to use a convenience library for the Suricata C code, then linking
the library of C code with the library of Rust code into a final
Suricata executable, or use with fuzz targets.

By moving AppLayerRegisterParser to the context structure and
calling it like a callback the circular reference is removed
allowing the convenience libraries to work again.

This is also a stepping block to proving a Suricata library
as a single .a or .so file.

4 years ago.gitignore: ignore .a files
Jason Ish [Thu, 26 Nov 2020 22:20:36 +0000 (16:20 -0600)] 
.gitignore: ignore .a files

Ignore .a library files as we now have one created in src/
as part of adding a Suricata library.

4 years agofuzz: run OSS-Fuzz corpus and track coverage
Victor Julien [Thu, 21 Jan 2021 12:28:04 +0000 (13:28 +0100)] 
fuzz: run OSS-Fuzz corpus and track coverage

4 years agodetect: initializes memory in bytemath parsing
Philippe Antoine [Thu, 28 Jan 2021 16:02:19 +0000 (17:02 +0100)] 
detect: initializes memory in bytemath parsing

4 years agofuzz: driver running directories as well as single files
Philippe Antoine [Mon, 16 Nov 2020 09:14:46 +0000 (10:14 +0100)] 
fuzz: driver running directories as well as single files

4 years agosuricata: improve list keywords
Eric Leblond [Wed, 10 Feb 2021 16:45:16 +0000 (17:45 +0100)] 
suricata: improve list keywords

Exit with error if a keyword is not supported or not existing
and display a message.

4 years agosuricata: return error value of custom run modes
Eric Leblond [Wed, 10 Feb 2021 16:28:18 +0000 (17:28 +0100)] 
suricata: return error value of custom run modes

4 years agoutil/running-modes: don't exit in running mode
Eric Leblond [Wed, 10 Feb 2021 16:26:47 +0000 (17:26 +0100)] 
util/running-modes: don't exit in running mode

4 years agolog/pcap: exit on invalid filename
Eric Leblond [Wed, 10 Feb 2021 15:23:25 +0000 (16:23 +0100)] 
log/pcap: exit on invalid filename

If the filename has to % sign and if pcap logging is using multi
mode, then the pcap capture will fail. So let's exit if ever this
is the case.

4 years agosuricata: unix-socket mode and -l are compatible
Eric Leblond [Fri, 29 Jan 2021 22:59:11 +0000 (23:59 +0100)] 
suricata: unix-socket mode and -l are compatible

Commit 93642a0d1dd29c96e98824935ef963f6b1ef40eb did prevent to
specify the logging directory on command line and use the unix
socket.

It looks like the implementation has evolved and the arbitrary
limitation can be removed allowing a user to start unix socket
without editing the configuration file.

4 years agoeve: only output ja3 and ja3s if present
Eric Leblond [Wed, 27 Jan 2021 10:38:34 +0000 (11:38 +0100)] 
eve: only output ja3 and ja3s if present

This will prevent JSON entries like the following that occur
with the dedault configuration (ja3 deactivated and extended
tls ouput activated):

  "tls": {
    "subject": "C=GB, ST=London, L=London, O=Global Security, OU=IT Department, CN=example.com",
    "issuerdn": "C=GB, ST=London, L=London, O=Global Security, OU=IT Department, CN=example.com",
    "serial": "00:9C:FC:DA:1D:A4:70:87:5D",
    "fingerprint": "b8:18:2d:cb:c9:f8:1a:66:75:13:18:31:24:e0:92:35:42:ab:96:89",
    "version": "TLSv1",
    "notbefore": "2020-05-03T11:07:28",
    "notafter": "2021-05-03T11:07:28",
    "ja3": {},
    "ja3s": {}
  }

4 years agodetect/pcre: Test capture group/var mismatch
Jeff Lucovsky [Mon, 8 Feb 2021 13:06:53 +0000 (08:06 -0500)] 
detect/pcre: Test capture group/var mismatch

4 years agodetct/pcre: Correct capture group count check
Jeff Lucovsky [Mon, 8 Feb 2021 13:05:41 +0000 (08:05 -0500)] 
detct/pcre: Correct capture group count check

This commit corrects the validation check between the number of
variables used and the number of specified capture groups.

4 years agotemplate: use response_gap in rust parser
Philippe Antoine [Fri, 5 Feb 2021 14:15:27 +0000 (15:15 +0100)] 
template: use response_gap in rust parser

4 years agodetect/state: optimize state keeping
Victor Julien [Fri, 5 Feb 2021 07:41:22 +0000 (08:41 +0100)] 
detect/state: optimize state keeping

4 years agodetect: fix heap overflow issue with buffer setup
Victor Julien [Thu, 4 Feb 2021 13:48:11 +0000 (14:48 +0100)] 
detect: fix heap overflow issue with buffer setup

In some cases, the InspectionBufferGet function would be followed by
a failure to set the buffer up, for example due to a HTTP body limit
not yet being reached. Yet each call to InspectionBufferGet would lead
to the matching list_id to be added to the
DetectEngineThreadCtx::inspect.to_clear_queue. This array is sized to
add each list only once, but in this case the same id could be added
multiple times, potentially overflowing the array.

4 years agoflow/manager: (u)sleep slightly longer 5816/head
Victor Julien [Wed, 3 Feb 2021 11:00:51 +0000 (12:00 +0100)] 
flow/manager: (u)sleep slightly longer

Sleep 250 microseconds instead of 100 as running in KVM cause the
old value to use 100% CPU for these threads.

Perf testing suggests no measurable impact for the non-KVM case.

Ticket: #4096

4 years agoapp-layer: fix transaction cleanup
Victor Julien [Mon, 1 Feb 2021 21:23:47 +0000 (22:23 +0100)] 
app-layer: fix transaction cleanup

Fix a 'skipped' transaction early in the list leading to all further
transactions getting skipped, even if they were fully processed and
ready to be cleaned up.

4 years agofuzz: rightly uses PacketFreeOrRelease in target 5796/head
Philippe Antoine [Wed, 27 Jan 2021 20:21:44 +0000 (21:21 +0100)] 
fuzz: rightly uses PacketFreeOrRelease in target

instead of PacketFree because packets
may belong to the pool

4 years agofuzz: use some value for max_pending_packets 5795/head
Philippe Antoine [Tue, 26 Jan 2021 19:34:14 +0000 (20:34 +0100)] 
fuzz: use some value for max_pending_packets

so as not to timeout waiting forever for the condition
in PacketPoolWait

4 years agofuzz: makes target sigpcap more reproducible
Philippe Antoine [Mon, 25 Jan 2021 20:33:24 +0000 (21:33 +0100)] 
fuzz: makes target sigpcap more reproducible

By removing the temporary rules file if it existed
before the first run

4 years agogithub: run codecov verify test w/o optimizations 5794/head
Victor Julien [Tue, 26 Jan 2021 20:22:26 +0000 (21:22 +0100)] 
github: run codecov verify test w/o optimizations

4 years agorust: update dependencies 5792/head
Victor Julien [Tue, 26 Jan 2021 13:28:11 +0000 (14:28 +0100)] 
rust: update dependencies

4 years agorust: lock all major crate versions
Victor Julien [Sat, 16 Jan 2021 09:14:10 +0000 (10:14 +0100)] 
rust: lock all major crate versions

To avoid surprises with dependencies bumping MSRV.

4 years agorust: relax nom version to any >=5.1.1
Victor Julien [Sat, 16 Jan 2021 09:08:11 +0000 (10:08 +0100)] 
rust: relax nom version to any >=5.1.1

4 years agohttp: enables request decompression 5784/head
Philippe Antoine [Thu, 21 Jan 2021 11:27:31 +0000 (12:27 +0100)] 
http: enables request decompression

4 years agosuricata: avoid at exit crash in nfq mode
Eric Leblond [Sun, 24 Jan 2021 21:40:02 +0000 (22:40 +0100)] 
suricata: avoid at exit crash in nfq mode

When Suricata was build with ebpf support and when it was started
in NFQ mode, it was crashing at exit because it was trying to free
the device extension.

This patch fixes the issue by only trigger the eBPF related code
when Suricata is running in AFP_PACKET mode.

4 years agostorage: fix a variable name
Eric Leblond [Sun, 24 Jan 2021 21:11:38 +0000 (22:11 +0100)] 
storage: fix a variable name

4 years agodetect: fix link to documentation
Eric Leblond [Sat, 23 Jan 2021 19:57:02 +0000 (20:57 +0100)] 
detect: fix link to documentation

4 years agoftp: ftp-data recognized by StringToAppProto 5782/head
Philippe Antoine [Thu, 21 Jan 2021 13:44:33 +0000 (14:44 +0100)] 
ftp: ftp-data recognized by StringToAppProto

4 years agohttp2: decompression for files 5780/head
Philippe Antoine [Thu, 12 Nov 2020 08:24:36 +0000 (09:24 +0100)] 
http2: decompression for files

gzip and brotli decompression for files

4 years agorust: BIT_U16 macro utility
Philippe Antoine [Tue, 8 Dec 2020 13:53:01 +0000 (14:53 +0100)] 
rust: BIT_U16 macro utility

4 years agorust: better panic message for missing file config
Philippe Antoine [Sun, 6 Dec 2020 19:36:45 +0000 (20:36 +0100)] 
rust: better panic message for missing file config

4 years agorust: fix warning about unused values in smb tests 5774/head
Philippe Antoine [Fri, 22 Jan 2021 14:31:59 +0000 (15:31 +0100)] 
rust: fix warning about unused values in smb tests

4 years agoprotocol detection: fix failure case
Philippe Antoine [Fri, 22 Jan 2021 14:55:31 +0000 (15:55 +0100)] 
protocol detection: fix failure case

as reached by CIFuzz even if unreachable from Suricata

4 years agoprotodetect: debug validation when multiple patterns match
Philippe Antoine [Mon, 2 Sep 2019 14:27:46 +0000 (16:27 +0200)] 
protodetect: debug validation when multiple patterns match

4 years agostream: remove debug assert
Victor Julien [Thu, 21 Jan 2021 15:44:39 +0000 (16:44 +0100)] 
stream: remove debug assert

In cases of large windows in the past the check would tigger.

4 years agodetect/http_client_body: minor test cleanups 5756/head
Victor Julien [Wed, 20 Jan 2021 21:34:01 +0000 (22:34 +0100)] 
detect/http_client_body: minor test cleanups

4 years agodataset: fix dataset string lookup 5753/head
Eric Leblond [Wed, 20 Jan 2021 20:17:04 +0000 (21:17 +0100)] 
dataset: fix dataset string lookup

The data was unlocked but the use_cnt was not decreased resulting
in the data entry not being removable.

4 years agodetect/file_data: cleanup tests 5752/head
Victor Julien [Wed, 20 Jan 2021 12:40:15 +0000 (13:40 +0100)] 
detect/file_data: cleanup tests

4 years agostream/tests: minor cleanups 5751/head
Victor Julien [Wed, 20 Jan 2021 07:40:04 +0000 (08:40 +0100)] 
stream/tests: minor cleanups

4 years agoqa/cocci: support FAIL macros in malloc check
Victor Julien [Wed, 20 Jan 2021 06:15:10 +0000 (07:15 +0100)] 
qa/cocci: support FAIL macros in malloc check

4 years agogithub: codecov fix path handling
Victor Julien [Tue, 19 Jan 2021 19:25:19 +0000 (20:25 +0100)] 
github: codecov fix path handling

4 years agostream: move tests into tests/ 5748/head
Victor Julien [Tue, 19 Jan 2021 18:40:32 +0000 (19:40 +0100)] 
stream: move tests into tests/

4 years agodetect/fast_pattern: redo unittests 5746/head
Victor Julien [Tue, 19 Jan 2021 13:23:05 +0000 (14:23 +0100)] 
detect/fast_pattern: redo unittests

4 years agodetect/fast_pattern: remove dead code
Victor Julien [Tue, 19 Jan 2021 13:22:50 +0000 (14:22 +0100)] 
detect/fast_pattern: remove dead code

4 years agodetect/http-ua: cleanup tests 5745/head
Victor Julien [Tue, 19 Jan 2021 06:50:28 +0000 (07:50 +0100)] 
detect/http-ua: cleanup tests

4 years agodecode/flow/esp: Add ESP decoder & flow 5743/head
Emmanuel Thompson [Mon, 4 May 2020 15:38:16 +0000 (11:38 -0400)] 
decode/flow/esp: Add ESP decoder & flow

- Adds an ESP (Encapsulating Security Payload) header decoder
- Tracks ESP flows via the SPI field

4 years agodecode: reformat REINIT macro
Victor Julien [Mon, 18 Jan 2021 19:58:26 +0000 (20:58 +0100)] 
decode: reformat REINIT macro

4 years agodecode: minor unittest cleanups 5742/head
Victor Julien [Mon, 18 Jan 2021 14:50:57 +0000 (15:50 +0100)] 
decode: minor unittest cleanups

4 years agoproto/names: add SCTP if not defined in system
Victor Julien [Mon, 18 Jan 2021 12:56:32 +0000 (13:56 +0100)] 
proto/names: add SCTP if not defined in system

If SCTP is missing from /etc/protocols, add it manually.

4 years agogithub: add codecov.yml 5740/head
Victor Julien [Mon, 18 Jan 2021 08:41:01 +0000 (09:41 +0100)] 
github: add codecov.yml

Don't report until both cov runs are available to avoid partial
reporting in pull request comments.

4 years agojson: remove unused jansson wrappers 5738/head
Victor Julien [Mon, 18 Jan 2021 06:57:39 +0000 (07:57 +0100)] 
json: remove unused jansson wrappers

4 years agohttp: enable and fix content range tests 5737/head
Victor Julien [Sun, 17 Jan 2021 22:34:07 +0000 (23:34 +0100)] 
http: enable and fix content range tests

4 years agoapp-layer/nfs: dead code removal
Victor Julien [Sun, 17 Jan 2021 22:22:09 +0000 (23:22 +0100)] 
app-layer/nfs: dead code removal

4 years agodetect/rpc: clean up unittests 5736/head
Juliana Fajardini [Sat, 21 Nov 2020 22:42:57 +0000 (22:42 +0000)] 
detect/rpc: clean up unittests

- detect-rpc: convert unit tests to new FAIL/PASS API.
- detect-rpc: replace SigInit with DetectEngineAppendSig for more
  concise code.

4 years agogithub: add codecov badge 5735/head
Victor Julien [Sun, 17 Jan 2021 16:15:01 +0000 (17:15 +0100)] 
github: add codecov badge

4 years agoci: initial codecov integration 5734/head
Victor Julien [Sun, 17 Jan 2021 06:40:53 +0000 (07:40 +0100)] 
ci: initial codecov integration

4 years agoconfigure: fix llc detection on recent Debian 5727/head
Eric Leblond [Tue, 5 Jan 2021 20:40:33 +0000 (21:40 +0100)] 
configure: fix llc detection on recent Debian

Where clang --version was returning:

clang version 9.0.1-15+b1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Newer version like clang-10 on Debian are returning:

Debian clang version 10.0.1-8+b1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

As a result the parsing was failing to determine which llc was
available on the system.

4 years agolua: fix coverity issue with out of scope variable
Jason Ish [Wed, 13 Jan 2021 15:40:06 +0000 (09:40 -0600)] 
lua: fix coverity issue with out of scope variable

Fix usage of out-of-scope variables. Introduced with the hashing
and adding the guard of g_disable_hashing.

To fix, just remove the guard so all variables are in scope. Hashes
are not initialized here so there is no need for the guard.

4 years agolua/test: Test cases using SC prefix
Jeff Lucovsky [Wed, 13 Jan 2021 18:43:52 +0000 (13:43 -0500)] 
lua/test: Test cases using SC prefix

This commit adds paired test cases to ensure that the SC variant of the
entry points are tested.

4 years agodoc/lua: Lua API name consistency
Jeff Lucovsky [Wed, 13 Jan 2021 18:39:21 +0000 (13:39 -0500)] 
doc/lua: Lua API name consistency

This commit updates the documentation of the SCFlow* function names
available to Lua scripts.

Formerly, they used the prefix "Sc"; now they use "SC".