Commit Graph

15275 Commits (fc2acf8cb06a665d04db243e829f6ee3f3cc3114)
 

Author SHA1 Message Date
Philippe Antoine ab9b6e30b1 detect: adds flow integer keywords
Ticket: #6164

flow.pkts_toclient
flow.pkts_toserver
flow.bytes_toclient
flow.bytes_toserver
1 year ago
Philippe Antoine 8c5310aefd doc: quic in eve/schema
Ticket: #6076
1 year ago
Victor Julien 2f4027c117 version: start work on 8.0.0 1 year ago
Victor Julien 6bb882c4c0 macset: remove dead flow init/cleanup code
FlowInit() will only be called on a newly allocated, or a fully cleaned
up flow, so no existing storage will exist.

The only caller of `FLOW_RECYCLE` first calls `FlowFreeStorage()`, so
the reset logic in `FLOW_RECYCLE` can never trigger.

Remove now unused MacSetReset logic.
1 year ago
daniel zhao de14e3d0b5 detect/flow: fix DETECT_FLOW_FLAG_ESTABLISHED check
Ticket: #6448
1 year ago
Victor Julien 741ba51c1e github-ci: Fedora 37 to 39; use packaged cbindgen 1 year ago
Jason Ish 327c629253 outputs: call plugin ThreadDeinit, not Deinit
With the change to the hash table for tracking threaded loggers, this
call is now called once per thread, so should be changed to the
ThreadDeinit, as that is not longer being called.

Then call Deinit for the primary logger. In threaded mode this would be
the parent, its just the logger in non-threaded mode.

Bug: #6438
1 year ago
Jason Ish f2b47bb0dc eve: remove some dead code 1 year ago
Philippe Antoine 6249722589 http2: normalize host when there is user info
Ticket: 6479
1 year ago
Philippe Antoine b6cd66f41d http2: update brotli crate
Fixes debug assertion found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63144
1 year ago
Philippe Antoine 46a46e5b1f http2: event on mismatch between authority and host
Ticket: #6425
1 year ago
Philippe Antoine ae72ce77fa detect: parse units for integers
Ticket: #6423

Especially for filesize, instead of just a number, a signature
can use a number and a unit such as kb, mb or Gb
1 year ago
Kirjan Kohuladas c8a7204b15 doc/rule-profiling: fix suricatasc typo 1 year ago
Lukas Sismis 5300cb625e privs: refactor SCGetUser/GroupID to void functions
SCGetUserID/SCGetGroupID either FatalErrored out or
returned zero. As a result, the functions got refactored
into non-returning void functions.
1 year ago
Lukas Sismis 5b4ba0fe46 privs: hint the user of unset user/group name
Ticket: #6278
1 year ago
Victor Julien dc40a139ac packetpool: signal waiter within lock
Needed for predictable scheduling. From pthread_cond_signal man page:

"The pthread_cond_signal() or pthread_cond_broadcast() functions may
 be called by a thread whether or not it currently owns the mutex that
 threads calling pthread_cond_wait() or pthread_cond_timedwait() have
 associated with the condition variable during their waits; however, if
 predictable scheduling behaviour is required, then that mutex is locked
 by the thread calling pthread_cond_signal() or pthread_cond_broadcast()."
1 year ago
Victor Julien 087ca49e39 packetpool: return one packet as well on sync now
If a thread is hitting the packet pool return on a 'sync_now' return
the packet also if it is the first packet since the last flush.

Bug: #6435.
1 year ago
Victor Julien 6ae37b06f1 packetpool: remove WaitForN logic as it is unused 1 year ago
Victor Julien 0dda7f535c flow/timeout: no need to wait for packetpool
The timeout logic no longer passes packets around, so don't depend
on the packet pool.

Bug: #6292.
1 year ago
Victor Julien 6307a4d4b9 host/iprep: run all timeout logic
Run all timeout logic if iprep is in use as well.

Minor code cleanups.

Bug: #6436.
1 year ago
Victor Julien 80f13b93aa detect/urilen: fix discontinue matching logic
Actually discontinue matching.

Fixes: 21f9cc3a39 ("discontinue matching on buffer if urilen returns a match failure.")
1 year ago
Daniel Olatunji 3a40ed5641 detect/bytetest: convert unittests to FAIL/PASS
Issue: #6332
1 year ago
Jason Ish 7d60bb7139 dns/eve: make removed v1 style a warning, not an error
We don't error out in this case, but instead default to v2. So use a
warning instead of an error.
1 year ago
Jason Ish a240a93b69 dns/eve: use default formats if formats is empty
If the configuration field "formats" is empty, DNS response records do
not have any relevant information other than that there was a
response, but not much about the response.

I'm pretty sure the intention here was to log the response details if
no formats were provided, which is what happens when the field is
commented out.

So if no formats are specified, use the default of all.

Bug: #6420
1 year ago
Daniel Olatunji d4e4bdac90 detect/bytejump: convert unittests to FAIL/PASS
Issue: #6328
1 year ago
Jason Ish 804c5b737b runmodes: remove obsolete references to pcap auto modes
These auto modes were remove many years ago. Also cleanup the wording
a little.

Task: #6427
1 year ago
Jeff Lucovsky f363b99fd7 detect/bytejump: Improve end-of-buffer handling
Issue: 4623

This commit addresses the issues reported in issue 4623 when the jump
value points at the last byte in the buffer.
1 year ago
Jeff Lucovsky ffd769d178 detect/bytejump: Remove unused "Match" function
Issue: 4623

DetectBytejumpMatch is no longer used -- it's counterpart --
DetectByteJumpDoMatch is and will remain.
1 year ago
Lukas Sismis 292fda88b4 unix-manager: prioritize the shutdown check
Make sure Suricata is in the running state before
you attempt to execute commands on the Unix sockets.
UnixMain is being called in an infinite loop where
TmThreadsCheckFlag(th_v, THV_KILL) is checked for the
deinit phase. However, it may take some time between
the start of Suricata's deinitialization and
the receipt of THV_KILL flag in the Unix thread.

In between this time period, the Unix manager can still
perform select() operation on the Unix socket while
the socket being already deinitialized.

Likely with a longer time span between the initial shutdown
command and actual closing of Unix sockets resulted in
an error of invalid file descriptors.

Ticket: #6272
1 year ago
Juliana Fajardini a9851430e2 github: improve template CLA request info
Indicate that the CLA only has to be signed once, as we have had
contributors think that was required for each new PR.
1 year ago
Juliana Fajardini 54d8f45afc userguide: add proper label to RPM install section
Use a reference label that is stable, instead of one that could change
in case a new section is added above it.
1 year ago
Hadiqa Alamdar Bukhari 68d3c0c388 detect-tcp-window: Convert unittests to new FAIL/PASS API
Task #6339
1 year ago
Hadiqa Alamdar Bukhari 4ff52f26d7 flow-bit: Convert unittests to new FAIL/PASS API
Task #6329
1 year ago
Hadiqa Alamdar Bukhari 47a11c7ea4 util-misc: Convert unittests to new FAIL/PASS API
Task #6345
1 year ago
Liza Opar 3b1558946d misc: improve code documentation
Task #6383
1 year ago
Daniel Olatunji 54de0450f4 rust: remove cbindgen:ignore on frames module
This directive is no longer required, and does
mess up the rustdoc description of the module.
1 year ago
Daniel Olatunji 5c0af0b203 rust/doc: add docstring to rust module files.
Issue: #4584
1 year ago
Daniel Olatunji 0e5fdbb8fb doc: be consistent with the use of "sudo"
Issue: #5720
1 year ago
Victor Julien 2fe2d82506 version: start development towards 7.0.3 1 year ago
Shivani Bhardwaj d07e20c0a3 release: 7.0.2; update changelog 1 year ago
Philippe Antoine 737bc4f219 mime: avoid quadratic complexity in MimeDecAddEntity
Ticket: #6306

Keep a reference to last child, consume a bit more RAM to save CPU
1 year ago
Philippe Antoine 986a4417c6 detect: error early when too many buffers
Ticket: #6104

To get a chance to clean properly, before we leak memory.
1 year ago
Victor Julien 15947f2173 detect: inspect all packets in multi-layer tunneling
When the decoders encounter multiple layers of tunneling, multiple tunnel
packets are created. These are then stored in ThreadVars::decode_pq, where
they are processed after the current thread "slot" is done. However, due
to a logic error, the tunnel packets after the first, where not called
for the correct position in the packet pipeline. This would lead to these
packets not going through the FlowWorker module, so skipping everything
from flow tracking, detection and logging.

This would only happen for single and workers, due to how the pipelines
are constructed.

The "slot" holding the decoder, would contain 2 packets in
ThreadVars::decode_pq. Then it would call the pipeline on the first
packet with the next slot of the pipeline through a indirect call to
TmThreadsSlotVarRun(), so it would be called for the FlowWorker.
However when that first (the most inner) packet was done, the call
to TmThreadsSlotVarRun() would again service the ThreadVars::decode_pq
and process it, again moving the slot pointer forward, so past the
FlowWorker.

This patch addresses the issue by making sure only a "decode" thread
slot will service the ThreadVars::decode_pq, thus never moving the
slot past the FlowWorker.

Bug: #6402.
1 year ago
Victor Julien e9c1ca2804 detect: fix legacy modifiers leading to multi-buffer
Fix non-continious matches with content and pcre modifiers setting up
multiple buffers.

To address this store whether a buffer is multi-capable and if not reuse
an earlier buffer if possible.

Bug: #6397.

Fixes: ad88efc2d8 ("detect: support multi buffer matching")
1 year ago
Lukas Sismis c53086575a dpdk: update DPDK builder versions 1 year ago
Lukas Sismis 6a4df6eb30 dpdk: support new 23.11 DPDK bonding API
Ticket: #6381
1 year ago
Lukas Sismis 9dc83b6a43 dpdk: add hugepage hint on low number of hugepages
If a user doesn't allocate/allocates too little hugepages,
Suricata fails to start and outputs a hint to increase
number of hugepages (if enabled).

Ticket: #5966
1 year ago
Lukas Sismis 1bcea5a992 dpdk: add hugepage hint to lower the amount of reserved hugepages
If a user allocates too many hugepages and those are largely not used
then Suricata suggests that the user can lower the amount of hugepages
and therefore save memory for other purposes.

Ticket: #5966
1 year ago
Comfort Amaechi cf8b630ed2 userguide: cover install-full and install-conf
Ticket: #6342
1 year ago
jason taylor 535938d7f6 doc: add tls.cert_chain_len docs
Ticket: #6386

Signed-off-by: jason taylor <jtfas90@gmail.com>
1 year ago