Commit Graph

11731 Commits (c3ec20ae700c8bf825c34f060840fa987e8f8470)
 

Author SHA1 Message Date
Eric Leblond c3ec20ae70 ebpf: avoid need of 32 bit header
Compilation of xdp_lb.c was failing in some case with the following
error:

/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found

This patch add some define to be able to skip recursive inclusion of
header files leading to the problem.

(cherry picked from commit dfe5785bfa)
6 years ago
Victor Julien 89756afbe4 proto/names: add SCTP if not defined in system
If SCTP is missing from /etc/protocols, add it manually.

(cherry picked from commit bf00285d0a)
6 years ago
Jeff Lucovsky d511b3889e 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.

(cherry picked from commit 1c68f4aed6)
6 years ago
Jeff Lucovsky 95df464ba8 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".

(cherry picked from commit 25e9483168)
6 years ago
Jeff Lucovsky 693d61c729 general: Correct typo
(cherry picked from commit c845974639)
6 years ago
Jeff Lucovsky 26b43a0950 lua: Use SC prefix for Lua functions
This commit adds additional Lua API interfaces to bring consistency to
functions such that the `SC` prefix is available consistently across
flow int and flow var functions.

(cherry picked from commit 431018d6f7)
6 years ago
Victor Julien dcb9909d5e stream/midstream: handle packet loss after SYN/ACK
(cherry picked from commit db2dbaaf40)
6 years ago
Victor Julien bff06d6dd4 stream/tcp: fix invalid ack events in timewait state
(cherry picked from commit 895938080f)
6 years ago
Victor Julien 5c940c363c rust: require test-case 1.0.1; don't use 1.1 6 years ago
Jason Ish af516c57ac mime: postpone md5 calculation to parse complete
Instead of calculating the MD5 at the end of every part, only
compute it when parsing is complete.

With libnss, the hash never updates after the first HASH_End, so
the md5 of only the first part of the body is logged, rather than
the md5 of all the parts.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4245
6 years ago
Jason Ish c6b9135521 github-ci: use python3 in debian builds
(cherry picked from commit 18a1fd22c2)
6 years ago
Jason Ish d92b3184f0 github-ci/macos: use brew to install Python 3
The default Python on MacOS is Python 2. Suricata-Verify now
depends on Python 3, so install it with Brew.

(cherry picked from commit 7904ef82d0)
6 years ago
Jason Ish 4d5e1158b0 github-ci: use a unique id for the commit check cargo cache
All builds have been using the same cache id for ~/.cargo which
could lead us to conflict situations which is what I think we are
seeing with the commit-check job.

(cherry picked from commit 49ca070446)
6 years ago
Jason Ish febdd648b6 github-ci: fix centos 8 build
The "PowerTools" repo that we need to enable has been renamed
to "powertools".

(cherry picked from commit f09536a936)
6 years ago
Jason Ish 4c73891312 github-ci: build cbindgen during prep
Instead of building cbindgen in every build, build it once
during prep as a static musl binary to avoid library issues.

(cherry picked from commit 1f1a765132)
6 years ago
Jason Ish a2c229ca24 github-ci: remove prep directories before upload
Removing the libhtp, suricata-update and suricata-verify directories
before uploading the artifact reduces the upload time from minutes
to seconds.

(cherry picked from commit f945acf733)
6 years ago
Jason Ish c1b34eddbc github-ci: fedora 33 test build (based on fedora 32)
(cherry picked from commit 42196e932e)
6 years ago
Jason Ish a6b344ba36 github-ci: remove fedora 31 (eol)
(cherry picked from commit ea36c01a8f)
6 years ago
Victor Julien 0ad5a38fb4 ci: buildbot is decommissioned, so remove prscript refs
(cherry picked from commit 372fc26739)
6 years ago
Sascha Steinbiss 773545e6d9 doc: build all manpages
(cherry picked from commit f78f444a5e)
6 years ago
Eric Leblond 704ae3008b eve/dhcp: avoid to call common logging twice
(cherry picked from commit 8d034b4163)
6 years ago
Gianni Tedesco 006d62cf85 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.

(cherry picked from commit 10ea60a237)
6 years ago
Gianni Tedesco f20035a854 detect-fast-pattern: Mark as OPTIONAL_OPT, instead of NOOPT
Also update the erroneous comment about it.

(cherry picked from commit cebe15c23b)
6 years ago
Kirby Kuehl 2a8571b3f4 doc: fix URL for unix-socket python example
(cherry picked from commit 5499a6f7cd)
6 years ago
Philippe Antoine 17ebe3125b signature: Fix leak in urilen parsing
cf #4254

(cherry picked from commit 47dd9a5ebc)
6 years ago
Victor Julien e6fd08d2e3 detect/file.name: register inspect engine for ftp-data
(cherry picked from commit 45eddde573)
6 years ago
Jeff Lucovsky 388a0085bd decode/tcp: Improved handling of TFO options
This commit improves handling of TCP fast open options
- Option length must be in [6, 18]
- Option length must be an even value

(cherry picked from commit f8fef0dd05)
6 years ago
Victor Julien 916edf2e2e flow/timeout: fix TCP seq/ack for reversed flows
When a flow is swapped it also swaps the stream trackers, so it does
not make sense to reverse them during pseudo packet creation.

(cherry picked from commit 49bd1f85b9)
6 years ago
Victor Julien 82e10f2cdd detect/stream: fix async stream inspection
Move raw progress forward only if detect uses stream data, indicated
by the PKT_DETECT_HAS_STREAMDATA flag.

(cherry picked from commit 3c7c361b60)
6 years ago
Victor Julien 3e41ba668e stream/tcp: fix async mode ACK validation
(cherry picked from commit 8aa02c6d15)
6 years ago
Victor Julien a7eda4eed0 version: start development towards 6.0.2 6 years ago
Victor Julien e860b9eee9 version: set to 6.0.1 6 years ago
Victor Julien 1d84f72a65 changelog: update for 6.0.1 6 years ago
Philippe Antoine 8c4e53e803 dnp3: regenerates C code with script 6 years ago
Philippe Antoine 15980af7de dnp3: avoids DOS by too long loop over null-sized objects 6 years ago
Philippe Antoine 5749024e3f dnp3: fix memory leak with object containing bytearrays 6 years ago
Philippe Antoine 001350547a dnp3: fix signed integer overflow
By using unsigned integers everywhere
6 years ago
Shivani Bhardwaj ea0936199d output: use BASE64_BUFFER_SIZE macro
Base64Encode function requires the maximum length of the output string
as its last parameter. Use the macro BASE64_BUFFER_SIZE to calculate it
correctly.
6 years ago
Shivani Bhardwaj b0a6ed1e2a datasets/string: fix buffer overflow
The size of encoded_data array and the maximum output length parameter
to Base64Encode function were incorrect leading to buffer overflow for
certain cases. The algorithm requires at least 5 bytes of space to even
convert a string of length 1.

Use BASE64_BUFFER_SIZE macro to correctly calculate this output length.
Set size of encoded_data array to the calculated output length.
6 years ago
Shivani Bhardwaj 02942a123a util/crypt: Add macro for max base64encode len
Maximum length of a base64 encoded string can be 33% over the actual
length of the input string. The formula to best cover all the edge cases
is mathematically
(4 * (input_length + 2) / 3) + 1

Add a macro to calculate this for a given input length.
6 years ago
Philippe Antoine 057c4b34c8 ftp: optimize FTPGetOldestTx by starting from last handled tx
Avoids DOS by quadratic complexity algorithm.
Attack is
1 stack many requests/transactions (like cwd commands on a line)
2 get many answers
6 years ago
Philippe Antoine f574663352 http2: files inspection API fixes
uses right transaction id for file tracker
uses FILE_USE_DETECT for good matches with keyword startswith
6 years ago
Philippe Antoine a63ee5adbd http2: allow multiple size updates in one headers batch
cf RFC 7541 section 4.2
6 years ago
Victor Julien a8fc481cd3 http2: avoid null pointer deref in alert output
Bug #4120.
6 years ago
Philippe Antoine 096dce4bba http2: allow filestore to work with HTTP2 6 years ago
Philippe Antoine d5ac77ee8b packet: set length of 0 for too big copy 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 6181459086 smb: do not rely on one valid NBSS byte for probing
Need to have the SMB header so as to validate
6 years ago
Philippe Antoine 48f0c612e3 ssl: upgarde to uint32 for bytes_processed
as it can overflow, and is compared with uint32 such as
message_length and message_start and
6 years ago
Philippe Antoine 445e03d752 detect: null sanity checks for pkthdr
Even when the rules are only applied on traffic with the protocol
the structure for the protocol header can be set to NULL if there
was an error parsing the header
6 years ago