]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
3 years agorust: derive crate: for custom derives
Jason Ish [Mon, 13 Jan 2020 04:56:47 +0000 (22:56 -0600)] 
rust: derive crate: for custom derives

Currently has one derive, AppLayerEvent to be used like:

  #[derive(AppLayerEvent)]
  pub enum DNSEvent {
      MalformedData,
      NotRequest,
      NotResponse,
      ZFlagSet,
  }

Code will be generated to:
- Convert enum to a c type string
- Convert string to enum variant
- Convert id to enum variant

3 years agorust/applayer: define AppLayerEvent trait
Jason Ish [Mon, 19 Oct 2020 16:30:29 +0000 (10:30 -0600)] 
rust/applayer: define AppLayerEvent trait

The derive macro will implement this trait for app-layer
event enums.

3 years agomacset: adjust test to pass after fix
Victor Julien [Mon, 30 Aug 2021 19:56:24 +0000 (21:56 +0200)] 
macset: adjust test to pass after fix

3 years agoci: dummy git configuration for rebase
Philippe Antoine [Fri, 27 Aug 2021 15:36:50 +0000 (17:36 +0200)] 
ci: dummy git configuration for rebase

3 years agomacset: fix memory size check
Eric Leblond [Fri, 20 Aug 2021 12:41:20 +0000 (14:41 +0200)] 
macset: fix memory size check

3 years agoflow: be sure to check hash till the end
Eric Leblond [Fri, 20 Aug 2021 08:42:13 +0000 (10:42 +0200)] 
flow: be sure to check hash till the end

3 years agoflow: add comment on flow handling
Eric Leblond [Thu, 19 Aug 2021 14:30:50 +0000 (16:30 +0200)] 
flow: add comment on flow handling

3 years agostream: increase memcap on memory errors
Eric Leblond [Thu, 19 Aug 2021 09:22:06 +0000 (11:22 +0200)] 
stream: increase memcap on memory errors

3 years agoutil/streaming: improve error handling
Eric Leblond [Thu, 19 Aug 2021 09:21:21 +0000 (11:21 +0200)] 
util/streaming: improve error handling

It differentiates memory error than regular ones.

3 years agoflow: fix a debug assert
Eric Leblond [Sun, 15 Aug 2021 10:17:23 +0000 (12:17 +0200)] 
flow: fix a debug assert

As the FlowBypassedTimeout function is interacting with the capture
method it is possible that the return changes between the call that
did trigger the timeout and the actual state (ie if packets arrive
in between the two calls). So we should not use the call to
FlowBypassedTimeout in the assert.

3 years agoflow: document FlowBypassedTimeout
Eric Leblond [Sat, 14 Aug 2021 21:08:01 +0000 (23:08 +0200)] 
flow: document FlowBypassedTimeout

Main point is to document it is interacting with the capture
layer.

3 years agoflow: more accurate flow counters
Eric Leblond [Sat, 14 Aug 2021 21:05:03 +0000 (23:05 +0200)] 
flow: more accurate flow counters

Don't increment the flow timeout counter for flows that are not
really timeout (as use_cnt is non zero). And also don't take into
account bypassed flows in the counter for flow timeout in use.

3 years agoflow/worker: handle timeout edge case
Victor Julien [Mon, 30 Aug 2021 08:53:49 +0000 (10:53 +0200)] 
flow/worker: handle timeout edge case

In the flow worker timeout path it is assumed that we can hand off
flows to the recycler after processing, implying that `Flow::use_cnt` is 0.
However, there was a case where this assumption was incorrect.

When during flow timeout handling the last processed data would trigger a
protocol upgrade, two additional pseudo packets would be created that were
then pushed all the way through the engine packet paths. This would mean
they both took a flow reference and would hold that until after the flow
was handed off to the recycler. Thread safety implementation would make
sure this didn't lead to crashes.

This patch handles this case returning these packets to the pool from
the timeout handling.

3 years agoflow/worker: set proper end flag
Victor Julien [Fri, 30 Jul 2021 19:15:28 +0000 (21:15 +0200)] 
flow/worker: set proper end flag

3 years agoflow/manager: set proper end flag
Victor Julien [Fri, 30 Jul 2021 18:12:05 +0000 (20:12 +0200)] 
flow/manager: set proper end flag

3 years agodetect: debug validation for list ids overflows
Philippe Antoine [Mon, 30 Aug 2021 20:01:18 +0000 (22:01 +0200)] 
detect: debug validation for list ids overflows

3 years agodetect: move init only array to init data
Victor Julien [Fri, 19 Feb 2021 10:57:57 +0000 (11:57 +0100)] 
detect: move init only array to init data

3 years agodetect/analyzer: use rule style pretty print for patterns
Victor Julien [Thu, 18 Feb 2021 14:03:47 +0000 (15:03 +0100)] 
detect/analyzer: use rule style pretty print for patterns

3 years agodetect/content: generalize pattern pretty printing
Victor Julien [Thu, 18 Feb 2021 13:22:41 +0000 (14:22 +0100)] 
detect/content: generalize pattern pretty printing

3 years agodetect/profile: add support for tx inspection
Victor Julien [Thu, 18 Feb 2021 09:03:53 +0000 (10:03 +0100)] 
detect/profile: add support for tx inspection

Add 'inspect_type' "packet" and "tx" for the two record types. Add more metadata
when available.

3 years agodetect/analyze: dump patterns facility
Victor Julien [Tue, 16 Feb 2021 16:43:08 +0000 (17:43 +0100)] 
detect/analyze: dump patterns facility

Dump all patterns to `patterns.json`, with the pattern, a total count (`cnt`),
count of how many times this pattern is the mpm (`mpm`) and some of the flags.

Patterns are listed per buffer. So payload, http_uri, etc.

3 years agodetect/content: add some more dsize tests
Victor Julien [Mon, 15 Feb 2021 08:50:03 +0000 (09:50 +0100)] 
detect/content: add some more dsize tests

3 years agodetect/dsize: set depth flag when applying dsize as depth
Victor Julien [Fri, 5 Feb 2021 21:01:55 +0000 (22:01 +0100)] 
detect/dsize: set depth flag when applying dsize as depth

3 years agodetect/analyzer: count mpm with depth, endswith
Victor Julien [Sat, 6 Feb 2021 09:35:14 +0000 (10:35 +0100)] 
detect/analyzer: count mpm with depth, endswith

3 years agodetect/analyzer: show payload separately in group dumping
Victor Julien [Mon, 8 Feb 2021 21:06:41 +0000 (22:06 +0100)] 
detect/analyzer: show payload separately in group dumping

3 years agodetect/analyzer: add icmp to rule group output
Victor Julien [Mon, 8 Feb 2021 08:41:22 +0000 (09:41 +0100)] 
detect/analyzer: add icmp to rule group output

3 years agodetect/analyzer: display per rule prefilter details
Victor Julien [Mon, 8 Feb 2021 07:28:37 +0000 (08:28 +0100)] 
detect/analyzer: display per rule prefilter details

3 years agodetect/analyzer: count prefilter per rule group
Victor Julien [Mon, 8 Feb 2021 07:28:09 +0000 (08:28 +0100)] 
detect/analyzer: count prefilter per rule group

3 years agodetect/analyzer: add per rule mpm block to rules.json
Victor Julien [Sat, 6 Feb 2021 20:38:31 +0000 (21:38 +0100)] 
detect/analyzer: add per rule mpm block to rules.json

3 years agodetect/analyzer: support buffer names in sgh dump
Victor Julien [Sat, 6 Feb 2021 07:47:58 +0000 (08:47 +0100)] 
detect/analyzer: support buffer names in sgh dump

3 years agoflow: determine packet direction once per packet
Victor Julien [Tue, 26 Feb 2019 09:43:58 +0000 (10:43 +0100)] 
flow: determine packet direction once per packet

3 years agodecode: convert 'action' macros to inline funcs
Victor Julien [Sat, 16 Nov 2019 18:20:31 +0000 (19:20 +0100)] 
decode: convert 'action' macros to inline funcs

Make sure most common branch is handled first to assist branch
prediction.

Macros still play a small role to please our 'action' cocci check.

3 years agodetect/mpm: turn factory array into list
Victor Julien [Mon, 8 Feb 2021 21:08:49 +0000 (22:08 +0100)] 
detect/mpm: turn factory array into list

3 years agodetect/stream: don't run mpm on packet if stream is available
Victor Julien [Tue, 9 Feb 2021 19:22:54 +0000 (20:22 +0100)] 
detect/stream: don't run mpm on packet if stream is available

3 years agodoc: escape dot in pcre 6306/head
myr463 [Wed, 9 Dec 2020 16:48:34 +0000 (17:48 +0100)] 
doc: escape dot in pcre

3 years agounix-socket: Avoid spurious logs on close
Michael Smith [Tue, 22 Jun 2021 02:33:47 +0000 (22:33 -0400)] 
unix-socket: Avoid spurious logs on close

Avoid spurious logs when suricatasc closes connection.

Use SCLogDebug for control connection EOF, and SCLogError for an error.

As Chandan Chowdhury described in redmine 3685. This makes the logging
consistent with the older `if (client->version <= UNIX_PROTO_V1)` block
about 20 lines above, and avoids polluting the logs with
`Unix socket: lost connection with client`.

3 years agoci: rebase specified s-v pr
Philippe Antoine [Mon, 5 Jul 2021 14:37:03 +0000 (16:37 +0200)] 
ci: rebase specified s-v pr

So that CI does not fail, if suricata PR got upgraded in a new
version, but S-V PR did not get upgraded, and S-V changed
in master

3 years agodnp3: regenerate object decoding code
Philippe Antoine [Thu, 8 Jul 2021 13:02:50 +0000 (15:02 +0200)] 
dnp3: regenerate object decoding code

Ticket: #4558
So as to avoid intra-structure overflow

3 years agodnp3: adds bounds check for prefix chararray
Philippe Antoine [Thu, 8 Jul 2021 13:01:15 +0000 (15:01 +0200)] 
dnp3: adds bounds check for prefix chararray

Ticket: #4558
Avoids intra structure overflow

3 years agodnp3: use base64 macro in gen script
Philippe Antoine [Thu, 8 Jul 2021 12:57:56 +0000 (14:57 +0200)] 
dnp3: use base64 macro in gen script

As is done already in C
cf commit ea0936199d142fc52ec69baf7984cbdd92dd4705

3 years agothreading: don't pass locked flow between threads
Victor Julien [Wed, 18 Aug 2021 18:14:48 +0000 (20:14 +0200)] 
threading: don't pass locked flow between threads

Previously the flow manager would share evicted flows with the workers
while keeping the flows mutex locked. This reduced the number of unlock/
lock cycles while there was guaranteed to be no contention.

This turns out to be undefined behavior. A lock is supposed to be locked
and unlocked from the same thread. It appears that FreeBSD is stricter on
this than Linux.

This patch addresses the issue by unlocking before handing a flow off
to another thread, and locking again from the new thread.

Issue was reported and largely analyzed by Bill Meeks.

Bug: #4478

3 years agorust(lint): suppress clippy lints that we should fix 6304/head
Jason Ish [Fri, 20 Aug 2021 17:44:17 +0000 (11:44 -0600)] 
rust(lint): suppress clippy lints that we should fix

Suppress all remaining clippy lints that we trip. This can be
fixed on a per-lint basis.

3 years agorust(lint): remove manual implement of map method
Jason Ish [Fri, 20 Aug 2021 17:41:40 +0000 (11:41 -0600)] 
rust(lint): remove manual implement of map method

Using `if let` expressions in these cases is better expressed
by the map method, and considered idiomatic Rust for this usage.

3 years agorust(lint): map the error instead of using or_else
Jason Ish [Fri, 20 Aug 2021 17:38:31 +0000 (11:38 -0600)] 
rust(lint): map the error instead of using or_else

This is the preffered style and easier to understand the meaning
of the code.

3 years agorust(lint): replace push_str of single char to push(<char>)
Jason Ish [Fri, 20 Aug 2021 17:31:48 +0000 (11:31 -0600)] 
rust(lint): replace push_str of single char to push(<char>)

3 years agorust(lint): fix some usages of references
Jason Ish [Fri, 20 Aug 2021 17:31:03 +0000 (11:31 -0600)] 
rust(lint): fix some usages of references

- ref is discouraged for top level variables
- the other borrow is not required

3 years agorust(lint): replace checked_mul with saturating_mul
Jason Ish [Fri, 20 Aug 2021 17:29:37 +0000 (11:29 -0600)] 
rust(lint): replace checked_mul with saturating_mul

When defaulting checked_mul to u64::max, Rust has a method
that does the same thing called saturating_mul.

3 years agorust(lint): removed unused unit () return
Jason Ish [Fri, 20 Aug 2021 17:20:49 +0000 (11:20 -0600)] 
rust(lint): removed unused unit () return

This is code that is not needed and is a bit confusing to see.

3 years agorust(lint): remove extra parens around bitwise or
Jason Ish [Fri, 20 Aug 2021 17:17:59 +0000 (11:17 -0600)] 
rust(lint): remove extra parens around bitwise or

This is a readability fix, as on first look they almost look
like a Rust tuple.

3 years agorust(lint): remove useless conversions and clones
Jason Ish [Fri, 20 Aug 2021 17:11:23 +0000 (11:11 -0600)] 
rust(lint): remove useless conversions and clones

These add complexity and may not be optimized out by the compiler.

3 years agorust(lint): remove useless format calls
Jason Ish [Fri, 20 Aug 2021 17:03:45 +0000 (11:03 -0600)] 
rust(lint): remove useless format calls

In these simple cases to_string() is recommended and likely
performs better as the formatter is not called.

3 years agorust(lint): don't use unwrap_or for function calls
Jason Ish [Fri, 20 Aug 2021 16:59:41 +0000 (10:59 -0600)] 
rust(lint): don't use unwrap_or for function calls

Calling a function in unwrap_or causes that function to always
be called even when not needed. Instead use unwrap_or_else with
a closure which will only be called when needed.

3 years agorust(lint): fix redundant closures
Jason Ish [Fri, 20 Aug 2021 16:51:46 +0000 (10:51 -0600)] 
rust(lint): fix redundant closures

This lint checks for a closure where a function can be directly
supplied.  Runtime performance is unchanged, but this makes
less work for the compiler.

3 years agorust(lint): remove needless borrows
Jason Ish [Fri, 20 Aug 2021 16:22:30 +0000 (10:22 -0600)] 
rust(lint): remove needless borrows

These are needless borrows (references) as the item is already
a reference.

3 years agorust: functions that reference raw pointers are unsafe
Jason Ish [Mon, 26 Jul 2021 21:53:44 +0000 (15:53 -0600)] 
rust: functions that reference raw pointers are unsafe

Based on the Rust clippy lint that recommends that any public
function that dereferences a raw pointer, mark all FFI functions
that reference raw pointers with build_slice and cast_pointer
as unsafe.

This commits starts by removing the unsafe wrapper inside
the build_slice and cast_pointer macros then marks all
functions that use these macros as unsafe.

Then fix all not_unsafe_ptr_arg_deref warnings from clippy.

Fixes clippy lint:
https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref

3 years agorust: remove all usage of transmute
Jason Ish [Mon, 26 Jul 2021 19:25:17 +0000 (13:25 -0600)] 
rust: remove all usage of transmute

All cases of our transmute can be replaced with more idiomatic
solutions and do no require the power of transmute.

When returning an object to C for life-time management, use
Box::into_raw to convert the boxed object to pointer and use
Box::from_raw to convert back.

For cases where we're just returning a pointer to Rust managed
data, use a cast.

3 years agooutput/redis: Fix possible segv
KevinWang [Fri, 6 Aug 2021 11:39:04 +0000 (19:39 +0800)] 
output/redis: Fix possible segv

3 years agoqa: use time on fuzz targets being run on corpus
Philippe Antoine [Thu, 22 Jul 2021 16:54:16 +0000 (18:54 +0200)] 
qa: use time on fuzz targets being run on corpus

4 years agostream-tcp-reassemble: fix typo, updt copyright yr 6290/head
Juliana Fajardini [Tue, 10 Aug 2021 16:28:55 +0000 (17:28 +0100)] 
stream-tcp-reassemble: fix typo, updt copyright yr

4 years agostream-tcp-reassemble: fix ConfGetBool unc'kd call
Juliana Fajardini [Tue, 10 Aug 2021 16:27:32 +0000 (17:27 +0100)] 
stream-tcp-reassemble: fix ConfGetBool unc'kd call

4 years agostream-tcp: fix typos, update copyright year
Juliana Fajardini [Tue, 10 Aug 2021 16:17:19 +0000 (17:17 +0100)] 
stream-tcp: fix typos, update copyright year

4 years agostream-tcp: fix ConfGetBool unchecked call
Juliana Fajardini [Tue, 10 Aug 2021 15:31:17 +0000 (16:31 +0100)] 
stream-tcp: fix ConfGetBool unchecked call

4 years agoutil-napatech: fix typos, update copyright year
Juliana Fajardini [Tue, 10 Aug 2021 15:29:31 +0000 (16:29 +0100)] 
util-napatech: fix typos, update copyright year

4 years agoutil-napatech: fix ConfGetBool unchecked call
Juliana Fajardini [Tue, 10 Aug 2021 15:03:50 +0000 (16:03 +0100)] 
util-napatech: fix ConfGetBool unchecked call

4 years agoutil-debug: fix unchecked ConfGetBool call
Juliana Fajardini [Tue, 10 Aug 2021 14:57:48 +0000 (15:57 +0100)] 
util-debug: fix unchecked ConfGetBool call

4 years agonfs: minor code cleanup 6287/head
Victor Julien [Fri, 6 Aug 2021 11:16:13 +0000 (13:16 +0200)] 
nfs: minor code cleanup

4 years agosmb: minor formatting fixup
Victor Julien [Fri, 6 Aug 2021 11:15:58 +0000 (13:15 +0200)] 
smb: minor formatting fixup

4 years agosmb: minor code cleanup
Victor Julien [Fri, 6 Aug 2021 11:15:43 +0000 (13:15 +0200)] 
smb: minor code cleanup

4 years agosmtp: fix clang fmt 6285/head
Shivani Bhardwaj [Thu, 8 Jul 2021 12:12:07 +0000 (17:42 +0530)] 
smtp: fix clang fmt

4 years agonfs: fix comment
Shivani Bhardwaj [Fri, 25 Jun 2021 11:42:22 +0000 (17:12 +0530)] 
nfs: fix comment

4 years agonfs: Add rust registration function
Shivani Bhardwaj [Thu, 24 Jun 2021 10:42:55 +0000 (16:12 +0530)] 
nfs: Add rust registration function

Get rid of the C glue code and move registration completely to Rust.

4 years agonfs: add missing code from rust impl of fns
Shivani Bhardwaj [Sat, 26 Jun 2021 11:13:35 +0000 (16:43 +0530)] 
nfs: add missing code from rust impl of fns

4 years agonfs: Change fn sign as per rust registration requirement
Shivani Bhardwaj [Fri, 21 May 2021 10:01:16 +0000 (15:31 +0530)] 
nfs: Change fn sign as per rust registration requirement

Registering parsers in Rust requires signatures to be a certain way and
compatible with C. Change signatures of all the functions.
Probe fn has also been changed to return AppProto as required by the new
fn signature.

4 years agosmb: Add rust registration function
Shivani Bhardwaj [Sat, 19 Jun 2021 07:53:14 +0000 (13:23 +0530)] 
smb: Add rust registration function

Get rid of the C glue code and move registration completely to Rust.

4 years agosmb: add missing code from rust impl of fns
Shivani Bhardwaj [Tue, 29 Jun 2021 09:30:07 +0000 (15:00 +0530)] 
smb: add missing code from rust impl of fns

4 years agosmb: Change fn sign as per rust registration requirement
Shivani Bhardwaj [Fri, 18 Jun 2021 11:40:37 +0000 (17:10 +0530)] 
smb: Change fn sign as per rust registration requirement

Registering parsers in Rust requires signatures to be a certain way and
compatible with C. Change signatures of all the functions.

4 years agosmb: add constants
Shivani Bhardwaj [Mon, 28 Jun 2021 11:55:55 +0000 (17:25 +0530)] 
smb: add constants

4 years agorust/core: Add flow flags
Shivani Bhardwaj [Mon, 21 Jun 2021 11:06:42 +0000 (16:36 +0530)] 
rust/core: Add flow flags

4 years agoflow: provide flags accessor function
Jason Ish [Fri, 14 May 2021 15:29:54 +0000 (09:29 -0600)] 
flow: provide flags accessor function

Add an accessor function for flow flags. To be used by Rust where
the flow struct is an opaque data type.

4 years agorust/applayer: add more externs
Shivani Bhardwaj [Thu, 6 May 2021 12:01:04 +0000 (17:31 +0530)] 
rust/applayer: add more externs

4 years agostream: check if ACK packet is outdated 6248/head
Victor Julien [Mon, 4 Jan 2021 21:10:08 +0000 (22:10 +0100)] 
stream: check if ACK packet is outdated

Outdated packets are ACK packets w/o data that have an ACK value
lower than our last_ack and also don't have an SACK records that
are new.

This can happen when some packets come in later than others (possibly
due to different paths taken).

4 years agostream/sack: clean up includes
Victor Julien [Fri, 8 Jan 2021 07:59:29 +0000 (08:59 +0100)] 
stream/sack: clean up includes

4 years agostream/sack: minor debug improvements
Victor Julien [Mon, 4 Jan 2021 21:10:58 +0000 (22:10 +0100)] 
stream/sack: minor debug improvements

4 years agostream: minor debug additions
Victor Julien [Thu, 31 Dec 2020 09:53:08 +0000 (10:53 +0100)] 
stream: minor debug additions

4 years agodoc/dcerpc: add proto keywords
Shivani Bhardwaj [Wed, 24 Feb 2021 08:05:37 +0000 (13:35 +0530)] 
doc/dcerpc: add proto keywords

4 years agomqtt: enable in config and remove misleading comment
Sascha Steinbiss [Sat, 26 Jun 2021 11:40:09 +0000 (13:40 +0200)] 
mqtt: enable in config and remove misleading comment

4 years agostream: update memcaps in code to match config
Victor Julien [Thu, 1 Jul 2021 14:31:35 +0000 (16:31 +0200)] 
stream: update memcaps in code to match config

4 years agoapp-layer/pd: review bailout conditions
Philippe Antoine [Wed, 9 Jun 2021 10:09:23 +0000 (12:09 +0200)] 
app-layer/pd: review bailout conditions

To take TCP window into account
And to actually bail out if we received too much data
where the limit is configured by stream.reassembly.depth

4 years agoapp-layer/pd: only consider actual available data
Victor Julien [Wed, 21 Apr 2021 13:20:49 +0000 (15:20 +0200)] 
app-layer/pd: only consider actual available data

For size limit checks consider only available data at the stream start
and before any GAPS.

The old check would consider too much data if there were temporary gaps,
like when a data packet was in-window but (far) ahead of the expected
segment.

4 years agostreaming/buffer: account sbb data size
Victor Julien [Fri, 4 Jun 2021 13:31:33 +0000 (15:31 +0200)] 
streaming/buffer: account sbb data size

When tracking data track the size of the blocks so that in case
of gaps we can still know how much data we hold.

4 years agodetect/iprep: convert to FAIL/PASS API 6242/head 6261/head
Juliana Fajardini [Tue, 29 Jun 2021 21:05:21 +0000 (22:05 +0100)] 
detect/iprep: convert to FAIL/PASS API

4 years agomodbus: do not claim to handle gaps
Philippe Antoine [Mon, 21 Jun 2021 07:57:09 +0000 (09:57 +0200)] 
modbus: do not claim to handle gaps

4 years agodoc: Grammar Correction
showipintbri [Thu, 10 Jun 2021 21:32:34 +0000 (17:32 -0400)] 
doc: Grammar Correction

4 years agocounters: only print alerts if stats are enabled
Shivani Bhardwaj [Mon, 21 Jun 2021 18:35:06 +0000 (00:05 +0530)] 
counters: only print alerts if stats are enabled

4 years agodetect: fix typos and update copyright year
Juliana Fajardini [Mon, 21 Jun 2021 09:50:04 +0000 (10:50 +0100)] 
detect: fix typos and update copyright year

4 years agodetect: fix bug where rule without sid is accepted
Juliana Fajardini [Thu, 17 Jun 2021 16:18:09 +0000 (17:18 +0100)] 
detect: fix bug where rule without sid is accepted

Before, if Suricata parsed a rule without a 'sid' option, instead of
failing that rule, the rule was parsed and attributed a sid 0.
Changes to:
detect-parse:
- add logic to filter out rules without sid;
- change unittest which didn't have a sid, but used to pass.
detect-sid: add unittest for rules without sid or with sid: 0

4 years agofuzz: only build fuzz_sigpcap_aware if asked
Philippe Antoine [Mon, 21 Jun 2021 08:04:10 +0000 (10:04 +0200)] 
fuzz: only build fuzz_sigpcap_aware if asked

With the other fuzz targets, and do not build it if fuzzpcap
is available but we did not want to build the fuzz targets

4 years agorust: fix warnings with nightly
Sascha Steinbiss [Tue, 22 Jun 2021 07:33:24 +0000 (09:33 +0200)] 
rust: fix warnings with nightly

4 years agostream/tcp: limit ACK validation
Eric Leblond [Fri, 28 May 2021 10:19:45 +0000 (12:19 +0200)] 
stream/tcp: limit ACK validation

Only limit ACK value validation for packet where the ACK bit is
set.

4 years agostream/tcp: don't reject on bad ack
Eric Leblond [Fri, 28 May 2021 10:19:38 +0000 (12:19 +0200)] 
stream/tcp: don't reject on bad ack

Not using a packet for the streaming analysis when a non zero
ACK value and ACK bit was unset was leading to evasion as it was
possible to start a session with a SYN packet with a non zero ACK
value to see the full TCP stream to escape all stream and application
layer detection.

This addresses CVE-2021-35063.

Fixes: fa692df37 ("stream: reject broken ACK packets")
Ticket: #4504.