]>
git.ipfire.org Git - thirdparty/suricata.git/log
Victor Julien [Wed, 23 Dec 2020 14:55:19 +0000 (15:55 +0100)]
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.
Victor Julien [Thu, 17 Dec 2020 20:04:13 +0000 (21:04 +0100)]
detect/stream: fix async stream inspection
Move raw progress forward only if detect uses stream data, indicated
by the PKT_DETECT_HAS_STREAMDATA flag.
Victor Julien [Thu, 17 Dec 2020 09:54:05 +0000 (10:54 +0100)]
stream/tcp: fix async mode ACK validation
Philippe Antoine [Fri, 18 Dec 2020 20:56:24 +0000 (21:56 +0100)]
fuzz: improves sigpcap target with PacketPoolInit
Victor Julien [Fri, 11 Dec 2020 09:19:41 +0000 (10:19 +0100)]
ci: buildbot is decommissioned, so remove prscript refs
Jason Ish [Thu, 10 Dec 2020 15:48:06 +0000 (09:48 -0600)]
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.
Shivani Bhardwaj [Fri, 11 Sep 2020 15:12:22 +0000 (20:42 +0530)]
counters: convert to FAIL/PASS API
Shivani Bhardwaj [Fri, 11 Sep 2020 15:02:11 +0000 (20:32 +0530)]
confyaml: convert to FAIL/PASS API
Shivani Bhardwaj [Fri, 11 Sep 2020 12:43:51 +0000 (18:13 +0530)]
applayer: convert to FAIL/PASS API
Shivani Bhardwaj [Fri, 11 Sep 2020 12:29:08 +0000 (17:59 +0530)]
applayer/htp/xff: convert to FAIL/PASS API
Shivani Bhardwaj [Fri, 11 Sep 2020 12:15:46 +0000 (17:45 +0530)]
applayer/ftp: convert to FAIL/PASS API
Shivani Bhardwaj [Fri, 11 Sep 2020 12:15:22 +0000 (17:45 +0530)]
fastlog: convert to FAIL/PASS API
Janani Ramjee [Mon, 12 Oct 2020 09:29:05 +0000 (14:59 +0530)]
detect/mark: convert unittests to use PASS/FAIL API
Juliana Fajardini [Tue, 20 Oct 2020 16:48:20 +0000 (17:48 +0100)]
detect/msg: convert to FAIL/PASS API
Issue 4053. Adjust code formatting style (wrap long lines).
Replace SigInit with DetectEngineAppendSig.
Sumera Priyadarsini [Wed, 21 Oct 2020 09:15:26 +0000 (14:45 +0530)]
detect: filesha1: convert unittests to use PASS/FAIL API
Currently, unit tests use integer values 1 and 0 to denote pass
and fail status of tests respectively. Modify the unit test
detect-filesha1 to use the PASS/FAIL API instead.
Juliana Fajardini [Wed, 4 Nov 2020 18:07:16 +0000 (18:07 +0000)]
Rust: generic files definition
Issue: Optimization 3825
- filecontainer: add Files structure, to replace/unify SMBFiles,
NFSFiles and HTTP2Files
- smb/files: delete SMBFiles implementation
- smb/smb: replace SMBFiles with Files
- nfs/nfs: delete NFSFiles implementation, replace its former
declarations with Files' ones
- http2/http2: replace HTTP2Files with Files
- http2/mod: Delete reference to file files.rs
- http2/files: Delete
Juliana Fajardini [Mon, 16 Nov 2020 19:49:56 +0000 (19:49 +0000)]
detect-sid: fail/pass api
- convert unittests to new FAIL/PASS API.
Jason Ish [Tue, 8 Dec 2020 15:34:52 +0000 (09:34 -0600)]
github-ci: fix centos 8 build
The "PowerTools" repo that we need to enable has been renamed
to "powertools".
Jason Ish [Mon, 7 Dec 2020 21:31:34 +0000 (15:31 -0600)]
dns: initialize log flags as an unsigned long long
On 64 bit all 64 bits were being initialized, but on 32 bit
only 32 bits were as it was being initialized as a long.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4206
Sascha Steinbiss [Tue, 3 Nov 2020 18:52:10 +0000 (19:52 +0100)]
dns: use rest() for NULL parsing
Sascha Steinbiss [Fri, 30 Oct 2020 10:16:53 +0000 (11:16 +0100)]
dns: add test for SRV
Sascha Steinbiss [Tue, 3 Nov 2020 18:29:15 +0000 (19:29 +0100)]
doc: add documentation for SRV DNS JSON structure
Sascha Steinbiss [Tue, 3 Nov 2020 18:29:00 +0000 (19:29 +0100)]
dns: parse SRV records
Antti Tönkyrä [Thu, 8 Oct 2020 09:33:33 +0000 (12:33 +0300)]
dns: add rdata logging for NS rrtype
Simon Dugas [Wed, 22 Apr 2020 17:29:32 +0000 (17:29 +0000)]
dns: log rdata for NULL record type
Logs the rdata for a NULL record type as a printable string.
Jason Ish [Mon, 7 Dec 2020 17:54:52 +0000 (11:54 -0600)]
github-ci: add sccache to per-commit check
Also use the pre-build cbindgen binary.
Hopefully speeds up the build process.
Victor Julien [Fri, 30 Oct 2020 12:40:17 +0000 (13:40 +0100)]
app-layer: remove callback for completion status
Since the completion status was a constant for all parsers, remove the
callback logic and instead register the values themselves. This should
avoid a lot of unnecessary callback calls.
Update all parsers to take advantage of this.
Victor Julien [Mon, 19 Oct 2020 13:33:36 +0000 (15:33 +0200)]
detect: remove unused arg from generic list inspect
Victor Julien [Mon, 19 Oct 2020 13:33:00 +0000 (15:33 +0200)]
detect: remove inspect v1 API
Victor Julien [Tue, 20 Oct 2020 09:07:03 +0000 (11:07 +0200)]
detect/template: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 09:06:44 +0000 (11:06 +0200)]
detect/tls: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 09:05:40 +0000 (11:05 +0200)]
detect/ssh: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 09:05:13 +0000 (11:05 +0200)]
detect/snmp: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 09:04:46 +0000 (11:04 +0200)]
detect/rfb: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 09:04:17 +0000 (11:04 +0200)]
detect/nfs: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 09:03:56 +0000 (11:03 +0200)]
detect/lua: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 09:03:27 +0000 (11:03 +0200)]
detect/ftp: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 08:42:59 +0000 (10:42 +0200)]
detect/mqtt: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 08:41:48 +0000 (10:41 +0200)]
detect/modbus: convert to v2 inspect API
Victor Julien [Tue, 20 Oct 2020 08:40:54 +0000 (10:40 +0200)]
detect/enip/cip: convert to v2 inspect API
Victor Julien [Mon, 12 Oct 2020 12:19:15 +0000 (14:19 +0200)]
detect/http2: inspect API v2
Victor Julien [Sun, 5 Apr 2020 18:00:25 +0000 (20:00 +0200)]
detect/krb5: use inspect api v2
Victor Julien [Sun, 5 Apr 2020 16:14:39 +0000 (18:14 +0200)]
detect/ftpbounce: switch to inspect api v2
Victor Julien [Sun, 5 Apr 2020 15:52:47 +0000 (17:52 +0200)]
detect/files: remove unused prototypes
Victor Julien [Sun, 5 Apr 2020 15:51:52 +0000 (17:51 +0200)]
detect/files: inspect api v2
Victor Julien [Sun, 5 Apr 2020 15:47:45 +0000 (17:47 +0200)]
detect/file: minor cleanup
Victor Julien [Mon, 19 Oct 2020 12:12:42 +0000 (14:12 +0200)]
detect/dnp3: convert to v2 inspect API
Victor Julien [Mon, 19 Oct 2020 12:12:21 +0000 (14:12 +0200)]
detect/dcerpc: convert to v2 inspect API
Victor Julien [Mon, 19 Oct 2020 12:11:26 +0000 (14:11 +0200)]
detect/dns: convert to v2 inspect API
Victor Julien [Mon, 19 Oct 2020 12:10:16 +0000 (14:10 +0200)]
detect/app-layer-event: convert to v2 inspect API
Victor Julien [Mon, 19 Oct 2020 13:49:13 +0000 (15:49 +0200)]
detect/stream: convert to inspect API v2
Victor Julien [Mon, 19 Oct 2020 13:49:02 +0000 (15:49 +0200)]
detect/payload: minor formatting fixup
Jason Ish [Tue, 1 Dec 2020 18:55:36 +0000 (12:55 -0600)]
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.
Jason Ish [Tue, 1 Dec 2020 21:46:46 +0000 (15:46 -0600)]
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.
Jason Ish [Tue, 1 Dec 2020 18:40:14 +0000 (12:40 -0600)]
github-ci: fedora 33 test build (based on fedora 32)
Jason Ish [Fri, 4 Dec 2020 21:16:36 +0000 (15:16 -0600)]
github-ci: remove fedora 31 (eol)
Victor Julien [Sun, 6 Dec 2020 19:16:43 +0000 (20:16 +0100)]
version: start 7.0.0 development
Victor Julien [Fri, 4 Dec 2020 06:54:18 +0000 (07:54 +0100)]
version: set to 6.0.1
Victor Julien [Fri, 4 Dec 2020 06:53:48 +0000 (07:53 +0100)]
changelog: update for 6.0.1
Philippe Antoine [Thu, 19 Nov 2020 13:30:56 +0000 (14:30 +0100)]
dnp3: regenerates C code with script
Philippe Antoine [Thu, 19 Nov 2020 13:30:27 +0000 (14:30 +0100)]
dnp3: avoids DOS by too long loop over null-sized objects
Philippe Antoine [Thu, 19 Nov 2020 13:29:48 +0000 (14:29 +0100)]
dnp3: fix memory leak with object containing bytearrays
Philippe Antoine [Thu, 19 Nov 2020 13:28:43 +0000 (14:28 +0100)]
dnp3: fix signed integer overflow
By using unsigned integers everywhere
Shivani Bhardwaj [Thu, 3 Dec 2020 11:30:17 +0000 (17:00 +0530)]
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.
Shivani Bhardwaj [Thu, 3 Dec 2020 11:13:17 +0000 (16:43 +0530)]
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.
Shivani Bhardwaj [Thu, 3 Dec 2020 11:25:39 +0000 (16:55 +0530)]
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.
Philippe Antoine [Tue, 3 Nov 2020 10:55:52 +0000 (11:55 +0100)]
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
Philippe Antoine [Tue, 10 Nov 2020 15:10:07 +0000 (16:10 +0100)]
http2: files inspection API fixes
uses right transaction id for file tracker
uses FILE_USE_DETECT for good matches with keyword startswith
Philippe Antoine [Tue, 10 Nov 2020 09:21:32 +0000 (10:21 +0100)]
http2: allow multiple size updates in one headers batch
cf RFC 7541 section 4.2
Victor Julien [Sat, 7 Nov 2020 14:34:35 +0000 (15:34 +0100)]
http2: avoid null pointer deref in alert output
Bug #4120.
Philippe Antoine [Fri, 16 Oct 2020 10:51:31 +0000 (12:51 +0200)]
http2: allow filestore to work with HTTP2
Philippe Antoine [Thu, 19 Nov 2020 13:10:58 +0000 (14:10 +0100)]
packet: set length of 0 for too big copy
Philippe Antoine [Sat, 31 Oct 2020 16:12:19 +0000 (17:12 +0100)]
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
Philippe Antoine [Thu, 15 Oct 2020 20:51:52 +0000 (22:51 +0200)]
smb: do not rely on one valid NBSS byte for probing
Need to have the SMB header so as to validate
Philippe Antoine [Thu, 15 Oct 2020 19:32:27 +0000 (21:32 +0200)]
ssl: upgarde to uint32 for bytes_processed
as it can overflow, and is compared with uint32 such as
message_length and message_start and
Philippe Antoine [Wed, 14 Oct 2020 19:25:40 +0000 (21:25 +0200)]
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
Victor Julien [Thu, 3 Dec 2020 11:10:22 +0000 (12:10 +0100)]
configure: require libhtp 0.5.36
Philippe Antoine [Mon, 13 Jul 2020 09:06:58 +0000 (11:06 +0200)]
doc: explicit header normalization further
And their concatenation as described in RFC 2616
Victor Julien [Wed, 2 Dec 2020 12:31:52 +0000 (13:31 +0100)]
github-ci: CentOS 6 is EOL
Philippe Antoine [Wed, 25 Nov 2020 14:20:02 +0000 (15:20 +0100)]
doc: http.uri.raw has no spaces
as they are in the protocol
cf bug #2881
Jason Ish [Mon, 30 Nov 2020 21:11:57 +0000 (15:11 -0600)]
rust: handle windows naming change from .lib to .a
Prior to Rust 1.44, Cargo would name static libs with the .lib
extension. 1.44 changes this extension to .a when running under
a GNU environment on Windows like msys to make it more similar
to other unix environments.
Now assume static library name to be the same on Windows and
unix, but rename the .lib if found to still support older
versions of Rust on Windows.
Jason Ish [Mon, 30 Nov 2020 21:37:02 +0000 (15:37 -0600)]
configure/mingw: move libs in LDFLAGS to LDADD
Moving the libs specified in LDFLAGS to LDADD put them into the
correct placement on in the link command.
Philippe Antoine [Mon, 16 Nov 2020 09:12:55 +0000 (10:12 +0100)]
rust: do not rebuild stdlib when coverage is enabled
Because both seem incompatible for now
Philippe Antoine [Thu, 19 Nov 2020 13:10:08 +0000 (14:10 +0100)]
fuzz: check PacketCopyData return value before processing packet
Philippe Antoine [Tue, 3 Nov 2020 10:21:06 +0000 (11:21 +0100)]
fuzz: limit memcap for datasets when fuzzing
Philippe Antoine [Sat, 31 Oct 2020 15:51:09 +0000 (16:51 +0100)]
dnp3: better limit for tests when fuzzing
Philippe Antoine [Thu, 15 Oct 2020 20:50:42 +0000 (22:50 +0200)]
fuzz: improves detect proto target
By mimicking assert message so as to clusterfuzz differentiates
between failures
Victor Julien [Mon, 30 Nov 2020 06:44:54 +0000 (07:44 +0100)]
detect: fix inspection order with stateful rules
When stateful detection rules, for which detection has already started
for a previous packet, are added to the candidates array, the array
is sorted to mantain the correct inspection order. However, due to a
trivial error in the sort helper the array was sorted in descending
instead of ascending order.
Victor Julien [Thu, 26 Nov 2020 10:03:21 +0000 (11:03 +0100)]
dcerpc/udp: fix transaction handling and logging
Implement missing transaction handling.
Fix logging wrongly casting 'state' to DCERPCState instead of
DCERPCUDPState leading to crashes and malformed output.
Remove unused fields from DCERPCUDPState.
Victor Julien [Wed, 25 Nov 2020 08:49:54 +0000 (09:49 +0100)]
detect/mpm: remove usused cleanup function
Victor Julien [Wed, 25 Nov 2020 08:22:44 +0000 (09:22 +0100)]
detect: optimize prefilter result handling
Victor Julien [Wed, 25 Nov 2020 08:22:21 +0000 (09:22 +0100)]
detect/prefilter: small cleanup
Jason Ish [Fri, 20 Nov 2020 15:15:37 +0000 (09:15 -0600)]
github-ci: check for duplicate SIDs in rules/
Jason Ish [Wed, 18 Nov 2020 22:44:38 +0000 (16:44 -0600)]
rules/mqtt: renumber mqtt events to avoid conflict with ssh
Both SSH and MQTT events were in the
2228000 range. As SSH was
added first, renumber MQTT events into the
2229000 range which is
free.
Philippe Antoine [Thu, 19 Nov 2020 14:50:54 +0000 (15:50 +0100)]
rust: fix warnings found by nightly compiler
warning: getting the inner pointer of a temporary `CString`
this `CString` is deallocated at the end of the statement,
bind it to a variable to extend its lifetime
Victor Julien [Mon, 23 Nov 2020 20:59:18 +0000 (21:59 +0100)]
decode/null: fix type parsing
Victor Julien [Mon, 23 Nov 2020 20:57:36 +0000 (21:57 +0100)]
atomics: fix compilation on ppc64
Jason Ish [Mon, 23 Nov 2020 18:11:42 +0000 (12:11 -0600)]
dnp3: set byte order when logging dnp3 src and dst
DNP3 uses little endian on the wire, for the most part this
is handled as the messages are deserialize. However, the link
header is a cast over raw data, so swap these bytes as they
are being logged.
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4173
Victor Julien [Thu, 19 Nov 2020 21:01:40 +0000 (22:01 +0100)]
github-ci: windows in builds
Victor Julien [Thu, 5 Nov 2020 14:31:58 +0000 (15:31 +0100)]
doc/userguide: update http keywords