Commit Graph

15024 Commits (1a132f454a64f699118dafcdfccb0687317b435e)
 

Author SHA1 Message Date
Juliana Fajardini 1a132f454a docs: adjust readthedocs config to new options
Our documentation was failing to build, seems connected to the new way
of indicating build options (cf
https://readthedocs.org/projects/suricata/builds/22112658/,
https://docs.readthedocs.io/en/stable/config-file/v2.html#build,
and https://docs.readthedocs.io/en/stable/config-file/v2.html#build-os).

Added the build.os required new field, and adjusted the way python
version is passed.

For the new configuration style for read the docs, one of the ways to
pass extra configuration for python is having a requirements file.
1 year ago
Philippe Antoine 14a4c6c696 rust: update brotli decompressor crate
cf https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59687
1 year ago
Shivani Bhardwaj 7406ac0fa5 output/email: use SCCalloc for OutputJsonEmailCtx
email_ctx->fields only gets populated when smtp.custom setting is on.
The fn EveEmailLogJSONCustom is called when either
1. smtp.extended setting is on or,
2. email_ctx->fields is populated which means smtp.custom setting is on

In case neither of these are set in suricata.yaml, no call should
ideally be made to the fn EveEmailLogJSONCustom.
However, it turns out that email_ctx->fields is unset and then set only
after the smtp config was found. This leads to email_ctx->fields
sometimes contain value even when no config was given to the smtp
section and can lead to unexpected output.

Fix this by using SCCalloc while initializing OutputJsonEmailCtx struct
instead of SCMalloc.

Bug 6380
1 year ago
Juliana Fajardini ffed5eb3d3 doc/quickstart: add software-properties instruction
This is indicated in the `Installation` section, but not in the
quickstart, and it felt like a valid addition, here, too.
1 year ago
Juliana Fajardini 4ab4f711de doc/install: link to devguide's install from git
Although we have an updated version of instructions for installation
from git, our install guide was only referring to RedMine, which is less
up-to-date.

Kept that reference, since it might still be useful for non-Ubuntu
cases.
1 year ago
Shivani Bhardwaj 0a4011655f doc/code-submission: add commit sign guide 1 year ago
Philippe Antoine 9157070907 quic: v2 support per rfc 9369
Ticket: #4968
1 year ago
Travis Green 96a0e7016f doc: add tcp flags documentation
Signed-off-by: jason taylor <jtfas90@gmail.com>
1 year ago
Philippe Antoine 299ee6ed55 detect: check if signature uses too many buffers
Ticket: #6104

The approach in master branch is to change the prototype of
SigMatchAppendSMToList so that it allocates itself the new SigMatch
This approach requires to change all the 100-ish calls to
SigMatchAppendSMToList and is thus quite a big change.

For branch 7, we still wanted to avoid the buffer overflow, but
did not want such an intrusive change, and still wanted to make
the signature invalid. Instead of changing the prototype of the
function, we make it return early, and set a flag in the signature
which can be later checked by SigValidate
1 year ago
Juliana Fajardini 3ecb923db1 detect/analyzer: add more details for ipopts
In addition to the ipopts keyword name, also log the ip option that was
matched on.

Task #6348
1 year ago
Jason Ish bb15a8f766 readme: minor cleanups 1 year ago
Jason Ish c8ee69c8df readme: add a resources section
Consolidate a few items into a resources section, and add few more
items, most importantly the bug tracker as it can't currently be found
from our GitHub presence.
1 year ago
Jason Ish 77e1134ee1 readme: formatting
Use consistent header style and wrap at 80 chars for better reading in
a terminal.
1 year ago
Philippe Antoine ad5f41c95c detect: remove code writing unused values
Coveridy ID 1546822 1546823 and 1546824
1 year ago
Jeff Lucovsky 2bf9d0fdf9 detect/bytejump: Improve negative post_offset handling.
Issue: 4624

Handle negative post_offset values that jump before the buffer as though
they refer to the buffer start.
1 year ago
Jeff Lucovsky 27a665546b detect/bytejump: Change DoMatch signature to return bool
Issue: 4624

Change the function signature of byte-jump's domatch from an int to a
bool to avoid ambiguity handling return values.
1 year ago
Philippe Antoine 22ffdbb1b3 mime: process chunk as soon as possible
In the case stream depth gets reached afterwards, it cannot be
processed after that.

Ticket: #6367
1 year ago
Lukas Sismis af4bb917dc dpdk: reset stats just before the start of packet receive loop
While Suricata initializes, the device must be started to e.g.
apply rte_flow rules on some devices. But in the meantime, the
NIC started receiving packets but accounted those as missed.
Stats reset was added to better represent true packet drop.
1 year ago
Lukas Sismis 3eac0f15c0 dpdk: stop devices immediately after Suricata stop command
To better represent port stats of Suricata stop the device
right after Suricata is deemed to shut down.
While Suricata deinitialization happened, the device kept
receiving packets. But because Suricata was no longer
interested in the packets, the device accounted these packets
as missed and it could have alter true stats of Suricata.
1 year ago
Jeff Lucovsky 59d050a067 detect/gen: Minor cleanup
Issue: 5211
1 year ago
Jeff Lucovsky 01d232b6be detect/rule: Use de_ctx buffer id
This commit uses the detect engine buffer id instead of the global
value.

Issue: 5211
1 year ago
Jeff Lucovsky f293823ab3 detect: Count buffer id once
This commit removes a second, unnecessary increment of the de_ctx buffer
id.

Issue: 5211
1 year ago
Shivani Bhardwaj 2fa0fac289 af-packet: fetch mtu info once
With the current layout and fn calls, it was seen that once in the
beginning after the MTU was found and displayed to the user, when the
threads spawned, each thread displayed MTU info as a part of
AFPPeersListAdd fn. This happened in AF_PACKET IPS mode and led to
excessive MTU logs.
Save this info in the LiveDevice struct and avoid calling the unneeded
fns later on.

Bug 5831
1 year ago
Shivani Bhardwaj 572f8a3da6 util/ioctl: use LiveDevice to retrieve name
The fn GetIfaceMaxPacketSize now uses LiveDevice object as a param
instead of a string. This was done to keep the logic of checking for the
device to this function itself instead of having callers first determine
whether the device exists or not.
This also falls in line with the changes made to avoid excessive MTU
logs in the following commit.

Related to redmine ticket 5831.
1 year ago
Shivani Bhardwaj 4639a62eb7 util/ioctl: rename pcap_dev to dev 1 year ago
Shivani Bhardwaj cdcb1b3263 util/ioctl: cut vain check on GetIfaceMaxHWHeaderLength 1 year ago
Shivani Bhardwaj 72ee505aa0 conf: check if node value is Null
Bug: #6303, #6302
1 year ago
Jason Ish 252e8dbb32 conf: fix include handling from arrays
Includes from an "include" array were being loaded into the wrong
parent as the logic for array handing in include context was not
updated.

If we are descending into an array in include context, pass through
the current parent so the included configuration is included where it
is expected.

Bug: #6300
1 year ago
Jeff Lucovsky 904f0ddeee stats: Track stream reassembly drops
Issue: 6235
1 year ago
Victor Julien 908f49eef1 version: start development towards 7.0.2 1 year ago
Juliana Fajardini 8553d567d2 release: 7.0.1; update changelog 1 year ago
Philippe Antoine c6afee64d5 smtp: fix null deref with config option body md5
Ticket: #6279

If we have the smtp body beginning without headers, we need to
create the md5 context and right away and supply data to it.
Otherwise, on the next line being processed, md5_ctx will be
NULL but body_begin will have been reset to 0
1 year ago
Victor Julien 00e00254ea spm/hs: don't exit on bad patterns
A bad pattern in a rule that hyperscan would fail to compile would
exit Suricata. This could happen during a rule reload as well.

In case of a untrusted ruleset, this could potentially be used to
shut down the sensor.

Commit 7d0851b0c2 already blocks the only know case, but this patch
is more defensive.

Ticket: #6195.
1 year ago
Jason Ish 2b57179d65 readthedocs: pin theme to sphinx_rtd_theme
ReadTheDocs changed the default theme.
2 years ago
Jason Ish ae3b1a9e36 configure: more idiomatic autoconf for sphinx-build checks
- Use SPHINX_BUILD instead of HAVE_SPHINX_BUILD, as here we're
  actually using the path of the program.

- Wrap some elements in [] as is done in modern idiomatic autoconf
2 years ago
Jason Ish 82758fb09f configure: check for new enough sphinx-build
We need a recent version of Sphinx to build the documentation in
7.0. Check for a minimum version of 3.4.3. If older, do not build the
docs which is the same behavior when sphinx-build is not found.

Bug: #6297
2 years ago
Philippe Antoine 30b5338af3 fuzz: enable by default all protocols
That means DNP3, ENIP and NFS

Ticket: #6189
2 years ago
Jeff Lucovsky e65c052414 build/nss: Remove libnss from CI 2 years ago
Arne Welzel 0ddc44f4c1 community-id: Fix IPv6 address sorting not respecting byte order
When comparing IPv6 addresses based on uint32_t chunks, one needs to
apply ntohl() conversion to the individual parts, otherwise on little
endian systems individual bytes are compared in the wrong order.
Avoid this all and leverage memcmp(), it'll short circuit on the first
differing byte and its return values tells us which address sorts lower.

Bug: #6276
2 years ago
Ralph Eastwood 185f605d11 napatech: fix null-dereference of packet 2 years ago
Ralph Eastwood a4756138cf napatech: print NUMA recommendation early
When thread affinity is set, the NUMA configuration specified in
the napatech.ini configuration could be incorrect and then fail.
This fails before the recommended configuration is printed, which
is pretty unhelpful.
2 years ago
Ralph Eastwood 1e1b3a4eda napatech: fix incorrect fmt specifiers for log 2 years ago
Ralph Eastwood 405fc580ea napatech: remove superfluous log messages 2 years ago
Ralph Eastwood c4059a7f02 napatech: generalise numa config recommending
Previous implementation hardcoded up to 4 NUMA nodes.
We support arbitrary number of NUMA nodes now.

Note that this commit also removes the old SCLog logging
calls.  But since the logic has changed, these have been replaced
directly with new code.
2 years ago
Ralph Eastwood 8c1ccc1cfe napatech: fix shadowed global is_inline warning 2 years ago
Ralph Eastwood 95ecbd1178 configure: move -lntapi to LIBS variable
Previously -lntapi was appended to LDFLAGS which did not work with
all build environments.
2 years ago
Ralph Eastwood d7aa7a063f napatech: fix warnings with ByteExtractStringUint8
The WARN_UNUSED attribute has been added to ByteExtractStringUint8
in commit 6988168114.  The return
value is now handled and appropriate errors printed.
2 years ago
Ralph Eastwood 23e5386513 napatech: fix thread flags with THV_RUNNING
This update the Napatech vendor module with changes introduced in
13beba141c that introduces THV_RUNNING.
2 years ago
Ralph Eastwood 658bbbc078 napatech: fix compilation with SCTIME usage
This replaces the broken compilation due to the change of SCTime_t
into a structure: 9fbe683642.
2 years ago
Ralph Eastwood c6da59d57b napatech: fix missing header includes 2 years ago