]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
18 months agodetect: make SigMatch.is_last bool 10187/head
Shivani Bhardwaj [Tue, 16 Jan 2024 08:41:34 +0000 (14:11 +0530)] 
detect: make SigMatch.is_last bool

It is used like bool so much so that nothing needs to be changed even
after changing its type.

18 months agodetect: remove unneeded size in DetectEngineCtx
Shivani Bhardwaj [Tue, 16 Jan 2024 08:40:59 +0000 (14:10 +0530)] 
detect: remove unneeded size in DetectEngineCtx

sig_array_size can easily be calculated with length and is only used at
one place for debugging purposes. Remove it from the DetectEngineCtx
struct to avoid making it unnecessarily heavy.

18 months agodetect/alert: remove unnecessary else
Shivani Bhardwaj [Tue, 16 Jan 2024 08:39:57 +0000 (14:09 +0530)] 
detect/alert: remove unnecessary else

18 months agohtp/swf: Remove flash deprecation notice
Jeff Lucovsky [Tue, 16 Jan 2024 15:36:07 +0000 (10:36 -0500)] 
htp/swf: Remove flash deprecation notice

Issue: 6605

Flash decompression will remain so the deprecation notice is not needed.

18 months agodoc/pcap-log: Remove squil documentation
Jeff Lucovsky [Tue, 16 Jan 2024 14:11:36 +0000 (09:11 -0500)] 
doc/pcap-log: Remove squil documentation

Issue: 6347

18 months agolog/pcap: Remove sguil mode
Jeff Lucovsky [Tue, 16 Jan 2024 14:08:44 +0000 (09:08 -0500)] 
log/pcap: Remove sguil mode

Issue: 6347

Remove sguil-mode pcap logging capability.

18 months agoconf/log: Remove sguil mode
Jeff Lucovsky [Tue, 16 Jan 2024 13:30:25 +0000 (08:30 -0500)] 
conf/log: Remove sguil mode

Issue: 6347

18 months agoeve/schema: allow authorities in dns.answers in alert
Jason Ish [Tue, 9 Jan 2024 17:40:48 +0000 (11:40 -0600)] 
eve/schema: allow authorities in dns.answers in alert

Factor out dns.authorities to a definition.

18 months agoflow-bypass: Set bypass thread to running state
Vincent Li [Fri, 4 Aug 2023 17:49:35 +0000 (17:49 +0000)] 
flow-bypass: Set bypass thread to running state

When running Suricata in XDP bypass mode (bypass: yes),

Suricata started up with error:
Error: threads: thread "FB" failed to start in time: flags 0003

"FB" thread does not transition from THV_INIT_DONE to THV_RUNNING.

Set "FB" thread THV_RUNNING state in BypassedFlowManager().

Bug: #6254

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
18 months agorust: update test_case crate 10167/head
Philippe Antoine [Fri, 5 Jan 2024 09:18:46 +0000 (10:18 +0100)] 
rust: update test_case crate

fixes unused_unit

warning: unneeded unit expression
   --> src/bittorrent_dht/parser.rs:590:5
    |
590 | /     #[test_case(
591 | |         b"",
592 | |         "Error: discovered Dict but expected EOF" ;
593 | |         "test parse bittorrent dht packet err 1"
594 | |     )]
    | |______^

18 months agoci: run clippy on test code as well
Philippe Antoine [Sat, 6 Jan 2024 21:16:24 +0000 (22:16 +0100)] 
ci: run clippy on test code as well

18 months agorust: fix single_binding
Philippe Antoine [Sat, 6 Jan 2024 21:15:11 +0000 (22:15 +0100)] 
rust: fix single_binding

error: this match could be written as a `let` statement
   --> src/nfs/nfs3_records.rs:747:9
    |
747 | /         match result {
748 | |             (r, request) => {
749 | |                 assert_eq!(r.len(), 0);
750 | |                 assert_eq!(request.handle, expected_handle);
751 | |                 assert_eq!(request.name_vec, br#"bln"#);
752 | |             }
753 | |         }
    | |_________^

18 months agorust: fix single_match
Philippe Antoine [Fri, 5 Jan 2024 09:30:33 +0000 (10:30 +0100)] 
rust: fix single_match

warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
   --> src/http2/parser.rs:882:17
    |
882 | /                 match ctx.value {
883 | |                     Some(_) => {
884 | |                         panic!("Unexpected value");
885 | |                     }
886 | |                     None => {}
887 | |                 }
    | |_________________^

18 months agorust: fix vec_init_then_push
Philippe Antoine [Fri, 5 Jan 2024 09:27:34 +0000 (10:27 +0100)] 
rust: fix vec_init_then_push

warning: calls to `push` immediately after creation
    --> src/pgsql/parser.rs:1179:9
     |
1179 | /         let mut database_param: Vec<PgsqlParameter> = Vec::new();
1180 | |         database_param.push(database);
     | |______________________________________^
help: consider using the `vec![]` macro: `let database_param: Vec<PgsqlParameter> = vec![..];`

18 months agorust: fix zero_prefixed_literal
Philippe Antoine [Fri, 5 Jan 2024 09:22:39 +0000 (10:22 +0100)] 
rust: fix zero_prefixed_literal

warning: this is a decimal constant
   --> src/mqtt/parser.rs:888:19
    |
888 |             0x00, 06, /* Topic Length: 6 */
    |                   ^^
    |

18 months agorust: fix assertions_on_constants for assert!(false)
Philippe Antoine [Thu, 4 Jan 2024 11:48:12 +0000 (12:48 +0100)] 
rust: fix assertions_on_constants for assert!(false)

using panic! instead with a string message

18 months agorust: fix assertions_on_constants for assert!(true)
Philippe Antoine [Thu, 4 Jan 2024 10:48:32 +0000 (11:48 +0100)] 
rust: fix assertions_on_constants for assert!(true)

Which will be optimized away by the compiler

18 months agoipfw: close(2) instead shutdown(2) of the divert(4) socket
Gleb Smirnoff [Thu, 11 Jan 2024 21:35:21 +0000 (13:35 -0800)] 
ipfw: close(2) instead shutdown(2) of the divert(4) socket

The shutdown(2) syscall would always return ENOTCONN for FreeBSD 11,
FreeBSD 12, FreeBSD 13 and FreeBSD 14.  It could do some action on the
socket in the kernel in FreeBSD 10 and before, did not test.

18 months agodetect: strip_pseudo_headers transform
Philippe Antoine [Tue, 12 Dec 2023 08:34:04 +0000 (09:34 +0100)] 
detect: strip_pseudo_headers transform

Ticket: 6546

18 months agoeve/http: add location header independent of status availability 10134/head
Victor Julien [Mon, 8 Jan 2024 08:02:46 +0000 (09:02 +0100)] 
eve/http: add location header independent of status availability

18 months agoeve/http: use numeric status code by default
Victor Julien [Mon, 8 Jan 2024 08:02:15 +0000 (09:02 +0100)] 
eve/http: use numeric status code by default

To avoid costly string operations.

18 months agoeve/email: improve logging binary data
Victor Julien [Mon, 8 Jan 2024 06:43:04 +0000 (07:43 +0100)] 
eve/email: improve logging binary data

Use jb_append_string_from_bytes() as it works better than
BytesToString+jb_append_string when logging binary data.

Bug: #6664.

18 months agoflow: minor optimization
Victor Julien [Wed, 3 Jan 2024 11:16:25 +0000 (12:16 +0100)] 
flow: minor optimization

Most of the time FlowGetFlowFromHash will succeed.

18 months agodetect: consolidate per rule group file loops
Victor Julien [Wed, 3 Jan 2024 11:09:59 +0000 (12:09 +0100)] 
detect: consolidate per rule group file loops

Don't loop multiple times over the per group sig array.

18 months agodetect: remove DCERPC mask logic
Victor Julien [Sun, 31 Dec 2023 07:17:24 +0000 (08:17 +0100)] 
detect: remove DCERPC mask logic

Added nothing over alproto check already in place.

18 months agodetect/rule-header: use bool type
Victor Julien [Wed, 3 Jan 2024 09:50:04 +0000 (10:50 +0100)] 
detect/rule-header: use bool type

Update frame prototype as well, to match already returned true/false values.

18 months agodetect/rule-header: minor code cleanups
Victor Julien [Wed, 3 Jan 2024 09:44:09 +0000 (10:44 +0100)] 
detect/rule-header: minor code cleanups

18 months agodetect/address: refactor match array building
Victor Julien [Sun, 31 Dec 2023 09:22:13 +0000 (10:22 +0100)] 
detect/address: refactor match array building

18 months agodetect/address: minor cleanup
Victor Julien [Sun, 31 Dec 2023 09:17:38 +0000 (10:17 +0100)] 
detect/address: minor cleanup

18 months agompm/ac: pointer hygene
Victor Julien [Fri, 29 Dec 2023 17:27:17 +0000 (18:27 +0100)] 
mpm/ac: pointer hygene

18 months agompm/hs: improve pointer hygene
Victor Julien [Fri, 29 Dec 2023 09:59:43 +0000 (10:59 +0100)] 
mpm/hs: improve pointer hygene

18 months agodetect/mpm: minor cleanup
Victor Julien [Fri, 29 Dec 2023 08:22:14 +0000 (09:22 +0100)] 
detect/mpm: minor cleanup

18 months agodetect: shrink sgh to have all runtime members on one cache line
Victor Julien [Wed, 27 Dec 2023 18:08:29 +0000 (19:08 +0100)] 
detect: shrink sgh to have all runtime members on one cache line

18 months agodetect: constify flow flags in tx rule inspect
Victor Julien [Wed, 27 Dec 2023 16:12:33 +0000 (17:12 +0100)] 
detect: constify flow flags in tx rule inspect

18 months agodetect: minor cleanup for rule group get function
Victor Julien [Wed, 27 Dec 2023 16:01:42 +0000 (17:01 +0100)] 
detect: minor cleanup for rule group get function

18 months agoapp-layer: micro optimization for AppProtoEquals
Victor Julien [Wed, 27 Dec 2023 16:01:18 +0000 (17:01 +0100)] 
app-layer: micro optimization for AppProtoEquals

Add most common condition first.

18 months agodetect/bsize: constify keyword args during size check
Victor Julien [Fri, 22 Dec 2023 09:51:24 +0000 (10:51 +0100)] 
detect/bsize: constify keyword args during size check

18 months agodetect/content: limits prop comment cleanup
Victor Julien [Fri, 22 Dec 2023 07:43:46 +0000 (08:43 +0100)] 
detect/content: limits prop comment cleanup

18 months agodetect/dsize: minor code cleanup
Victor Julien [Fri, 22 Dec 2023 07:31:22 +0000 (08:31 +0100)] 
detect/dsize: minor code cleanup

18 months agodetect: use do { } while loop for app engine loop
Victor Julien [Thu, 21 Dec 2023 10:35:22 +0000 (11:35 +0100)] 
detect: use do { } while loop for app engine loop

18 months agodetect/content: fix offset for negative distance
Victor Julien [Wed, 20 Dec 2023 20:40:47 +0000 (21:40 +0100)] 
detect/content: fix offset for negative distance

Fix offset calculation on sigs with negative distance. Can lead to FN
in certain cases.

Bug: #6661.

18 months agodetect/content-inspect: add more tests
Victor Julien [Fri, 6 Oct 2023 10:52:54 +0000 (12:52 +0200)] 
detect/content-inspect: add more tests

18 months agospm/bm: minor code cleanups; constification
Victor Julien [Wed, 20 Dec 2023 13:38:01 +0000 (14:38 +0100)] 
spm/bm: minor code cleanups; constification

18 months agompm: UNITTESTS guard for RegisterUnittests func
Victor Julien [Tue, 19 Dec 2023 10:31:48 +0000 (11:31 +0100)] 
mpm: UNITTESTS guard for RegisterUnittests func

18 months agompm: remove unused flags field
Victor Julien [Tue, 19 Dec 2023 10:11:10 +0000 (11:11 +0100)] 
mpm: remove unused flags field

18 months agodetect/http_server_body: modernize test
Victor Julien [Tue, 19 Dec 2023 13:41:21 +0000 (14:41 +0100)] 
detect/http_server_body: modernize test

18 months agodetect: implement --qa-skip-prefilter
Victor Julien [Sun, 17 Dec 2023 09:24:56 +0000 (10:24 +0100)] 
detect: implement --qa-skip-prefilter

Option meant for testing performance of rule engine w/o prefilter
optimizations.

18 months agodetect/content-inspect: add negation tests
Victor Julien [Tue, 19 Dec 2023 06:52:45 +0000 (07:52 +0100)] 
detect/content-inspect: add negation tests

Test mixing of negation, endswith and depth.

18 months agodetect/bytetest: remove unused Match function
Victor Julien [Sun, 17 Dec 2023 18:54:43 +0000 (19:54 +0100)] 
detect/bytetest: remove unused Match function

All matching is done as part of content inspection.

18 months agodetect/pcre: remove unused match member
Victor Julien [Mon, 18 Dec 2023 10:29:01 +0000 (11:29 +0100)] 
detect/pcre: remove unused match member

pcre2_match_data is created per thread when needed.

18 months agodetect/bytemath: fix u32 buffer size logic
Victor Julien [Mon, 18 Dec 2023 07:04:52 +0000 (08:04 +0100)] 
detect/bytemath: fix u32 buffer size logic

Remove u16 cast. Remove debug assert for u16 size.

In 83ed2c3b97925d390c2a57fdc8eea52f7d3d2e4c the input was changed to
u32

18 months agodetect/pcre: localize match limit option parsing
Victor Julien [Wed, 20 Dec 2023 08:42:53 +0000 (09:42 +0100)] 
detect/pcre: localize match limit option parsing

No need to put it into a per ctx flag.

18 months agodetect/pcre: remove unused opts field
Victor Julien [Wed, 20 Dec 2023 08:33:20 +0000 (09:33 +0100)] 
detect/pcre: remove unused opts field

18 months agodetect/pcre: put commonly used members on first cache line
Victor Julien [Sun, 17 Dec 2023 20:55:42 +0000 (21:55 +0100)] 
detect/pcre: put commonly used members on first cache line

18 months agodetect/content-inspect: use of replace keyword is rare
Victor Julien [Sun, 17 Dec 2023 17:02:35 +0000 (18:02 +0100)] 
detect/content-inspect: use of replace keyword is rare

Hint compiler about this.

18 months agodetect/profiling: improve pcap reading performance
Victor Julien [Sat, 16 Dec 2023 15:45:00 +0000 (16:45 +0100)] 
detect/profiling: improve pcap reading performance

When reading a pcap, packet time can move much faster than wall
clock time. This would trigger many more profile syncs than before.

As the sync is using a lock to synchronize with other threads, this
is an expensive operation.

Bug: #6619.

Fixes: b591813b8690 ("profiling/rules: reduce sync logic scope")
18 months agopgsql: fix u16 overflow in query data_row
Juliana Fajardini [Wed, 11 Oct 2023 20:24:45 +0000 (17:24 -0300)] 
pgsql: fix u16 overflow in query data_row

Found by oss-fuzz with quadfuzz.

Cf https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=63113

According to PostgreSQL documentation the maximum number of rows can be
the maximum of tuples that can fit onto max u32 pages - 4,294,967,295 (cf
https://www.postgresql.org/docs/current/limits.html). Some rough
calculations for that indicate that this could go over max u32, so
updating the data_row data type to u64.

Bug #6389

18 months agodoc: fix byte_test examples
Philippe Antoine [Wed, 6 Dec 2023 19:32:50 +0000 (20:32 +0100)] 
doc: fix byte_test examples

As this keyword has 4 mandatory arguments, and some examples
had only three...

Ticket: 6629

19 months agodevguide: explain example-rule container usage 10115/head
Juliana Fajardini [Thu, 30 Nov 2023 15:16:27 +0000 (12:16 -0300)] 
devguide: explain example-rule container usage

Have these options documented, so that whoever writes rule-related
documentation can easily know what they could use to make the doc look
better.

19 months agodetect: case-insensitive comparison for requires
Philippe Antoine [Thu, 4 Jan 2024 10:42:55 +0000 (11:42 +0100)] 
detect: case-insensitive comparison for requires

Ticket: 6656

19 months agorust: allow clippy::items_after_test_module
Philippe Antoine [Thu, 4 Jan 2024 08:51:33 +0000 (09:51 +0100)] 
rust: allow clippy::items_after_test_module

As clippy began to complain about jsonbuilder.rs

19 months agodevguide: fix main channels list
Juliana Fajardini [Fri, 24 Nov 2023 14:46:41 +0000 (11:46 -0300)] 
devguide: fix main channels list

Sphinx and RtD sometimes render lists in weird ways. The communication
channels list barely looked like one, at all...

19 months agodevguide: update branches, refer to backports guide
Juliana Fajardini [Fri, 24 Nov 2023 13:07:05 +0000 (10:07 -0300)] 
devguide: update branches, refer to backports guide

Update the list of active branches to include 7 renaming and new master,
link to backports document.

19 months agodevguide: add chapter with backports guide
Juliana Fajardini [Wed, 22 Nov 2023 17:56:56 +0000 (14:56 -0300)] 
devguide: add chapter with backports guide

Task #6568

19 months agodevguide: doc from behavior changes needs ticket #
Juliana Fajardini [Fri, 24 Nov 2023 11:29:06 +0000 (08:29 -0300)] 
devguide: doc from behavior changes needs ticket #

If a commit introduces code that changes Suricata behavior, the related
documentation changes should go in a separate commit, but refer to the
same ticket number.
This reduces the chances of said changes being lost if there are backports
while still keeping the backporting process a bit less bulky, for each
commit.

Related to
Task #6568

19 months agodevguide: reorganize pr-workflow section
Juliana Fajardini [Wed, 22 Nov 2023 15:52:59 +0000 (12:52 -0300)] 
devguide: reorganize pr-workflow section

This section seemed to aim both at PR reviewers and PR authors at the
same time, even though some info is probably of low value for
contributors.

Created new section for PR reviewers and maintainers, and kept the info
for PR authors separated. Also highlighted information on requested
changes and stale PRs.

19 months agodevguide: make 'contributing' a chapter
Juliana Fajardini [Wed, 22 Nov 2023 17:03:27 +0000 (14:03 -0300)] 
devguide: make 'contributing' a chapter

This could be justified from a semantic point of view, and also can help
in bringing more attention to where this information is, as it is less
hidden, now.

Also add Dev Guide as one of our resources in our Readme.

19 months agomqtt: Move conf code to rust 10100/head
Jeff Lucovsky [Thu, 21 Dec 2023 14:41:29 +0000 (09:41 -0500)] 
mqtt: Move conf code to rust

Issue: 6387

This commit moves the configuration logic to Rust.

19 months agostats: add rules skipped 10078/head
Jason Ish [Tue, 19 Dec 2023 18:13:23 +0000 (12:13 -0600)] 
stats: add rules skipped

Rule skipped is a count of the number of rules that are skipped due to
missing requirements.

Feature: #6637

19 months agorust.h: don't include util-file.h, not needed 10076/head
Jason Ish [Thu, 14 Dec 2023 18:32:59 +0000 (12:32 -0600)] 
rust.h: don't include util-file.h, not needed

19 months agodetect-parse: parse sid in pre-scan
Jason Ish [Wed, 29 Nov 2023 18:57:23 +0000 (12:57 -0600)] 
detect-parse: parse sid in pre-scan

During the pre-scan for "requires", also parse the SID if possible. If
the rule fails high level parsing (syntax), the SID will not be
parsed.

But every keyword other than "sid" and "requires" should expect to be
provided with a parsed sid.

19 months agorequires: pre-scan rule for requires expressions
Jason Ish [Wed, 29 Nov 2023 16:54:54 +0000 (10:54 -0600)] 
requires: pre-scan rule for requires expressions

Add a "pre-scan" rule parse that will check for requires statement. It
will return a special error code (-4) if the requires fails due to
missing requirements.

Syntactic errors will also abort parsing here.

Feature: #5972

19 months agorequires: add requires keyword
Jason Ish [Tue, 28 Nov 2023 21:35:09 +0000 (15:35 -0600)] 
requires: add requires keyword

Add a new rule keyword "requires" that allows a rule to require specific
Suricata versions and/or Suricata features to be enabled.

Example:

  requires: feature geoip, version >= 7.0.0, version < 8;
  requires: version >= 7.0.3 < 8
  requires: version >= 7.0.3 < 8 | >= 8.0.3

Feature: #5972

Co-authored-by: Philippe Antoine <pantoine@oisf.net>
19 months agofeature: provide a Rust binding to the feature API
Jason Ish [Fri, 15 Dec 2023 00:19:41 +0000 (18:19 -0600)] 
feature: provide a Rust binding to the feature API

As the feature module is not available for Rust unit tests, a mock
version is also provided.

19 months agopgsql: remove unused msg field
Juliana Fajardini [Fri, 15 Dec 2023 16:57:01 +0000 (13:57 -0300)] 
pgsql: remove unused msg field

The `ConsolidatedDataRow` struct had a `length` field that wasn't truly
used.

Related to
Bug #6389

19 months agostats: incr app-proto flow counter for detection-only
Philippe Antoine [Thu, 14 Dec 2023 10:31:37 +0000 (11:31 +0100)] 
stats: incr app-proto flow counter for detection-only

Ticket: 6633

19 months agoschema: adds missing modbus field
Philippe Antoine [Mon, 11 Sep 2023 07:51:24 +0000 (09:51 +0200)] 
schema: adds missing modbus field

./stats/app_layer/error/modbus

19 months agostats: always use tcp/udp prefix
Philippe Antoine [Mon, 20 Nov 2023 13:54:45 +0000 (14:54 +0100)] 
stats: always use tcp/udp prefix

Even when on detection-only mode.
So that we always have enip_tcp and enip_udp in stats
and never just `enip`.

Ticket: 6304

19 months agoschema: apply clang formatting changes 10061/head
Juliana Fajardini [Mon, 11 Dec 2023 20:10:54 +0000 (17:10 -0300)] 
schema: apply clang formatting changes

19 months agouserguide/eve: explain pgsql requests & responses
Juliana Fajardini [Mon, 11 Dec 2023 20:55:37 +0000 (17:55 -0300)] 
userguide/eve: explain pgsql requests & responses

Add a more visible explanation of that requests, responses, frontend and
and backend are, in Pgsql context, to avoid having to repeat that over
different portions of the docs.

19 months agopgsql: add cancel request message
Juliana Fajardini [Mon, 11 Dec 2023 20:10:13 +0000 (17:10 -0300)] 
pgsql: add cancel request message

A CanceldRequest can occur after any query request, and is sent over a
new connection, leading to a new flow. It won't take any reply, but, if
processed by the backend, will lead to an ErrorResponse.

Task #6577

19 months agodoc/eve-format: break pgsql section to char limit
Juliana Fajardini [Mon, 11 Dec 2023 20:26:31 +0000 (17:26 -0300)] 
doc/eve-format: break pgsql section to char limit

19 months agopgsql: extract length validation into function
Juliana Fajardini [Thu, 30 Nov 2023 21:55:13 +0000 (18:55 -0300)] 
pgsql: extract length validation into function

This is called so many times that it seems to make sense that we use a
function for this.

19 months agodetect/byte: remove unneeded SIG_FLAG_APPLAYER sets 10052/head
Victor Julien [Wed, 13 Dec 2023 07:45:06 +0000 (08:45 +0100)] 
detect/byte: remove unneeded SIG_FLAG_APPLAYER sets

Flag will be set during list(s) setup if needed.

19 months agodetect/byte_extract: modernize tests
Victor Julien [Tue, 12 Dec 2023 13:54:41 +0000 (14:54 +0100)] 
detect/byte_extract: modernize tests

19 months agodetect/bytemath: bump length to uint32_t
Victor Julien [Thu, 7 Dec 2023 16:07:04 +0000 (17:07 +0100)] 
detect/bytemath: bump length to uint32_t

This puts the logic in line with the other payload inspection
functions.

19 months agodetect/bytejump: test cleanup
Victor Julien [Fri, 8 Dec 2023 11:45:06 +0000 (12:45 +0100)] 
detect/bytejump: test cleanup

Just one used during debugging.

19 months agodetect/bytejump: don't reuse content flag
Victor Julien [Fri, 8 Dec 2023 08:38:38 +0000 (09:38 +0100)] 
detect/bytejump: don't reuse content flag

To avoid future problems with overlapping flag values, give bytejump
its own DETECT_BYTEJUMP_OFFSET_VAR flag.

The values are currently not overlapping, so this patch should have
no side effects.

19 months agodetect/analyzer: print int keyword values correctly
Victor Julien [Fri, 8 Dec 2023 09:31:21 +0000 (10:31 +0100)] 
detect/analyzer: print int keyword values correctly

To avoid negative values to be misrepresented.

Bug: #6615.

19 months agojsonbuilder: add set_int for signed ints
Victor Julien [Fri, 8 Dec 2023 09:30:25 +0000 (10:30 +0100)] 
jsonbuilder: add set_int for signed ints

Bug: #6615

19 months agoeve/stream: add sb main region size; segment count
Victor Julien [Thu, 28 Sep 2023 12:41:20 +0000 (14:41 +0200)] 
eve/stream: add sb main region size; segment count

Gives more detail about memory use.

19 months agooutput-json-dns: remove un-needed includes 10047/head
Jason Ish [Sun, 12 Nov 2023 13:46:07 +0000 (08:46 -0500)] 
output-json-dns: remove un-needed includes

19 months agooutput-json-alert: remove un-needed includes
Jason Ish [Sun, 12 Nov 2023 13:03:25 +0000 (14:03 +0100)] 
output-json-alert: remove un-needed includes

19 months agodoc/userguide: document dns.query.name, dns.answer.name
Jason Ish [Wed, 15 Nov 2023 18:11:51 +0000 (12:11 -0600)] 
doc/userguide: document dns.query.name, dns.answer.name

With some other minor cleanups in the DNS keyword section.

19 months agodns: replace usage of rs_dns_tx_get_query_name with SCDnsTxGetQueryName
Jason Ish [Wed, 15 Nov 2023 18:31:12 +0000 (12:31 -0600)] 
dns: replace usage of rs_dns_tx_get_query_name with SCDnsTxGetQueryName

SCDnsTxGetQueryName was introduced to allow for getting the query name
in responses as well as requests, so covers the functionality of
rs_dns_tx_get_query_name.

19 months agodns: add dns.query.name sticky buffer
Jason Ish [Tue, 14 Nov 2023 23:01:49 +0000 (17:01 -0600)] 
dns: add dns.query.name sticky buffer

This buffer is much like dns.query_name but allows for detection in both
directions.

Feature: #6497

19 months agodns: add dns.answer.name keyword
Jason Ish [Mon, 23 Oct 2023 21:28:40 +0000 (15:28 -0600)] 
dns: add dns.answer.name keyword

This sticky buffer will allow content matching on the answer names.
While ansers typically only occur in DNS responses, we allow the buffer
to be used in request context as well as the request message format
allows it.

Feature: #6496

19 months agodns: consolidate DNSRequest and DNSResponse to DNSMessage
Jason Ish [Wed, 15 Nov 2023 21:58:36 +0000 (15:58 -0600)] 
dns: consolidate DNSRequest and DNSResponse to DNSMessage

DNS request and response messages follow the same format so there is
no reason not to use the same data structure for each. While its
unlikely to see fields like answers in a request, the message format
does not disallow them, so it might be interesting data to have the
ability to log.

19 months agodns: rustfmt with latest stable
Jason Ish [Thu, 16 Nov 2023 15:44:07 +0000 (09:44 -0600)] 
dns: rustfmt with latest stable

19 months agorustfmt: replace deprecated fn_args_layout with fn_params_layout
Jason Ish [Thu, 16 Nov 2023 15:43:33 +0000 (09:43 -0600)] 
rustfmt: replace deprecated fn_args_layout with fn_params_layout