Commit Graph

18683 Commits (main)
 

Author SHA1 Message Date
Philippe Antoine 062f56ddde detect/http2: use ThreadCtx for all headers keywords
Instead of custom inefficient "escaped" Vec

Ticket: 8291
14 hours 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
14 hours ago
Philippe Antoine 0933e944df detect/http2: use ThreadCtx for http.header.raw
Instead of custom inefficient "escaped" Vec

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

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

Ticket: 8291
14 hours ago
Jason Ish 648a867049 psl: update to 2.1.197
Update the Mozilla public suffix list to 2.1.197.
1 day ago
Philippe Antoine 61b5461782 app-layer: fix uint overflow in debug assertion
Krb5 can request it needs a 0xFFFFFFFF record
1 day ago
Philippe Antoine 8e886a8ecd krb5: use app-layer incomplete support
Ticket: 3540
Ticket: 8305
1 day 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
1 day 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.
2 days ago
Victor Julien 565c1831a0 detect: convert unittest into fail/pass api 2 days 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.
2 days ago
Victor Julien 2658a366ad qa: move live tests into qa/live dir
They are not github specific.
2 days 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.
2 days ago
Antoine Abou Faysal 29834e3917 plugins/ndpi: guard against NULL f->storage in all callbacks 4 days ago
Giuseppe Longo a072ca02be suricata.yaml: add missing modbus logger
Ticket #8347
4 days ago
Philippe Antoine d77c43c79b rust/ffi: move build_slice macro to ffi crate
Ticket: 7666
4 days ago
Philippe Antoine 4a0143c8d4 rust/ffi: move cast_pointer macro to ffi crate
Ticket: 7666
4 days ago
Philippe Antoine aae154874b src/detect: remove unneeded variables
just use the constant
4 days ago
Philippe Antoine 65993d4a41 util/lua: remove unneeded variable
just use the constant
4 days ago
Philippe Antoine 70bc077433 util: check name length of proposed data directory
Before doing stack allocation

Ticket: 8001
4 days ago
Philippe Antoine 27c28cc456 util: remove unneeded stack allocation in HexToRaw
Ticket: 8001
4 days 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
4 days 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 days 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 days 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 days 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 days 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 days 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 days ago
Victor Julien 56514f3be8 openbsd: pledge before allowing threads to continue
Avoids a race condition with pcap file directory mode.

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

Related to ticket #8342.
6 days 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
6 days ago
Philippe Antoine b7a3a6b167 detect/pcre: add debug validations
Before stack allocation

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

Ticket: 8001
6 days ago
Philippe Antoine db64462b1d detect/metadata: add debug validation
Before stack allocation

Ticket: 8001
6 days ago
Jason Ish 03f767a094 github-ci: re-enable rpm jobs 6 days ago
Victor Julien a4aa056884 detect/parse: convert test to fail/pass 6 days ago
Victor Julien 33ddbc3244 github-ci: use --skip-branches in coverage consistently
Completes 02f6340972.
6 days ago
Shivani Bhardwaj d241237c0f Revert "dcerpc: fix consumed bytes post gap handling"
This reverts commit fc9da1c7a1.

That commit incorrectly used consumed as index of the slice passed to
the Frame API.
Found by oss-fuzz.
6 days ago
Jeff Lucovsky 5a3a2d5fd1 doc/output: Document the IPv6 display behavior
Issue: 7399

Document the IPv6 display behavior and how to display IPv6 addresses in
their compressed form (per RFC-5952).
6 days ago
Jeff Lucovsky 809fb56612 output/log: IPv6 addr display per cfg
When configured, display the compressed form of the IPv6 address.

Issue: 7399
6 days ago
Jeff Lucovsky 4af77975e3 output/log: ipv6-compress member to file context
Issue: 7399

Add compress ipv6 setting to file context.
6 days ago
Jeff Lucovsky 20b8829867 output/eve: EVE output to use IPv6 compress cfg
Issue: 7399

Determine the EVE IPv6 address display and use that when generating
external display representation.
6 days ago
Jeff Lucovsky ed882ede68 output/ipv6: Utility function to compress IPv6 addrs
Issue: 7399

Utility function to compress IPv6 addresses per RFC-5952
6 days ago
Shivani Bhardwaj 0e345c93ca app-layer: check ipproto enabled setting first
If the key `app-layer.protocols.PROTO.enabled` is present, the protocol
is enabled for all carrier protocols. This is not ideal.
Only if the key `app-layer.protocols.PROTO.enabled` is missing, an
attempt is made to look for a setting specific to the ipproto passed
at the time of registration e.g.
`app-layer.protocols.PROTO.udp.enabled`.

By default, check for carrier proto specific setting. If it is not
found, then fall back to the generic setting.
Issue a warning in case an inconsistent combination of global and
ipproto specific setting is found.

Bug 8205
6 days ago
dependabot[bot] 8df4e10018 github-actions: bump actions/download-artifact from 7.0.0 to 8.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](37930b1c2a...70fc10c6e5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
1 week ago
dependabot[bot] 202d1e26c3 github-actions: bump github/codeql-action from 4.32.3 to 4.32.4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.3 to 4.32.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v4.32.3...v4.32.4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.32.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
1 week ago
dependabot[bot] cfde322f06 github-actions: bump actions/upload-artifact from 6.0.0 to 7.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6.0.0 to 7.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
1 week ago