]>
git.ipfire.org Git - thirdparty/suricata.git/log
Victor Julien [Mon, 24 Oct 2022 11:08:25 +0000 (13:08 +0200)]
error: remove unused alloc error code
Victor Julien [Mon, 24 Oct 2022 10:57:29 +0000 (12:57 +0200)]
error: use SC_ENOMEM for alloc errors
Victor Julien [Mon, 24 Oct 2022 11:05:47 +0000 (13:05 +0200)]
logopenfile: errno style error handling
Victor Julien [Mon, 24 Oct 2022 11:02:55 +0000 (13:02 +0200)]
hashlist: use errno style error handling
Victor Julien [Mon, 24 Oct 2022 10:48:28 +0000 (12:48 +0200)]
membuffer: errno style error reporting
Victor Julien [Mon, 24 Oct 2022 10:46:42 +0000 (12:46 +0200)]
pool: use errno style error reporting
Victor Julien [Mon, 24 Oct 2022 10:45:13 +0000 (12:45 +0200)]
error: bootstrap errno like error code approach
Victor Julien [Sat, 17 Dec 2022 06:25:12 +0000 (07:25 +0100)]
detect/mpm: output cleanups
Victor Julien [Sun, 18 Dec 2022 06:46:44 +0000 (07:46 +0100)]
device: special case handling of dpdk devices
Victor Julien [Sat, 17 Dec 2022 19:49:46 +0000 (20:49 +0100)]
device: output tweak
Victor Julien [Sun, 18 Dec 2022 05:54:47 +0000 (06:54 +0100)]
dpdk: set RSS flags for igb driver
Tested on i340.
Victor Julien [Sun, 18 Dec 2022 06:15:03 +0000 (07:15 +0100)]
dpdk: ips output cleanups
Victor Julien [Thu, 15 Dec 2022 15:30:26 +0000 (16:30 +0100)]
eve/schema: bittorrent format fixup
Victor Julien [Fri, 2 Dec 2022 20:26:52 +0000 (21:26 +0100)]
output: minor code cleanups
Victor Julien [Thu, 1 Dec 2022 11:45:50 +0000 (12:45 +0100)]
unix-socket: don't print unix socket message twice
Jeff Lucovsky [Sun, 4 Apr 2021 14:44:53 +0000 (10:44 -0400)]
general: Correct typos
Victor Julien [Wed, 30 Nov 2022 15:29:20 +0000 (16:29 +0100)]
runmodes: minor output cleanup
Victor Julien [Thu, 1 Dec 2022 11:44:38 +0000 (12:44 +0100)]
detect: turn cleanup message into debug message
Victor Julien [Thu, 1 Dec 2022 11:48:43 +0000 (12:48 +0100)]
device/mtu: clean up mtu message
Victor Julien [Thu, 1 Dec 2022 11:48:21 +0000 (12:48 +0100)]
device: cleanup stats print
Victor Julien [Sat, 3 Dec 2022 16:07:39 +0000 (17:07 +0100)]
runmode: log test mode later
Victor Julien [Wed, 30 Nov 2022 15:14:11 +0000 (16:14 +0100)]
pcap-file: output cleanups
Victor Julien [Wed, 30 Nov 2022 15:12:53 +0000 (16:12 +0100)]
af-packet: output cleanups
Victor Julien [Wed, 30 Nov 2022 15:18:26 +0000 (16:18 +0100)]
mpm/hs: turn cleanup messages in to debug
Victor Julien [Thu, 1 Dec 2022 11:47:01 +0000 (12:47 +0100)]
stream: debug message cleanup
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);
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))
^
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);
^
Victor Julien [Wed, 30 Nov 2022 17:22:48 +0000 (18:22 +0100)]
capture: remove unnecessary mtu check
Victor Julien [Mon, 24 Oct 2022 11:00:46 +0000 (13:00 +0200)]
classification: avoid duplicate errors
Victor Julien [Mon, 24 Oct 2022 10:59:49 +0000 (12:59 +0200)]
unix-socket: avoid duplicate errors
Victor Julien [Mon, 24 Oct 2022 10:50:15 +0000 (12:50 +0200)]
dnp3: no error logging in packet path
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>
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.
Haleema Khan [Mon, 12 Dec 2022 17:11:25 +0000 (22:11 +0500)]
detect-detection: Convert unittests to new FAIL/PASS API
Ticket: #4019
Haleema Khan [Mon, 12 Dec 2022 17:44:14 +0000 (22:44 +0500)]
detect-detection: Apply clang-format
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.
Haleema Khan [Sat, 29 Oct 2022 17:42:33 +0000 (22:42 +0500)]
detect/sigorder: Convert unittests to new FAIL/PASS API
Ticket: #4029
Lukas Sismis [Wed, 30 Nov 2022 10:45:32 +0000 (11:45 +0100)]
dpdk: decrease intensity of warnings related to NUMA placement
Ticket: #5617
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.
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
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
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
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.
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
Jason Ish [Tue, 29 Nov 2022 13:16:55 +0000 (07:16 -0600)]
rust/clippy: comments on why we have specific allows
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.
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.
Jason Ish [Tue, 29 Nov 2022 12:39:31 +0000 (06:39 -0600)]
rust/clippy: fix lint: upper_case_acronyms
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.
Jason Ish [Tue, 29 Nov 2022 01:52:28 +0000 (19:52 -0600)]
rust/clippy: fix lint: len_without_is_empty
Jason Ish [Tue, 29 Nov 2022 01:49:46 +0000 (19:49 -0600)]
rust/clippy: fix lint: field_reassign_with_default
Jason Ish [Tue, 29 Nov 2022 01:45:45 +0000 (19:45 -0600)]
rust/clippy: remove allow: collapsible_else_if
Jason Ish [Tue, 29 Nov 2022 01:44:28 +0000 (19:44 -0600)]
rust/clippy: remove allow: collapsible_if
Already clean.
Jason Ish [Mon, 28 Nov 2022 23:20:40 +0000 (17:20 -0600)]
rust/clippy: fix lint: new_without_default
Jason Ish [Mon, 28 Nov 2022 22:43:04 +0000 (16:43 -0600)]
rust/clippy: fix lint: redundant_pattern_matching
Jason Ish [Mon, 28 Nov 2022 22:38:40 +0000 (16:38 -0600)]
rust/clippy: fix lint: never_loop
Jason Ish [Mon, 28 Nov 2022 22:33:38 +0000 (16:33 -0600)]
rust/clippy: fix lint: nonminimal_bool
Jason Ish [Mon, 28 Nov 2022 22:32:27 +0000 (16:32 -0600)]
rust/clippy: fix lint: derive_partial_eq_without_eq
Jason Ish [Mon, 28 Nov 2022 22:24:58 +0000 (16:24 -0600)]
rust/clippy: fix lint: explicit_counter_loop
Jason Ish [Mon, 28 Nov 2022 22:17:03 +0000 (16:17 -0600)]
rust/clippy: fix lint: extra_unused_lifetimes
Jason Ish [Mon, 28 Nov 2022 21:50:24 +0000 (15:50 -0600)]
rust/clippy: fix lint: needless_range_loop
Jason Ish [Mon, 28 Nov 2022 21:49:08 +0000 (15:49 -0600)]
rust/clippy: remove lint: for_loops_over_fallibles
Already clean.
Jason Ish [Mon, 28 Nov 2022 21:32:28 +0000 (15:32 -0600)]
rust/clippy: fix lint: match_ref_pats
Jason Ish [Mon, 28 Nov 2022 21:09:42 +0000 (15:09 -0600)]
rust/clippy: fix lint: needless_lifetimes
Jason Ish [Mon, 28 Nov 2022 21:07:03 +0000 (15:07 -0600)]
rust/clippy: remove lint: bool_comparison
Already clean.
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.
Jason Ish [Mon, 28 Nov 2022 17:31:22 +0000 (11:31 -0600)]
rust/clippy: fix lint: while_let_loop
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
Jason Ish [Fri, 18 Nov 2022 15:00:20 +0000 (09:00 -0600)]
github-ci: verify generated rust code is rustfmt and clippy clean
Jason Ish [Fri, 18 Nov 2022 14:59:11 +0000 (08:59 -0600)]
setup-app-layer: rustfmt new rust files
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.
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".
Jason Ish [Thu, 17 Nov 2022 22:27:29 +0000 (16:27 -0600)]
setup-app-layer: set copyright year to current year
Ticket: 4939
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.
Jason Ish [Thu, 17 Nov 2022 16:37:02 +0000 (10:37 -0600)]
templates: remove C app-layer templates
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.
Jason Ish [Thu, 17 Nov 2022 15:38:31 +0000 (09:38 -0600)]
setup-app-layer: remove generator for C parsers
Ticket: 4939
Jason Ish [Thu, 17 Nov 2022 06:28:59 +0000 (00:28 -0600)]
rust/app-layer-template: rustfmt
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
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.
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.
Jason Ish [Thu, 17 Nov 2022 04:28:32 +0000 (22:28 -0600)]
github-ci: rename alma to almalinux; 8.4 to 8
Victor Julien [Sat, 3 Dec 2022 09:52:38 +0000 (10:52 +0100)]
rust/lzma: clippy fixup
Victor Julien [Sat, 3 Dec 2022 06:37:43 +0000 (07:37 +0100)]
mime/base64: unify space handling
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
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.
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.
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.
Philippe Antoine [Fri, 2 Dec 2022 12:55:42 +0000 (13:55 +0100)]
dns: do not oputput empty array for query
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
Richard McConnell [Thu, 29 Sep 2022 11:35:17 +0000 (12:35 +0100)]
doc: document AF_XDP feature
Richard McConnell [Wed, 28 Sep 2022 16:15:55 +0000 (17:15 +0100)]
af-xdp: Configure build with AF_XDP 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
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
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.
Victor Julien [Fri, 18 Nov 2022 16:46:53 +0000 (17:46 +0100)]
fuzz/sigpcap: set pkt_src
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.
Victor Julien [Tue, 29 Nov 2022 09:22:02 +0000 (10:22 +0100)]
version: require libhtp 0.5.42
Victor Julien [Thu, 20 Oct 2022 13:24:52 +0000 (15:24 +0200)]
flow: cleanup and clarify ancient debug messages