]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
2 years agompm/hs: turn cleanup messages in to debug 8288/head
Victor Julien [Wed, 30 Nov 2022 15:18:26 +0000 (16:18 +0100)] 
mpm/hs: turn cleanup messages in to debug

2 years agostream: debug message cleanup
Victor Julien [Thu, 1 Dec 2022 11:47:01 +0000 (12:47 +0100)] 
stream: debug message cleanup

2 years agothreading: memset cpu_set_t to address cppcheck warning
Victor Julien [Fri, 2 Dec 2022 08:34:21 +0000 (09:34 +0100)] 
threading: memset cpu_set_t to address cppcheck warning

src/tm-threads.c:734:5: error: Uninitialized variable: cs [uninitvar]
    CPU_ZERO(&cs);

2 years agodpdk: fix cppcheck warnings
Victor Julien [Fri, 2 Dec 2022 06:05:25 +0000 (07:05 +0100)] 
dpdk: fix cppcheck warnings

src/runmode-dpdk.c:202:11: warning: Size of pointer 'argv' used instead of size of its data. This is likely to lead to a buffer overflow. You probably intend to write 'sizeof(*argv)'. [pointerSize]
    args->argv = SCCalloc(capacity, sizeof(args->argv));
          ^
src/runmode-dpdk.c:777:23: error: Shifting 32-bit value by 63 bits is undefined behaviour [shiftTooManyBits]
        if (bits & (1 << i))
                      ^
src/runmode-dpdk.c:776:23: note: Assuming that condition 'i<64' is not redundant
    for (int i = 0; i < 64; i++) {
                      ^
src/runmode-dpdk.c:777:23: note: Shift
        if (bits & (1 << i))
                      ^

2 years agoframes: suppress cppcheck warning
Victor Julien [Fri, 2 Dec 2022 06:00:26 +0000 (07:00 +0100)] 
frames: suppress cppcheck warning

src/app-layer-frames.c:471:5: warning: Identical condition 'stream_slice->input==NULL', second condition is always false [identicalConditionAfterEarlyExit]
    BUG_ON(stream_slice->input == NULL);
    ^
src/app-layer-frames.c:468:29: note: If condition 'stream_slice->input==NULL' is true, the function will return/exit
    if (stream_slice->input == NULL)
                            ^
src/app-layer-frames.c:471:5: note: Testing identical condition 'stream_slice->input==NULL'
    BUG_ON(stream_slice->input == NULL);
    ^
src/app-layer-frames.c:548:5: warning: Identical condition 'stream_slice->input==NULL', second condition is always false [identicalConditionAfterEarlyExit]
    BUG_ON(stream_slice->input == NULL);
    ^
src/app-layer-frames.c:545:29: note: If condition 'stream_slice->input==NULL' is true, the function will return/exit
    if (stream_slice->input == NULL)
                            ^
src/app-layer-frames.c:548:5: note: Testing identical condition 'stream_slice->input==NULL'
    BUG_ON(stream_slice->input == NULL);
    ^

2 years agocapture: remove unnecessary mtu check
Victor Julien [Wed, 30 Nov 2022 17:22:48 +0000 (18:22 +0100)] 
capture: remove unnecessary mtu check

2 years agoclassification: avoid duplicate errors
Victor Julien [Mon, 24 Oct 2022 11:00:46 +0000 (13:00 +0200)] 
classification: avoid duplicate errors

2 years agounix-socket: avoid duplicate errors
Victor Julien [Mon, 24 Oct 2022 10:59:49 +0000 (12:59 +0200)] 
unix-socket: avoid duplicate errors

2 years agodnp3: no error logging in packet path
Victor Julien [Mon, 24 Oct 2022 10:50:15 +0000 (12:50 +0200)] 
dnp3: no error logging in packet path

2 years agogithub-actions: bump actions/checkout from 3.1.0 to 3.2.0
dependabot[bot] [Tue, 13 Dec 2022 19:06:49 +0000 (19:06 +0000)] 
github-actions: bump actions/checkout from 3.1.0 to 3.2.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2 years agogithub: update contrib guide link in PR template
Juliana Fajardini [Wed, 14 Dec 2022 18:35:42 +0000 (15:35 -0300)] 
github: update contrib guide link in PR template

Even though we have moved the contribution process guide to our read the
docs, the template was still pointing to our redmine link.

2 years agodetect-detection: Convert unittests to new FAIL/PASS API
Haleema Khan [Mon, 12 Dec 2022 17:11:25 +0000 (22:11 +0500)] 
detect-detection: Convert unittests to new FAIL/PASS API

Ticket: #4019

2 years agodetect-detection: Apply clang-format
Haleema Khan [Mon, 12 Dec 2022 17:44:14 +0000 (22:44 +0500)] 
detect-detection: Apply clang-format

2 years agodpdk: NUMA output adjustments
Victor Julien [Tue, 13 Dec 2022 08:27:45 +0000 (08:27 +0000)] 
dpdk: NUMA output adjustments

Reduce verbosity of the NUMA logs; switch them to start with the
iface.

Don't print the cpu number.

2 years agodetect/sigorder: Convert unittests to new FAIL/PASS API
Haleema Khan [Sat, 29 Oct 2022 17:42:33 +0000 (22:42 +0500)] 
detect/sigorder: Convert unittests to new FAIL/PASS API

Ticket: #4029

2 years agodpdk: decrease intensity of warnings related to NUMA placement
Lukas Sismis [Wed, 30 Nov 2022 10:45:32 +0000 (11:45 +0100)] 
dpdk: decrease intensity of warnings related to NUMA placement

Ticket: #5617

2 years agoradix: fix ipv6 address parsing warning 8267/head
Victor Julien [Thu, 8 Dec 2022 19:14:43 +0000 (20:14 +0100)] 
radix: fix ipv6 address parsing warning

The check meant to see if the ip address part of the ip/cidr combo
was more specific than needed wasn't fully implemented, leading to
warnings being issued on completely valid and correct input.

This patch implements the same logic as in IPv4. If the ip address
as specified is different from the ip after the mask has been applied,
a warning is displayed.

Bug: #5747.

2 years agodetect-engine-tag: convert unittests to new FAIL/PASS API 8258/head
Bazzan Don [Tue, 25 Oct 2022 22:54:06 +0000 (23:54 +0100)] 
detect-engine-tag: convert unittests to new FAIL/PASS API

Ticket: #4030

2 years agodevguide: add page on installing suricata from git
Bazzan Don [Thu, 20 Oct 2022 16:36:55 +0000 (17:36 +0100)] 
devguide: add page on installing suricata from git

As part of the process of moving documentation from redmine
to "Read the Docs", this commit moves installing Suricata using git
page from redmine wiki into Suricata Developer Guide section.
It also updates the necessary steps.

Ticket: #5585

2 years agofuzz: do not use timestamps at the end of times 8251/head
Philippe Antoine [Mon, 5 Dec 2022 10:42:53 +0000 (11:42 +0100)] 
fuzz: do not use timestamps at the end of times

so as not to have integer overflows

2 years agoftp: disables debug assertion
Philippe Antoine [Mon, 5 Dec 2022 09:42:58 +0000 (10:42 +0100)] 
ftp: disables debug assertion

Ticket: #5443

Until we decide on the right way to fix this.

2 years agodoc/userguide: ubuntu: install software-properties-common
Jason Ish [Tue, 29 Nov 2022 20:32:03 +0000 (14:32 -0600)] 
doc/userguide: ubuntu: install software-properties-common

This package likely needs to be installed when starting with an Ubuntu
container or other minimal Ubuntu install.

Ticket: #5616

2 years agorust/clippy: comments on why we have specific allows
Jason Ish [Tue, 29 Nov 2022 13:16:55 +0000 (07:16 -0600)] 
rust/clippy: comments on why we have specific allows

2 years agorust/clippy: fix lint: type_complexity
Jason Ish [Tue, 29 Nov 2022 13:13:58 +0000 (07:13 -0600)] 
rust/clippy: fix lint: type_complexity

Convert a DNS sub-parser to use a return type rather than a large
tuple. For mqtt, allow the lint for now, but remove the global allow.

2 years agorust/clippy: allow result_unit_err in http2 only
Jason Ish [Tue, 29 Nov 2022 13:03:54 +0000 (07:03 -0600)] 
rust/clippy: allow result_unit_err in http2 only

Its the only module making use of this pattern, but we shouldn't let
new modules use this pattern.

2 years agorust/clippy: fix lint: upper_case_acronyms
Jason Ish [Tue, 29 Nov 2022 12:39:31 +0000 (06:39 -0600)] 
rust/clippy: fix lint: upper_case_acronyms

2 years agorust/clippy: fix lint: manual_find
Jason Ish [Tue, 29 Nov 2022 02:06:19 +0000 (20:06 -0600)] 
rust/clippy: fix lint: manual_find

These get_tx methods look like ideal candidates for generic and/or
derived methods.

2 years agorust/clippy: fix lint: len_without_is_empty
Jason Ish [Tue, 29 Nov 2022 01:52:28 +0000 (19:52 -0600)] 
rust/clippy: fix lint: len_without_is_empty

2 years agorust/clippy: fix lint: field_reassign_with_default
Jason Ish [Tue, 29 Nov 2022 01:49:46 +0000 (19:49 -0600)] 
rust/clippy: fix lint: field_reassign_with_default

2 years agorust/clippy: remove allow: collapsible_else_if
Jason Ish [Tue, 29 Nov 2022 01:45:45 +0000 (19:45 -0600)] 
rust/clippy: remove allow: collapsible_else_if

2 years agorust/clippy: remove allow: collapsible_if
Jason Ish [Tue, 29 Nov 2022 01:44:28 +0000 (19:44 -0600)] 
rust/clippy: remove allow: collapsible_if

Already clean.

2 years agorust/clippy: fix lint: new_without_default
Jason Ish [Mon, 28 Nov 2022 23:20:40 +0000 (17:20 -0600)] 
rust/clippy: fix lint: new_without_default

2 years agorust/clippy: fix lint: redundant_pattern_matching
Jason Ish [Mon, 28 Nov 2022 22:43:04 +0000 (16:43 -0600)] 
rust/clippy: fix lint: redundant_pattern_matching

2 years agorust/clippy: fix lint: never_loop
Jason Ish [Mon, 28 Nov 2022 22:38:40 +0000 (16:38 -0600)] 
rust/clippy: fix lint: never_loop

2 years agorust/clippy: fix lint: nonminimal_bool
Jason Ish [Mon, 28 Nov 2022 22:33:38 +0000 (16:33 -0600)] 
rust/clippy: fix lint: nonminimal_bool

2 years agorust/clippy: fix lint: derive_partial_eq_without_eq
Jason Ish [Mon, 28 Nov 2022 22:32:27 +0000 (16:32 -0600)] 
rust/clippy: fix lint: derive_partial_eq_without_eq

2 years agorust/clippy: fix lint: explicit_counter_loop
Jason Ish [Mon, 28 Nov 2022 22:24:58 +0000 (16:24 -0600)] 
rust/clippy: fix lint: explicit_counter_loop

2 years agorust/clippy: fix lint: extra_unused_lifetimes
Jason Ish [Mon, 28 Nov 2022 22:17:03 +0000 (16:17 -0600)] 
rust/clippy: fix lint: extra_unused_lifetimes

2 years agorust/clippy: fix lint: needless_range_loop
Jason Ish [Mon, 28 Nov 2022 21:50:24 +0000 (15:50 -0600)] 
rust/clippy: fix lint: needless_range_loop

2 years agorust/clippy: remove lint: for_loops_over_fallibles
Jason Ish [Mon, 28 Nov 2022 21:49:08 +0000 (15:49 -0600)] 
rust/clippy: remove lint: for_loops_over_fallibles

Already clean.

2 years agorust/clippy: fix lint: match_ref_pats
Jason Ish [Mon, 28 Nov 2022 21:32:28 +0000 (15:32 -0600)] 
rust/clippy: fix lint: match_ref_pats

2 years agorust/clippy: fix lint: needless_lifetimes
Jason Ish [Mon, 28 Nov 2022 21:09:42 +0000 (15:09 -0600)] 
rust/clippy: fix lint: needless_lifetimes

2 years agorust/clippy: remove lint: bool_comparison
Jason Ish [Mon, 28 Nov 2022 21:07:03 +0000 (15:07 -0600)] 
rust/clippy: remove lint: bool_comparison

Already clean.

2 years agorust/clippy: fix lint: single_match
Jason Ish [Mon, 28 Nov 2022 17:39:37 +0000 (11:39 -0600)] 
rust/clippy: fix lint: single_match

Allow this lint in some cases where a match statement adds clarity.

2 years agorust/clippy: fix lint: while_let_loop
Jason Ish [Mon, 28 Nov 2022 17:31:22 +0000 (11:31 -0600)] 
rust/clippy: fix lint: while_let_loop

2 years agoquic: do not use stack for inspection buffer
Philippe Antoine [Wed, 23 Nov 2022 14:07:56 +0000 (15:07 +0100)] 
quic: do not use stack for inspection buffer

Make the inspection buffer copy the content in one buffer it owns.

Ticket: #5707

2 years agogithub-ci: verify generated rust code is rustfmt and clippy clean
Jason Ish [Fri, 18 Nov 2022 15:00:20 +0000 (09:00 -0600)] 
github-ci: verify generated rust code is rustfmt and clippy clean

2 years agosetup-app-layer: rustfmt new rust files
Jason Ish [Fri, 18 Nov 2022 14:59:11 +0000 (08:59 -0600)] 
setup-app-layer: rustfmt new rust files

2 years agotemplate: import c_void, c_char, c_int
Jason Ish [Thu, 17 Nov 2022 22:42:00 +0000 (16:42 -0600)] 
template: import c_void, c_char, c_int

These are ffi types that are commonly used, import them so they can be
used by their short names instead of a fully qualified name.

2 years agotemplate: remove no_mangle and pub where not needed
Jason Ish [Thu, 17 Nov 2022 22:36:58 +0000 (16:36 -0600)] 
template: remove no_mangle and pub where not needed

Extern functions that are only used as a function pointer do not
require "pub" or "no_mangle".

2 years agosetup-app-layer: set copyright year to current year
Jason Ish [Thu, 17 Nov 2022 22:27:29 +0000 (16:27 -0600)] 
setup-app-layer: set copyright year to current year

Ticket: 4939

2 years agotemplate: rename template-rust to template
Jason Ish [Thu, 17 Nov 2022 22:05:15 +0000 (16:05 -0600)] 
template: rename template-rust to template

Remove the distinction between the C template protocol "template" and
the Rust template protocol "template-rust" and make the Rust parser
simply template now that we no longer have support to generate a C
protocol template.

2 years agotemplates: remove C app-layer templates
Jason Ish [Thu, 17 Nov 2022 16:37:02 +0000 (10:37 -0600)] 
templates: remove C app-layer templates

2 years agotemplates: clang format cleanups
Jason Ish [Thu, 17 Nov 2022 16:00:19 +0000 (10:00 -0600)] 
templates: clang format cleanups

Cleanup the trivial clang-formatting issues in templates.  Length of
protocol names may require clang-format after new protocol generation.

2 years agosetup-app-layer: remove generator for C parsers
Jason Ish [Thu, 17 Nov 2022 15:38:31 +0000 (09:38 -0600)] 
setup-app-layer: remove generator for C parsers

Ticket: 4939

2 years agorust/app-layer-template: rustfmt
Jason Ish [Thu, 17 Nov 2022 06:28:59 +0000 (00:28 -0600)] 
rust/app-layer-template: rustfmt

2 years agoapp-layer-template-rust: remove C app-layer stub
Jason Ish [Thu, 17 Nov 2022 04:50:59 +0000 (22:50 -0600)] 
app-layer-template-rust: remove C app-layer stub

Remove the app-layer-PROTO stub for Rust based parsers.  It is no longer
needed as Rust parsers now contain the registration function in Rust.

Ticket: 4939

2 years agorust/conf: add fn conf_get_node
Jason Ish [Thu, 17 Nov 2022 05:50:13 +0000 (23:50 -0600)] 
rust/conf: add fn conf_get_node

A wrapper around ConfGetNode to get a configuration node by name.

2 years agogithub-ci: add app-layer-template builder
Jason Ish [Thu, 17 Nov 2022 05:19:06 +0000 (23:19 -0600)] 
github-ci: add app-layer-template builder

Creates a protocol parser and logger and builds.

2 years agogithub-ci: rename alma to almalinux; 8.4 to 8
Jason Ish [Thu, 17 Nov 2022 04:28:32 +0000 (22:28 -0600)] 
github-ci: rename alma to almalinux; 8.4 to 8

2 years agorust/lzma: clippy fixup 8237/head
Victor Julien [Sat, 3 Dec 2022 09:52:38 +0000 (10:52 +0100)] 
rust/lzma: clippy fixup

2 years agomime/base64: unify space handling
Victor Julien [Sat, 3 Dec 2022 06:37:43 +0000 (07:37 +0100)] 
mime/base64: unify space handling

2 years agomime: do not skip empty lines for quoted-printable
Philippe Antoine [Fri, 2 Dec 2022 13:43:10 +0000 (14:43 +0100)] 
mime: do not skip empty lines for quoted-printable

As these lines are in the file...

Ticket: #5725

2 years agogithub-ci: enable lua on Fedora 36 build
Jason Ish [Fri, 2 Dec 2022 15:39:55 +0000 (09:39 -0600)] 
github-ci: enable lua on Fedora 36 build

Not many of the jobs that run S-V enable Lua, enable Lua for Fedora 36
which also runs S-V.

2 years agorust/http2: fix clippy lint for is_empty()
Jason Ish [Fri, 2 Dec 2022 14:31:58 +0000 (08:31 -0600)] 
rust/http2: fix clippy lint for is_empty()

This snuck through as "cargo clippy" check wasn't finding lints that
were fixed by the previous test for fixable lints.

2 years agogithub-ci: fail if cargo clippy --fix creates a changes
Jason Ish [Fri, 2 Dec 2022 14:26:03 +0000 (08:26 -0600)] 
github-ci: fail if cargo clippy --fix creates a changes

Previously this was doing fixups and only warning, not erroring. Which
could made the following clippy command pass.

2 years agodns: do not oputput empty array for query
Philippe Antoine [Fri, 2 Dec 2022 12:55:42 +0000 (13:55 +0100)] 
dns: do not oputput empty array for query

2 years agoeve/schema: check that each array has at least one element
Philippe Antoine [Fri, 23 Sep 2022 12:25:39 +0000 (14:25 +0200)] 
eve/schema: check that each array has at least one element

Ticket: #5167

2 years agodoc: document AF_XDP feature
Richard McConnell [Thu, 29 Sep 2022 11:35:17 +0000 (12:35 +0100)] 
doc: document AF_XDP feature

2 years agoaf-xdp: Configure build with AF_XDP support
Richard McConnell [Wed, 28 Sep 2022 16:15:55 +0000 (17:15 +0100)] 
af-xdp: Configure build with AF_XDP support

2 years agoaf-xdp: Add AF_XDP socket support
Richard McConnell [Tue, 13 Sep 2022 13:22:13 +0000 (14:22 +0100)] 
af-xdp: Add AF_XDP socket support

AF_XDP support is a recent technology introduced that aims at improving
capture performance. With this update, Suricata now provides a new
capture source 'af-xdp' that attaches an eBPF program to the network
interface card. Packets received in the NIC queue are forwarded to
a RX ring in user-space, bypassing the Linux network stack.

Note, there is a configuration option (force-xdp-mode) that forces the
packet through the normal Linux network stack.

libxdp and libbpf is required for this feature and is compile time
configured.

This capture source operates on single and multi-queue NIC's via
suricata.yaml. Here, various features can be enabled, disabled
or edited as required by the use case.

This feature currently only supports receiving packets via AF_XDP,
no TX support has been developed.

Ticket: https://redmine.openinfosecfoundation.org/issues/3306

Additional reading:
https://www.kernel.org/doc/html/latest/networking/af_xdp.html

2 years agofile/swf: Use lzma-rs decompression instead of libhtp.
Todd Mortimer [Fri, 8 Jul 2022 20:47:41 +0000 (20:47 +0000)] 
file/swf: Use lzma-rs decompression instead of libhtp.

Use the lzma-rs crate for decompressing swf/lzma files instead of
the lzma decompressor in libhtp. This decouples suricata from libhtp
except for actual http parsing, and means libhtp no longer has to
export a lzma decompression interface.

Ticket: #5638

2 years agosmb: fix file reopening issue 8223/head
Victor Julien [Wed, 30 Nov 2022 05:44:40 +0000 (06:44 +0100)] 
smb: fix file reopening issue

Fuzzing highlighted an issue where a command sequence on the same file
id triggered a logging issue:

file data for id N
close id N
file data for id N

If this happened in a single blob of data passed to the parser, the
existing file tx would be reused, the file "reopened", confusing the
file logging logic. This would trigger a debug assert.

This patch makes sure a new file tx is created for the file data
coming in after the first file tx is closed.

Bug: #5567.

2 years agofuzz/sigpcap: set pkt_src
Victor Julien [Fri, 18 Nov 2022 16:46:53 +0000 (17:46 +0100)] 
fuzz/sigpcap: set pkt_src

2 years agostream: stricter check inserting segments
Victor Julien [Thu, 17 Nov 2022 13:59:30 +0000 (14:59 +0100)] 
stream: stricter check inserting segments

In lossy streams, esp where TcpSession::lossy_be_liberal it is possible
to end up inserting a segment that is out of the expected sequence
number bounds.

2 years agoversion: require libhtp 0.5.42 8218/head
Victor Julien [Tue, 29 Nov 2022 09:22:02 +0000 (10:22 +0100)] 
version: require libhtp 0.5.42

2 years agoflow: cleanup and clarify ancient debug messages
Victor Julien [Thu, 20 Oct 2022 13:24:52 +0000 (15:24 +0200)] 
flow: cleanup and clarify ancient debug messages

2 years agodecode: enforce layer limit through tunnel layers
Victor Julien [Thu, 20 Oct 2022 13:14:26 +0000 (15:14 +0200)] 
decode: enforce layer limit through tunnel layers

Bug: #5686.

2 years agodcerpc: fix integer underflow
Philippe Antoine [Fri, 23 Sep 2022 09:01:03 +0000 (11:01 +0200)] 
dcerpc: fix integer underflow

as input.len() can be 65536, it cannot be directly cast to u16

Ticket: #5557

2 years agoutil/base64: fix heap buffer overflow
Shivani Bhardwaj [Mon, 31 Oct 2022 11:04:47 +0000 (16:34 +0530)] 
util/base64: fix heap buffer overflow

While updating the destination pointer, we were also adding the padded
bytes which are not a part of the decoded bytes. This led to running out
of space on the destination buffer.
Fix it by only incrementing destination buffer ptr by the number of
actual bytes that were decoded.

Ticket 5623

2 years agoversion: development towards 7.0.0-rc1
Victor Julien [Thu, 17 Nov 2022 11:17:01 +0000 (12:17 +0100)] 
version: development towards 7.0.0-rc1

2 years agogithub-ci: non-root builder 8217/head
Jason Ish [Thu, 27 Oct 2022 19:14:07 +0000 (13:14 -0600)] 
github-ci: non-root builder

All the GitHub CI jobs run as root inside a container. This means the
testing is done in a different environment than a developer typically
uses, running as a user.

Add a job that does the build as a non-root user.

2 years agorust: sha-1 is now sha1 8216/head
Jason Ish [Mon, 28 Nov 2022 14:56:08 +0000 (08:56 -0600)] 
rust: sha-1 is now sha1

This is the same crate, but renamed to be more consistent with the
RustCrypto project naming. Some recent discussion is available here:

    https://github.com/RustCrypto/hashes/issues/438

2 years agosmb: do not use tree id to match request and response 8209/head
Philippe Antoine [Tue, 22 Nov 2022 20:47:37 +0000 (21:47 +0100)] 
smb: do not use tree id to match request and response

Completes commit e94920b49f43bea4220a1bdf32297ec004e58059

This must be true for access to state ssn2vecoffset_map

Ticket: #5161

2 years agoreadthedocs: enable all formats
Jason Ish [Tue, 8 Nov 2022 10:50:55 +0000 (12:50 +0200)] 
readthedocs: enable all formats

Ticket: #5654

2 years agosmtp/files: don't modify prev file on open failure
Victor Julien [Wed, 23 Nov 2022 13:42:21 +0000 (14:42 +0100)] 
smtp/files: don't modify prev file on open failure

2 years agofiles: always initialize inspect_window and min_inspect_depth
Victor Julien [Wed, 23 Nov 2022 13:29:39 +0000 (14:29 +0100)] 
files: always initialize inspect_window and min_inspect_depth

This is to make sure the files buffers are properly managed even
when there are no rules or when there are no file.data rules.

Bug: #5703.

2 years agorust/files: open file without trackid as pointer
Victor Julien [Wed, 23 Nov 2022 10:56:33 +0000 (11:56 +0100)] 
rust/files: open file without trackid as pointer

2 years agorust/filecontainer: remove unused declaration
Victor Julien [Wed, 23 Nov 2022 10:55:42 +0000 (11:55 +0100)] 
rust/filecontainer: remove unused declaration

2 years agostreaming/buffer: set hard limit on buffer size
Victor Julien [Thu, 24 Nov 2022 11:01:13 +0000 (12:01 +0100)] 
streaming/buffer: set hard limit on buffer size

Don't allow the buffer to grow beyond 1GiB. Add a once per thread
warning if it does reach it.

Bug: #5703.

2 years agogithub-ci/centos:7: cache yum RPMs 8198/head
Jason Ish [Fri, 18 Nov 2022 20:52:43 +0000 (14:52 -0600)] 
github-ci/centos:7: cache yum RPMs

2 years agogithub-ci/windows: cache cargo artifacts
Jason Ish [Fri, 18 Nov 2022 20:46:15 +0000 (14:46 -0600)] 
github-ci/windows: cache cargo artifacts

2 years agogithub-ci/macos: don't force cbindgen
Jason Ish [Fri, 18 Nov 2022 20:45:29 +0000 (14:45 -0600)] 
github-ci/macos: don't force cbindgen

We want to use binary from the cache if available.

2 years agogithub-ci: cache RPMs on dnf distros
Jason Ish [Fri, 18 Nov 2022 17:18:38 +0000 (11:18 -0600)] 
github-ci: cache RPMs on dnf distros

2 years agogithub-ci: better .cargo caching
Jason Ish [Fri, 18 Nov 2022 16:47:45 +0000 (10:47 -0600)] 
github-ci: better .cargo caching

2 years agohttp2: fix decompression buffering
Philippe Antoine [Mon, 21 Nov 2022 16:06:44 +0000 (17:06 +0100)] 
http2: fix decompression buffering

It was not enough to set Cursor position to 0,
also its inner Vec should be cleared.

This way, a new input gets written at the beginning of the
Cursor and its inner Vec...

Ticket: #5691

2 years agohttp2: support padded data frames
Philippe Antoine [Mon, 21 Nov 2022 15:21:19 +0000 (16:21 +0100)] 
http2: support padded data frames

Ticket: #5691

2 years agosrc: unify how warnings specify ticket id's
Victor Julien [Tue, 22 Nov 2022 13:14:17 +0000 (14:14 +0100)] 
src: unify how warnings specify ticket id's

2 years agoafpacket/netmap: warn about mixed ips, ids/tap deprecation
Jason Ish [Wed, 19 Oct 2022 19:07:56 +0000 (13:07 -0600)] 
afpacket/netmap: warn about mixed ips, ids/tap deprecation

Suricata already logs if AF_PACKET or Netmap are running in a mixed IPS
and IDS/TAP mode.  As the behavior is undefined when these modes are
mixed, it is best to deprecate and to not allow this behavior. For now
warn that it will be unsupported and fail in Suricata 8.

Ticket: 5587

2 years agoci: remove unnecessary write permission to github workflow 8192/head
Philippe Antoine [Fri, 17 Jun 2022 13:00:31 +0000 (15:00 +0200)] 
ci: remove unnecessary write permission to github workflow