Commit Graph

19047 Commits (372cb8c692133bf3cd2104b7419d25b6b83cfe9f)
 

Author SHA1 Message Date
Jason Ish 551f6ded69 github-ci: update almalinux minimal build to use dist archive
Update the AlmaLinux recommended minimal build to use the pre built
distribution archive as this is the type of build the documentation is
targetting.
5 months ago
Jason Ish 87dba92bdd github-ci: update debian/ubuntu minimal build to use dist
Update the Ubuntu/Debian minimal recommended build to use the
pre-built dist archive instead of building from git, as that is the
type of build this documentation targets.

Also use the ubuntu:22.04 container. The GitHub provided Ubuntu 22.04
VM appears to contain some new additions like a newer Rust that is not
found on a typical Ubuntu 22.04 installation.
5 months ago
Philippe Antoine ebe0ba4ebb rust: limit clap verson to 4.5.57
clap 4.5.58 and further requires edition2024 which is incompatible with MSRV
5 months ago
Jason Ish 46d666cdde github-ci: enable debug for ndpi, pfring and netmap builds 5 months ago
Victor Julien 1732257923 ldap: add rules file to dist 5 months ago
Victor Julien 45d94a7726 stream: restore pcap_cnt in debug output 5 months ago
Victor Julien ac1a514c7b stream/reassembly: improve progress tracking for GAP cases
When during raw reassembly it is detected that last ack is moved beyond
the progress and also beyond the data retrieved, update progress to the
last ack value.

Bug: #8272.
5 months ago
Philippe Antoine 76d2925bdf ldap: abandon request does not wait for a response
Ticket: 8356

As such, abandon request is a complete tx
5 months ago
Philippe Antoine 784e173278 http2: bound number of http2 frames per tx
Ticket: 8289

If stream.reassembly.depth is unlimited,
an attacker controlling the 2 sides of a communication going through Suricata
can send a transition with an infinite number of headers, until suricata OOMs

Solution is to offer a configuration option to bound the number
of HTTP2 frames we store in a HTTP2 transaction, and produce an
anomaly if this bound is crossed
5 months ago
Philippe Antoine cb76301581 detect/tls: add null check for tls.alpn keyword
Ticket: 8294

Fixes: 6c1238b7bd ("tls: Integrate ALPNs into HandshakeParams object")

May happen if we analyze TLS without seeing the hello
5 months ago
Philippe Antoine 49fd7001ff smtp/mime: fix urls finding in buffering case
We used to look for a full line, but as we look fot the last eol
we need to use the right index in the not-reversed list
5 months ago
Philippe Antoine 8bba47aa09 smtp/mime: avoid quadratic complexity in mime_smtp_find_url_strings
Ticket: 8292

When we have buffered something in ctx.decoded_line,
we already looked for '\n' in it, so we do not need to run it again

Otherwise, callers that supply mime_smtp_find_url_strings with
a few bytes at a time without "\n", have a quadratic
complexity
5 months ago
Juliana Fajardini 8c29c471b4 userguide: add references to rules/README to docs
To make it more visible/easier to find.
5 months ago
Giuseppe Longo b6fa3c8e8c ldap: add ldap.rules file
Add a file containing rules to match LDAP protocol events.

Ticket #8368
5 months ago
Philippe Antoine 062f56ddde detect/http2: use ThreadCtx for all headers keywords
Instead of custom inefficient "escaped" Vec

Ticket: 8291
5 months ago
Philippe Antoine 4e538dfa3b detect/http2: use ThreadCtx for http.request_header
And also for http.response_header

Instead of custom inefficient "escaped" Vec

Ticket: 8291
5 months ago
Philippe Antoine 0933e944df detect/http2: use ThreadCtx for http.header.raw
Instead of custom inefficient "escaped" Vec

Ticket: 8291
5 months ago
Philippe Antoine 711de8a5ea detect/http2: use ThreadCtx for http.header
Instead of custom inefficient "escaped" Vec

Ticket: 8291
5 months ago
Philippe Antoine 52a2f2dd19 detect/http2: use ThreadCtx for http.header_names
Instead of custom inefficient "escaped" Vec

Ticket: 8291
5 months ago
Jason Ish 648a867049 psl: update to 2.1.197
Update the Mozilla public suffix list to 2.1.197.
5 months ago
Philippe Antoine 61b5461782 app-layer: fix uint overflow in debug assertion
Krb5 can request it needs a 0xFFFFFFFF record
5 months ago
Philippe Antoine 8e886a8ecd krb5: use app-layer incomplete support
Ticket: 3540
Ticket: 8305
5 months ago
Lukas Sismis 0cb88d6260 configure: move -march=native flag insertion at the end
When libraries add their own -march flags to CFLAGS, let them.
But if -march=native should be added (it should by default),
add it as the last -march flag to "win".
This ensures, that even if a library brings their own minimal -march,
it will not downgrade the instruction set for the whole Suricata.
This happened with DPDK which, when enabled, downgraded the instruction
set to -march=corei7 or -march=haswell.

When building packages with --disable-gccmarch-native, the instruction set
is auto-upgraded to instruction set requested by libraries.
E.g. from RPM builds: `CFLAGS="-march=x86_64" ./configure --enable-dpdk`
upgrades instruction set to DPDK's corei7 architecture.

Ticket: 8169
5 months ago
Lukas Sismis 1d06103e08 dpdk: adjust burst size to mempool size
When mempool size was configured really low (<32), Suricata exhausted
the mempool with the rx_burst call, which led to undefined behavior.
The current fix ensures the burst size is at most the size of the mempool,
if the mempool is smaller than BURST_SIZE macro.
5 months ago
Victor Julien 565c1831a0 detect: convert unittest into fail/pass api 5 months ago
Victor Julien 25a8559cd4 pcap/file: add proto check for fuzzing
Based on review it seems p->proto should always be set to the same
value as what `PacketGetIPProto` returns. Add a check to validate
in a decoder that the fuzzer executes.
5 months ago
Victor Julien 2658a366ad qa: move live tests into qa/live dir
They are not github specific.
5 months ago
Victor Julien cb24430a0a firewall: don't overwrite with ips mode
When a capture method set IPS mode, it could overwrite already set Firewall mode.

Ticket #8311.
5 months ago
Antoine Abou Faysal 29834e3917 plugins/ndpi: guard against NULL f->storage in all callbacks 5 months ago
Giuseppe Longo a072ca02be suricata.yaml: add missing modbus logger
Ticket #8347
5 months ago
Philippe Antoine d77c43c79b rust/ffi: move build_slice macro to ffi crate
Ticket: 7666
5 months ago
Philippe Antoine 4a0143c8d4 rust/ffi: move cast_pointer macro to ffi crate
Ticket: 7666
5 months ago
Philippe Antoine aae154874b src/detect: remove unneeded variables
just use the constant
5 months ago
Philippe Antoine 65993d4a41 util/lua: remove unneeded variable
just use the constant
5 months ago
Philippe Antoine 70bc077433 util: check name length of proposed data directory
Before doing stack allocation

Ticket: 8001
5 months ago
Philippe Antoine 27c28cc456 util: remove unneeded stack allocation in HexToRaw
Ticket: 8001
5 months ago
Philippe Antoine 2cb8ba5bec output: debug validation before stack allocation
A rule size has a global bound, which bounds the references
parsed in it.

Ticket: 8001
5 months ago
Lukas Sismis 6ec9e5c957 hs: address coverity warning in a reference string
Move the locking mechanism outside of the getter function and hold the
lock until the reference string is no longer reused.

** CID 1682023:       Concurrent data access violations  (MISSING_LOCK)
/src/util-mpm-hs-cache.c: 139           in HSGetReferenceDbInfo()
5 months ago
Jason Ish f711e57e8e examples/lib/live: a lib example with live capture
Simple libpcap example for live capture. Allows listening on multiple
interfaces to show how multiple threads (workers) can be used.

Ticket: #8096
5 months ago
Jason Ish 8c7172e707 lib: remove the built-in library run-mode
This run-mode does not allow for capture ThreadVars to be created at
the appropriate place in the application life cycle. Instead,
applications should register their own custom run-mode.

Ticket: #8259
5 months ago
Jason Ish 7dd23392cc examples/lib/cplusplus: simplfy, make more like the simple example
To prep for the removal of the lib runmode, simplify this C++ example
to match our simple example. We don't yet have the C++ compatible
headers to allow for a C++ app to register its own custom runmode.
5 months ago
Jason Ish 445de77c71 examples/lib/custom: use own custom run mode
Debug validation revealed that library ThreadVars were being
created *after* the threads were sealed. And the only way to create
your ThreadVars that fits within the current application life-cycle is
to create them in your own custom run mode.

This is likely a better model for users who are bringing their own
packets and threads anyways, as they are essentially providing their
own capture method, and all capture methods provide their own run
mode. They're also using their own threads, which means adapting to
their own threading model.

This is suitable for a backport to 8.0. But for 9.0 we can go further
and remove the built-in library run mode, which will be done in a
follow-up commit.

Ticket: #8259
5 months ago
Jason Ish 02e4399059 github-ci: add debug validation to almalinux 10 build
After the distcheck, this build doesn't need unittests, so add
debug-validation, as this can trigger assertions in our lib examples
that are tested in this job

This triggers a debug-validation error in the custom library example.

Ticket: #8259
5 months ago
Victor Julien 56514f3be8 openbsd: pledge before allowing threads to continue
Avoids a race condition with pcap file directory mode.

Ticket: #8300.
5 months ago
Philippe Antoine 1e0f344ab7 doc: be more precise for decompress transforms
Ticket: 7846
5 months ago
Victor Julien 9cecd29fd4 detect/parse: convert test to fail/pass 5 months ago
Victor Julien 3068089762 github-ci: disable libmagic on macos
5.47 is currently breaking CI, so disable during investigation.

Related to ticket #8342.
5 months ago
Philippe Antoine 7e97dfd521 detect: replace stack alloc by member of DetectEngineThreadCtx
To avoid running a big (when many signatures) stack allocation
on each detection loop with postmatches

Ticket: 8001
5 months ago
Philippe Antoine b7a3a6b167 detect/pcre: add debug validations
Before stack allocation

Ticket: 8001
5 months ago
Philippe Antoine 4849d34325 detect/parse: debug validation before stack allocation
A rule size has a global bound

Ticket: 8001
5 months ago