]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
2 years agoutil/landlock: check return values for ConfGet 8462/head
Philippe Antoine [Wed, 25 Jan 2023 14:25:59 +0000 (15:25 +0100)] 
util/landlock: check return values for ConfGet

CID 1514671
CID 1514669

2 years agodcerpc: config limit maximum number of live transactions 8459/head
Philippe Antoine [Tue, 10 Jan 2023 10:08:36 +0000 (11:08 +0100)] 
dcerpc: config limit maximum number of live transactions

As is done for other protocols

Ticket: #5779

2 years agorules/decoder: add udp.len_invalid rule
Shivani Bhardwaj [Wed, 18 Jan 2023 01:35:08 +0000 (07:05 +0530)] 
rules/decoder: add udp.len_invalid rule

2 years agoeve/schema: add udp.len_invalid
Shivani Bhardwaj [Wed, 18 Jan 2023 01:24:55 +0000 (06:54 +0530)] 
eve/schema: add udp.len_invalid

2 years agodecode/udp: fix payload_len calculation
Shivani Bhardwaj [Wed, 4 Jan 2023 06:30:13 +0000 (12:00 +0530)] 
decode/udp: fix payload_len calculation

Fix payload_len calculation post removal of the condition that returned
error code if the length to the decode fn did not match the length of
header from the UDP packet.

Bug 5379

2 years agodecode/events: add event type UDP_LEN_INVALID
Shivani Bhardwaj [Wed, 18 Jan 2023 00:53:13 +0000 (06:23 +0530)] 
decode/events: add event type UDP_LEN_INVALID

2 years agodecode-udp: Allow shorter UDP packets than the remaining payload length
Lukas Sismis [Fri, 18 Nov 2022 15:13:58 +0000 (16:13 +0100)] 
decode-udp:  Allow shorter UDP packets than the remaining payload length

If the packet is shorter than IP payload length we no longer flag it as an
invalid UDP packet. UDP packet can be therefore shorter than IP payload.
Keyword "udp.hlen_invalid" became outdated as we no longer flag short UDP
packets as invalid.

Redmine ticket: #5693

2 years agohttp2: fix leak with range files
Philippe Antoine [Sat, 21 Jan 2023 17:19:47 +0000 (18:19 +0100)] 
http2: fix leak with range files

Ticket: #5808

May have been introduced by a24d7dc45c818054f97448ce42ca9ba270b3b8e4

Function http2_range_open expects to be called only when
tx.file_range is nil. One condition to ensure this is to check
that we are beginning the files contents. The filetracker field
file_open is not fit for this, as it may be reset to false.

2 years agolog-pcap: fix inverse logic error
Jason Ish [Tue, 24 Jan 2023 22:27:00 +0000 (16:27 -0600)] 
log-pcap: fix inverse logic error

We shouldn't early initialize when *offline*.  Instead this accidentally
delayed initializing when if an online mode, however its likely not to
have been noticed as delaying initializing in online mode is supported
as well.

2 years agorunmodes: fix memory leak
Philippe Antoine [Wed, 25 Jan 2023 14:01:52 +0000 (15:01 +0100)] 
runmodes: fix memory leak

By using constant for string instead of allocating and leaking it

CID: 1520497
CID: 1520500

2 years agotest: do not output non ascii character 8444/head
Philippe Antoine [Thu, 15 Sep 2022 13:26:46 +0000 (15:26 +0200)] 
test: do not output non ascii character

The unit test for content |aa bz| transforms in place the string
str to replace the 2 characters aa by one character 0xaa
Then, when z is not recognized as a valid hexadeicmal character,
the whole modified string is printed out, inclusing the non-ascii
0xaa

Ticket: #5558

2 years agostreaming: fix possible use after free
Victor Julien [Wed, 25 Jan 2023 11:29:09 +0000 (12:29 +0100)] 
streaming: fix possible use after free

Don't use ptr after freeing it. Reported by Coverity Scan.

2 years agostreaming: remove dead code
Victor Julien [Wed, 25 Jan 2023 10:58:11 +0000 (11:58 +0100)] 
streaming: remove dead code

As reported by Coverity Scan.

2 years agoflow: make next_ts unsigned
Victor Julien [Tue, 24 Jan 2023 19:54:40 +0000 (20:54 +0100)] 
flow: make next_ts unsigned

To silence a coverity warning.

2 years agotime: fix various time issues
Victor Julien [Tue, 24 Jan 2023 19:29:52 +0000 (20:29 +0100)] 
time: fix various time issues

Found by Coverity Scan.

2 years agodetect/ftp: use AppLayerResult API 8434/head
Shivani Bhardwaj [Mon, 23 Jan 2023 08:12:43 +0000 (13:42 +0530)] 
detect/ftp: use AppLayerResult API

2 years agostream: remove unused retval from fn description
Juliana Fajardini [Tue, 10 Jan 2023 22:23:47 +0000 (19:23 -0300)] 
stream: remove unused retval from fn description

2 years agouserguide/config: update log format symbols list
Juliana Fajardini [Tue, 10 Jan 2023 22:14:08 +0000 (19:14 -0300)] 
userguide/config: update log format symbols list

There were some possible format options missing after the recent changes
in the log format.

2 years agotls: accept validity before 1970
Philippe Antoine [Fri, 6 Jan 2023 09:42:56 +0000 (10:42 +0100)] 
tls: accept validity before 1970

modify TLS certificate decoding of validity timestamps
to support times between 1950 and 2049,
as per RFC 5280

Ticket: #3253

2 years agodetect: config keyword transaction logic fix
Philippe Antoine [Mon, 25 Jul 2022 08:33:42 +0000 (10:33 +0200)] 
detect: config keyword transaction logic fix

When the keyword config:logging disable,type tx is used,
OutputTxLog checks a flag to skip the transaction without logging
it, but AppLayerParserTransactionsCleanup waits for the
transaction to be marked as logged to clean it.

So, OutputTxLog now marks the tx as logged, so that it can
get cleaned away.

Ticket: #5456

2 years agosmb: set defaults for file transfer limits
Victor Julien [Tue, 24 Jan 2023 11:38:21 +0000 (12:38 +0100)] 
smb: set defaults for file transfer limits

Ticket: #5782.

2 years agostream/tcp: fix typos, update copyright year 8430/head
Juliana Fajardini [Thu, 19 Jan 2023 14:21:10 +0000 (11:21 -0300)] 
stream/tcp: fix typos, update copyright year

Bug #5765

2 years agoexceptions: ignore policy if stream.midstream=true
Juliana Fajardini [Thu, 19 Jan 2023 14:18:16 +0000 (11:18 -0300)] 
exceptions: ignore policy if stream.midstream=true

Set the engine to ignore the stream.midstream-policy if stream.midstream
is enabled.

If we had both stream.midstream AND stream.midstream_policy enabled,
this could lead to midstream flows being dropped (or bypassed, or...)
instead of being accepted by the engine, as it was probably meant when
the user enabled midstream flows.

Bug #5765

2 years agoexceptions: add master switch config option
Juliana Fajardini [Tue, 6 Dec 2022 21:29:34 +0000 (18:29 -0300)] 
exceptions: add master switch config option

This allows all traffic Exception Policies to be set from one
configuration point. All exception policy options are available in IPS
mode. Bypass, pass and auto (disabled) are also available in iDS mode

Exception Policies set up individually will overwrite this setup for the
given traffic exception.

Task #5219

2 years agodns: never return error on UDP DNS
Jason Ish [Sun, 15 Jan 2023 16:05:29 +0000 (10:05 -0600)] 
dns: never return error on UDP DNS

UDP parsers should never return error as it should indicate to Suricata
that an unrecoverable error has occurred.  UDP being record based for
the most part is almost always recoverable, at least for protocols like
DNS.

2 years agodns: split header and body parsing
Jason Ish [Wed, 21 Dec 2022 15:35:19 +0000 (09:35 -0600)] 
dns: split header and body parsing

As part of extra header validation, split out DNS body parsing to
avoid the overhead of parsing the header twice.

2 years agodns: validate header on every incoming message
Jason Ish [Wed, 21 Dec 2022 01:30:29 +0000 (19:30 -0600)] 
dns: validate header on every incoming message

As UDP streams getting probed, a stream that does not appear to be DNS
at first, may have a single packet that does look close enough to DNS
to be picked up as DNS causing every subsequent packet to result in a
parser error.

To mitigate this, probe every incoming DNS message header for validity
before continuing onto the body.  If the header doesn't validate as
DNS, just ignore the packet so no parse error is registered.

2 years agodns: parse and alert on invalid opcodes
Jason Ish [Wed, 21 Dec 2022 01:17:38 +0000 (19:17 -0600)] 
dns: parse and alert on invalid opcodes

Accept DNS messages with an invalid opcode that are otherwise
valid. Such DNS message will create a parser event.

This is a change of behavior, previously an invalid opcode would cause
the DNS message to not be detected or parsed as DNS.

Issue: #5444

2 years agogithub-ci: fedora non-root: suricata-verify -q
Jason Ish [Tue, 20 Dec 2022 19:37:58 +0000 (13:37 -0600)] 
github-ci: fedora non-root: suricata-verify -q

Run Suricata-Verify in quiet mode for the non-root build to more
easily find the error when fails.

2 years agodns: rustfmt
Jason Ish [Wed, 21 Dec 2022 15:02:00 +0000 (09:02 -0600)] 
dns: rustfmt

2 years agodns: mark test buffers with rustfmt::skip
Jason Ish [Wed, 21 Dec 2022 15:01:15 +0000 (09:01 -0600)] 
dns: mark test buffers with rustfmt::skip

2 years agolog-pcap: remove early output initializing if offline
Jason Ish [Wed, 18 Jan 2023 18:33:48 +0000 (12:33 -0600)] 
log-pcap: remove early output initializing if offline

Remove early opening of output files if running in an offline mode, as
we don't yet know the timestamp to use.

Prevents the first pcap files being opened with a timestamp of 0,
bringing us back to the same behvaviour of pcap logging in 6.0.

Issue: 5374

2 years agolog-pcap: fix typo in multi-mode error message
Jason Ish [Wed, 18 Jan 2023 17:59:26 +0000 (11:59 -0600)] 
log-pcap: fix typo in multi-mode error message

2 years agolog-pcap: display mininum limit on error
Jason Ish [Wed, 18 Jan 2023 17:45:44 +0000 (11:45 -0600)] 
log-pcap: display mininum limit on error

On fatal error due to limit being less than the allowed minimum,
display the minimum value in bytes.

2 years agoutil-debug: clang-format required change
Lukas Sismis [Wed, 18 Jan 2023 06:33:03 +0000 (13:33 +0700)] 
util-debug: clang-format required change

2 years agorunmodes: Determine engine's copy-mode as early as possible
Lukas Sismis [Wed, 28 Dec 2022 04:49:02 +0000 (11:49 +0700)] 
runmodes: Determine engine's copy-mode as early as possible

Configuration and behavior of HTP app layer depends on the copy
mode of Suricata engine. Copy mode was set after the app layer setup.
Decision of engine's copy mode operation is now made earlier.

Ticket: #5706

2 years agorunmodes: remove misleading commment
Lukas Sismis [Tue, 22 Nov 2022 22:51:45 +0000 (23:51 +0100)] 
runmodes: remove misleading commment

2 years agodpdk: add support for enabling IPS support in DPDK mode
Lukas Sismis [Wed, 19 Oct 2022 21:18:59 +0000 (23:18 +0200)] 
dpdk: add support for enabling IPS support in DPDK mode

2 years agoutil-device: remove unused functions
Lukas Sismis [Wed, 18 Jan 2023 05:32:00 +0000 (12:32 +0700)] 
util-device: remove unused functions

2 years agorunmodes: change function prototype of runmode init functions
Lukas Sismis [Wed, 19 Oct 2022 21:17:49 +0000 (23:17 +0200)] 
runmodes: change function prototype of runmode init functions

Commit contains prototype changes of RunModeSetLiveCaptureAutoFp and
RunModeSetLiveCaptureWorkers functions to move the IPS enable logic
out of suricata.c file.

2 years agodpdk: port deprecated DPDK macros to the newer forms
Lukas Sismis [Thu, 13 Oct 2022 13:12:27 +0000 (15:12 +0200)] 
dpdk: port deprecated DPDK macros to the newer forms

2 years agodpdk: add Github action to build Suricata with all available (LTS) DPDK versions
Lukas Sismis [Wed, 12 Oct 2022 06:23:58 +0000 (08:23 +0200)] 
dpdk: add Github action to build Suricata with all available (LTS) DPDK versions

2 years agodpdk: print debug xstats counters of all DPDK ports on shutdown
Lukas Sismis [Wed, 21 Sep 2022 14:16:36 +0000 (16:16 +0200)] 
dpdk: print debug xstats counters of all DPDK ports on shutdown

2 years agodpdk: add a check for HW checksum validation offload
Lukas Sismis [Wed, 21 Sep 2022 14:15:18 +0000 (16:15 +0200)] 
dpdk: add a check for HW checksum validation offload

Ticket: #5553

2 years agotime: -Wstrict-prototypes fix
Victor Julien [Thu, 19 Jan 2023 13:10:41 +0000 (14:10 +0100)] 
time: -Wstrict-prototypes fix

2 years agotime: Rework SCTime_t into a struct
Jeff Lucovsky [Mon, 16 Jan 2023 15:57:46 +0000 (10:57 -0500)] 
time: Rework SCTime_t into a struct

Issue: 5718

This commit changes SCTime_t to a struct with members setup as
bitfields.

2 years agotime: Replace struct timeval with scalar value
Jeff Lucovsky [Sun, 15 Jan 2023 16:15:11 +0000 (11:15 -0500)] 
time: Replace struct timeval with scalar value

Issue: 5718

This commit switches the majority of time handling to a new type --
SCTime_t -- which is a 64 bit container for time:
- 44 bits -- seconds
- 20 bits -- useconds

2 years agoformat/clang: Apply clang-format
Jeff Lucovsky [Wed, 18 Jan 2023 13:09:25 +0000 (08:09 -0500)] 
format/clang: Apply clang-format

Issue: 5718

2 years agoframes: enable only used frames 8429/head
Victor Julien [Mon, 23 Jan 2023 18:41:45 +0000 (19:41 +0100)] 
frames: enable only used frames

Enable only frames that are actually used.

Ticket: #4979.

2 years agofiles: move FileContainer into FileTransferTracker
Victor Julien [Mon, 23 Jan 2023 13:57:33 +0000 (14:57 +0100)] 
files: move FileContainer into FileTransferTracker

Update SMB, NFS, HTTP2.

2 years agodetect/frame: improve frame detection
Victor Julien [Thu, 8 Sep 2022 11:56:53 +0000 (13:56 +0200)] 
detect/frame: improve frame detection

Add a per frame progress tracker.

2 years agooutput/frame: log frame type stream
Victor Julien [Mon, 16 Jan 2023 10:45:41 +0000 (11:45 +0100)] 
output/frame: log frame type stream

2 years agooutput/frame: improve 'complete' logging
Victor Julien [Thu, 8 Sep 2022 11:57:45 +0000 (13:57 +0200)] 
output/frame: improve 'complete' logging

2 years agoframe: add debug validation check
Victor Julien [Thu, 12 Jan 2023 14:02:40 +0000 (15:02 +0100)] 
frame: add debug validation check

2 years agoapp-layer/frames: use absolute frame offset
Victor Julien [Sat, 3 Sep 2022 07:19:00 +0000 (09:19 +0200)] 
app-layer/frames: use absolute frame offset

Frame offset was already a 64 bit integer, so simplify things by
making it an absolute offset from the start of the stream.

2 years agoframes: implement generic <alproto>.stream frames
Victor Julien [Fri, 2 Sep 2022 11:08:24 +0000 (13:08 +0200)] 
frames: implement generic <alproto>.stream frames

Add a hard coded <alproto>.stream option for all stream data for
a protocol.

Starts at stream offset 0 or at the point of a protocol upgrade
in case of STARTTLS or CONNECT.

2 years agodetect/frames: minor cleanup in buffer handling
Victor Julien [Fri, 2 Sep 2022 11:07:09 +0000 (13:07 +0200)] 
detect/frames: minor cleanup in buffer handling

Don't lookup a buffer twice, even if the lookup should be fast.

2 years agohtp: simplify streaming buffer config
Victor Julien [Sun, 22 Jan 2023 08:31:34 +0000 (09:31 +0100)] 
htp: simplify streaming buffer config

Use a single static config instead of the per profile config.

2 years agostreaming: remove config pointer from struct
Victor Julien [Sat, 21 Jan 2023 09:43:41 +0000 (10:43 +0100)] 
streaming: remove config pointer from struct

2 years agostreaming: internal switch to sbcfg by argument
Victor Julien [Sat, 21 Jan 2023 11:24:35 +0000 (12:24 +0100)] 
streaming: internal switch to sbcfg by argument

2 years agostreaming: add sbcfg to StreamingBufferClear
Victor Julien [Sat, 21 Jan 2023 12:39:10 +0000 (13:39 +0100)] 
streaming: add sbcfg to StreamingBufferClear

2 years agostreaming: add sbcfg to StreamingBufferFree
Victor Julien [Sat, 21 Jan 2023 11:08:51 +0000 (12:08 +0100)] 
streaming: add sbcfg to StreamingBufferFree

2 years agostreaming: add sbcfg to StreamingBufferAppendRaw
Victor Julien [Sat, 21 Jan 2023 11:03:56 +0000 (12:03 +0100)] 
streaming: add sbcfg to StreamingBufferAppendRaw

2 years agostreaming: add sbcfg to StreamingBufferAppend
Victor Julien [Sat, 21 Jan 2023 11:01:46 +0000 (12:01 +0100)] 
streaming: add sbcfg to StreamingBufferAppend

2 years agostreaming: add sbcfg to StreamingBufferSlideToOffset
Victor Julien [Sat, 21 Jan 2023 11:29:23 +0000 (12:29 +0100)] 
streaming: add sbcfg to StreamingBufferSlideToOffset

2 years agostreaming: add sbcfg to StreamingBufferInsertAt
Victor Julien [Sat, 21 Jan 2023 11:23:44 +0000 (12:23 +0100)] 
streaming: add sbcfg to StreamingBufferInsertAt

2 years agostreaming: add sbcfg to StreamingBufferAppendNoTrack
Victor Julien [Sat, 21 Jan 2023 11:22:56 +0000 (12:22 +0100)] 
streaming: add sbcfg to StreamingBufferAppendNoTrack

2 years agooutput/filedata: trunc file in output again
Victor Julien [Sun, 22 Jan 2023 07:29:43 +0000 (08:29 +0100)] 
output/filedata: trunc file in output again

2 years agofiles: update API and callers to take stream config
Victor Julien [Sat, 21 Jan 2023 09:13:22 +0000 (10:13 +0100)] 
files: update API and callers to take stream config

This is to allow not storing the stream buffer config in each file.

2 years agooutput/filedata: don't call file close
Victor Julien [Fri, 20 Jan 2023 18:47:13 +0000 (19:47 +0100)] 
output/filedata: don't call file close

Will be reenabled after file API is updated.

2 years agoapp-layer: get sbconfg with files
Victor Julien [Sat, 21 Jan 2023 21:45:36 +0000 (22:45 +0100)] 
app-layer: get sbconfg with files

2 years agofiles: remove filecontainer drop trait
Victor Julien [Mon, 23 Jan 2023 08:13:44 +0000 (09:13 +0100)] 
files: remove filecontainer drop trait

In preparation of it becoming impossible to use due to the free
function getting an cfg argument.

2 years agohttp2: explicity free files
Victor Julien [Fri, 20 Jan 2023 17:51:04 +0000 (18:51 +0100)] 
http2: explicity free files

In preparation of adding an argument to the free functions which
means the drop trait can't be used anymore.

2 years agosmb: explicity free files
Victor Julien [Fri, 20 Jan 2023 17:50:38 +0000 (18:50 +0100)] 
smb: explicity free files

In preparation of adding an argument to the free functions which
means the drop trait can't be used anymore.

2 years agonfs: explicity free files
Victor Julien [Fri, 20 Jan 2023 17:50:18 +0000 (18:50 +0100)] 
nfs: explicity free files

In preparation of adding an argument to the free functions which
means the drop trait can't be used anymore.

2 years agonfs: file handling cleanups
Victor Julien [Fri, 20 Jan 2023 14:27:42 +0000 (15:27 +0100)] 
nfs: file handling cleanups

2 years agosmb: file handling cleanups
Victor Julien [Fri, 20 Jan 2023 14:27:23 +0000 (15:27 +0100)] 
smb: file handling cleanups

2 years agofiles: remove unused Rust binding for file pruning
Victor Julien [Sat, 21 Jan 2023 09:31:40 +0000 (10:31 +0100)] 
files: remove unused Rust binding for file pruning

2 years agostreaming: set size and max regions defaults
Victor Julien [Fri, 20 Jan 2023 18:39:22 +0000 (19:39 +0100)] 
streaming: set size and max regions defaults

2 years agohtp: remove duplicate prototypes
Victor Julien [Fri, 20 Jan 2023 18:28:07 +0000 (19:28 +0100)] 
htp: remove duplicate prototypes

2 years agohtp/body: minor optimization
Victor Julien [Fri, 20 Jan 2023 18:04:08 +0000 (19:04 +0100)] 
htp/body: minor optimization

2 years agoflow: inline commonly used getters
Victor Julien [Sun, 22 Jan 2023 07:05:58 +0000 (08:05 +0100)] 
flow: inline commonly used getters

2 years agostreaming: remove inefficient buffer grow logic 8406/head
Victor Julien [Fri, 13 Jan 2023 13:03:21 +0000 (14:03 +0100)] 
streaming: remove inefficient buffer grow logic

2 years agostreaming: remove unused slide logic
Victor Julien [Fri, 13 Jan 2023 12:42:27 +0000 (13:42 +0100)] 
streaming: remove unused slide logic

2 years agostreaming: remove unused config member
Victor Julien [Fri, 13 Jan 2023 12:32:45 +0000 (13:32 +0100)] 
streaming: remove unused config member

2 years agostreaming: make minimum region gap size configurable
Victor Julien [Mon, 9 Jan 2023 17:31:01 +0000 (18:31 +0100)] 
streaming: make minimum region gap size configurable

2 years agostream/reassembly: make max-regions configurable; set default
Victor Julien [Mon, 9 Jan 2023 16:53:07 +0000 (17:53 +0100)] 
stream/reassembly: make max-regions configurable; set default

2 years agostreaming: add max regions config option
Victor Julien [Mon, 9 Jan 2023 16:36:55 +0000 (17:36 +0100)] 
streaming: add max regions config option

2 years agostream/list: hack around GAP handling in tests
Victor Julien [Mon, 9 Jan 2023 11:49:04 +0000 (12:49 +0100)] 
stream/list: hack around GAP handling in tests

2 years agostream: improve gap tests
Victor Julien [Mon, 9 Jan 2023 07:05:37 +0000 (08:05 +0100)] 
stream: improve gap tests

2 years agoeve: log max regions
Victor Julien [Sat, 7 Jan 2023 09:48:19 +0000 (10:48 +0100)] 
eve: log max regions

2 years agostream: flow timeout improvement
Victor Julien [Fri, 6 Jan 2023 18:51:53 +0000 (19:51 +0100)] 
stream: flow timeout improvement

Check continuous data for app-layer and post gap data as well for
stream inspection.

2 years agostreaming: implement memory regions
Victor Julien [Tue, 29 Nov 2022 09:32:53 +0000 (10:32 +0100)] 
streaming: implement memory regions

In TCP, large gaps in the data could lead to an extremely poor utilization
of the streaming buffer memory. This was caused by the implementation using
a single continues memory allocation from the "stream offset" to the
current data. If a 100 byte segment was inserted for ISN + 20MiB, we would
allocate 20MiB, even if only 100 bytes were actually used.

This patch addresses the issue by implementing a list of memory regions.
The StreamingBuffer structure holds a static "main" region, which can be
extended in the form of a simple list of regions.

    [ main region ] [ gap ] [ aux region ]
    [ sbb ]                 [ sbb ]

On insert, find the correct region and see if the new data fits. If it
doesn't, see if we can expand the current region, or than we need to add
a new region. If expanding the current region means we overlap or get
too close to the next region, we merge them.

On sliding, we free any regions that slide out of window and consolidate
auxilary regions into main where needed.

Bug: #4580.

2 years agostream: reduce streaming buffer internals use
Victor Julien [Tue, 13 Dec 2022 09:05:12 +0000 (10:05 +0100)] 
stream: reduce streaming buffer internals use

2 years agosmb: fix post-trunc chunk behavior 8389/head 8390/head
Victor Julien [Wed, 11 Jan 2023 20:07:16 +0000 (21:07 +0100)] 
smb: fix post-trunc chunk behavior

After a gap in a file transaction, the file tracker is truncated. However
this did not clear any stored out of order chunks from memory or stop more
chunks to be stored, leading to accumulation of a large number of chunks.

This patches fixes this be clearing the stored chunks on trunc. It also
makes sure no more chunks are stored in the tracker after the trunc.

Bug: #5781.

2 years agofuzz: check libpcap timestamp consistency
Philippe Antoine [Mon, 16 Jan 2023 10:14:37 +0000 (11:14 +0100)] 
fuzz: check libpcap timestamp consistency

That is microseconds should be positive

2 years agofuzz: fix use of uninitialized value
Philippe Antoine [Thu, 8 Dec 2022 09:06:40 +0000 (10:06 +0100)] 
fuzz: fix use of uninitialized value

packet timestamp is not set when function returns error.
also use C positive modulo for microseconds

2 years agoftp: completely resets port_line
Philippe Antoine [Wed, 28 Dec 2022 14:57:12 +0000 (15:57 +0100)] 
ftp: completely resets port_line

In the case port_line is first allocated and port_line_len is set,
Then a second request reaches memcap and frees port_line,
port_line_len should also be reset, because both will get used
by the response parsing.

Ticket: #5701

2 years agouserguide: update http.cookie description
jason taylor [Mon, 9 Jan 2023 22:17:26 +0000 (22:17 +0000)] 
userguide: update http.cookie description

Signed-off-by: jason taylor <jtfas90@gmail.com>
2 years agoflow-worker: prune frames and stream for pseudo packets as well
Victor Julien [Mon, 5 Sep 2022 08:56:19 +0000 (10:56 +0200)] 
flow-worker: prune frames and stream for pseudo packets as well