]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
2 years agoscripts: fix app-layer-protos.c setup 8308/head
Shivani Bhardwaj [Tue, 20 Dec 2022 14:10:27 +0000 (19:40 +0530)] 
scripts: fix app-layer-protos.c setup

After the changes in the script in 05e16820de, the file
app-layer-protos.c was to be modified properly iff it was left unformatted.
However, the file was also formatted as a part of the same commit making
the lines split which broke the output of the script. Fix that by
looking for another pattern and changing the lines following that.

2 years agoapp/protos: reformat string to proto 8305/head
Victor Julien [Tue, 20 Dec 2022 10:36:55 +0000 (11:36 +0100)] 
app/protos: reformat string to proto

2 years agoapp-layer: check name vs proto mapping in registration
Victor Julien [Tue, 20 Dec 2022 10:34:45 +0000 (11:34 +0100)] 
app-layer: check name vs proto mapping in registration

2 years agonetmap/runmode: minor code cleanup
Victor Julien [Tue, 20 Dec 2022 09:58:27 +0000 (10:58 +0100)] 
netmap/runmode: minor code cleanup

2 years agoioctl: output cleanups 8304/head
Victor Julien [Tue, 20 Dec 2022 07:01:20 +0000 (08:01 +0100)] 
ioctl: output cleanups

2 years agonetmap: output cleanups
Victor Julien [Tue, 20 Dec 2022 07:01:06 +0000 (08:01 +0100)] 
netmap: output cleanups

2 years agodpdk: don't "fix" broken ips setting
Victor Julien [Sun, 18 Dec 2022 05:52:22 +0000 (06:52 +0100)] 
dpdk: don't "fix" broken ips setting

2 years agodpdk: output cleanups
Victor Julien [Sat, 17 Dec 2022 19:36:59 +0000 (20:36 +0100)] 
dpdk: output cleanups

2 years agonfq: minor error message improvement
Victor Julien [Sat, 17 Dec 2022 13:31:12 +0000 (14:31 +0100)] 
nfq: minor error message improvement

2 years agooutput: add %M format option for the log message body
Victor Julien [Sat, 17 Dec 2022 08:01:10 +0000 (09:01 +0100)] 
output: add %M format option for the log message body

If %M is not specified, it is automatically appended to the format
string, to provide backwards compatibility.

2 years agocommandline: output cleanups
Victor Julien [Sat, 17 Dec 2022 06:27:17 +0000 (07:27 +0100)] 
commandline: output cleanups

2 years agopcap: output cleanups
Victor Julien [Sat, 17 Dec 2022 06:26:00 +0000 (07:26 +0100)] 
pcap: output cleanups

2 years agooutput: default output format
Victor Julien [Sat, 3 Dec 2022 16:09:40 +0000 (17:09 +0100)] 
output: default output format

Add a separate default for file output.

2 years agooutput: remove unused log levels
Victor Julien [Thu, 1 Dec 2022 12:02:45 +0000 (13:02 +0100)] 
output: remove unused log levels

Critical, alert and emergency were unused, so remove.

2 years agooutput: print detect-engine as detect
Victor Julien [Thu, 1 Dec 2022 11:51:42 +0000 (12:51 +0100)] 
output: print detect-engine as detect

2 years agooutput/capture: group source and runmode
Victor Julien [Wed, 30 Nov 2022 15:15:58 +0000 (16:15 +0100)] 
output/capture: group source and runmode

So outputs from runmode-af-packet and source-af-packet both will
show 'af-packet' as the module.

2 years agooutput: add %D for compact log level
Victor Julien [Thu, 1 Dec 2022 11:51:03 +0000 (12:51 +0100)] 
output: add %D for compact log level

2 years agolog/json: Convert log output to use JsonBuilder
Jeff Lucovsky [Sun, 4 Apr 2021 15:25:39 +0000 (11:25 -0400)] 
log/json: Convert log output to use JsonBuilder

This commit converts the file logging logic to use JsonBuilder instead
of libjansson.

2 years agoconfig: Clarify when log format can be overridden
Jeff Lucovsky [Sun, 4 Apr 2021 14:45:38 +0000 (10:45 -0400)] 
config: Clarify when log format can be overridden

2 years agolog: Use SCCalloc instead of alloc/clear
Jeff Lucovsky [Sun, 4 Apr 2021 14:45:09 +0000 (10:45 -0400)] 
log: Use SCCalloc instead of alloc/clear

2 years agolog: Add module and subsystem identifiers to log
Jeff Lucovsky [Wed, 14 Apr 2021 12:47:52 +0000 (08:47 -0400)] 
log: Add module and subsystem identifiers to log

Issue: 2497

This changeset provides subsystem and module identifiers in the log when
the log format string contains "%S". By convention, the log format
surrounds "%S" with brackets.

The subsystem name is generally the same as the thread name. The module
name is derived from the source code module name and usually consists of
the first one or 2 segments of the name using the dash character as the
segment delimiter.

2 years agounix-socket: minor output improvements
Victor Julien [Thu, 15 Dec 2022 18:44:58 +0000 (19:44 +0100)] 
unix-socket: minor output improvements

2 years agompm/ac: remove dead code
Victor Julien [Thu, 15 Dec 2022 18:51:31 +0000 (19:51 +0100)] 
mpm/ac: remove dead code

2 years agompm/ac: use FatalError instead of Critical and exit
Victor Julien [Thu, 1 Dec 2022 12:01:54 +0000 (13:01 +0100)] 
mpm/ac: use FatalError instead of Critical and exit

2 years agodetect: more compact message on error
Victor Julien [Thu, 1 Dec 2022 11:49:13 +0000 (12:49 +0100)] 
detect: more compact message on error

2 years agoaf-packet: output cleanups and unification
Victor Julien [Thu, 1 Dec 2022 11:46:39 +0000 (12:46 +0100)] 
af-packet: output cleanups and unification

Make all messages use the same format:

<iface>: <message>

2 years agooutput: issue warning if file can't be opened
Victor Julien [Sat, 3 Dec 2022 16:09:07 +0000 (17:09 +0100)] 
output: issue warning if file can't be opened

2 years agooutput: remove all custom errors
Victor Julien [Wed, 30 Nov 2022 08:57:06 +0000 (09:57 +0100)] 
output: remove all custom errors

2 years agooutput: remove error codes from output
Victor Julien [Wed, 30 Nov 2022 07:02:46 +0000 (08:02 +0100)] 
output: remove error codes from output

2 years agoerror: use SC_EINVAL for invalid input
Victor Julien [Fri, 21 Oct 2022 10:24:58 +0000 (12:24 +0200)] 
error: use SC_EINVAL for invalid input

2 years agoerror: remove unused alloc error code
Victor Julien [Mon, 24 Oct 2022 11:08:25 +0000 (13:08 +0200)] 
error: remove unused alloc error code

2 years agoerror: use SC_ENOMEM for alloc errors
Victor Julien [Mon, 24 Oct 2022 10:57:29 +0000 (12:57 +0200)] 
error: use SC_ENOMEM for alloc errors

2 years agologopenfile: errno style error handling
Victor Julien [Mon, 24 Oct 2022 11:05:47 +0000 (13:05 +0200)] 
logopenfile: errno style error handling

2 years agohashlist: use errno style error handling
Victor Julien [Mon, 24 Oct 2022 11:02:55 +0000 (13:02 +0200)] 
hashlist: use errno style error handling

2 years agomembuffer: errno style error reporting
Victor Julien [Mon, 24 Oct 2022 10:48:28 +0000 (12:48 +0200)] 
membuffer: errno style error reporting

2 years agopool: use errno style error reporting
Victor Julien [Mon, 24 Oct 2022 10:46:42 +0000 (12:46 +0200)] 
pool: use errno style error reporting

2 years agoerror: bootstrap errno like error code approach
Victor Julien [Mon, 24 Oct 2022 10:45:13 +0000 (12:45 +0200)] 
error: bootstrap errno like error code approach

2 years agodetect/mpm: output cleanups
Victor Julien [Sat, 17 Dec 2022 06:25:12 +0000 (07:25 +0100)] 
detect/mpm: output cleanups

2 years agodevice: special case handling of dpdk devices
Victor Julien [Sun, 18 Dec 2022 06:46:44 +0000 (07:46 +0100)] 
device: special case handling of dpdk devices

2 years agodevice: output tweak
Victor Julien [Sat, 17 Dec 2022 19:49:46 +0000 (20:49 +0100)] 
device: output tweak

2 years agodpdk: set RSS flags for igb driver
Victor Julien [Sun, 18 Dec 2022 05:54:47 +0000 (06:54 +0100)] 
dpdk: set RSS flags for igb driver

Tested on i340.

2 years agodpdk: ips output cleanups
Victor Julien [Sun, 18 Dec 2022 06:15:03 +0000 (07:15 +0100)] 
dpdk: ips output cleanups

2 years agoeve/schema: bittorrent format fixup
Victor Julien [Thu, 15 Dec 2022 15:30:26 +0000 (16:30 +0100)] 
eve/schema: bittorrent format fixup

2 years agooutput: minor code cleanups
Victor Julien [Fri, 2 Dec 2022 20:26:52 +0000 (21:26 +0100)] 
output: minor code cleanups

2 years agounix-socket: don't print unix socket message twice
Victor Julien [Thu, 1 Dec 2022 11:45:50 +0000 (12:45 +0100)] 
unix-socket: don't print unix socket message twice

2 years agogeneral: Correct typos
Jeff Lucovsky [Sun, 4 Apr 2021 14:44:53 +0000 (10:44 -0400)] 
general: Correct typos

2 years agorunmodes: minor output cleanup
Victor Julien [Wed, 30 Nov 2022 15:29:20 +0000 (16:29 +0100)] 
runmodes: minor output cleanup

2 years agodetect: turn cleanup message into debug message
Victor Julien [Thu, 1 Dec 2022 11:44:38 +0000 (12:44 +0100)] 
detect: turn cleanup message into debug message

2 years agodevice/mtu: clean up mtu message
Victor Julien [Thu, 1 Dec 2022 11:48:43 +0000 (12:48 +0100)] 
device/mtu: clean up mtu message

2 years agodevice: cleanup stats print
Victor Julien [Thu, 1 Dec 2022 11:48:21 +0000 (12:48 +0100)] 
device: cleanup stats print

2 years agorunmode: log test mode later
Victor Julien [Sat, 3 Dec 2022 16:07:39 +0000 (17:07 +0100)] 
runmode: log test mode later

2 years agopcap-file: output cleanups
Victor Julien [Wed, 30 Nov 2022 15:14:11 +0000 (16:14 +0100)] 
pcap-file: output cleanups

2 years agoaf-packet: output cleanups
Victor Julien [Wed, 30 Nov 2022 15:12:53 +0000 (16:12 +0100)] 
af-packet: output cleanups

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