Commit Graph

16817 Commits (0dc5b72c89d51add645e642ef04f9f436de70b64)
 

Author SHA1 Message Date
Jason Ish 0dc5b72c89 github-ci: skip rpm builds for now
RPMs will need to be fixed after merge.
2 days ago
Jason Ish 1dcb1e3f29 github-ci: add var to disable rpm builds
There will be changes in our development branch that the RPMs need to
adapt to, but that can't be done until the changes have been merged to
master, then the RPM can catchup.

This gives us a single variable to turn off RPM building.
2 days ago
Jason Ish f1d305b373 doc: add upgrade note about suricatasc and suricatactl 2 days ago
Jason Ish 1aa47649ca dist: include generate-evedoc.sh
Without this script `make distcheck` fails on a system with
documentation tooling installed, as its required to build the EVE
appendix.
2 days ago
Jason Ish 357822c68c github-ci: add check for update to date Cargo.lock.in
After a build, check if Cargo.lock.in and Cargo.lock differ, if so,
Cargo.lock.in needs an update as part of a depedency update.
2 days ago
Jason Ish 11a589f633 doc: remove python references related to suricatasc
These should probably be removed even without the rewrite, and
suricatasc has been installed as a proper program for many releases.
2 days ago
Jason Ish fc2824a9f7 qa: fix suricatasc path 2 days ago
Jason Ish a0089190df python: remove python implementation of suricatasc/suricatactl 2 days ago
Jason Ish 8fa347410e suricatactl: rust version of suricatactl 2 days ago
Jason Ish 7e4de3d1b9 github-ci: do one Windows build from dist archive
As we have 2 Windows builds, do one using the release-style
distribution file.
2 days ago
Jason Ish 8115669602 suricatasc: a Rust implementation of suricatasc
This is a re-implementation of suricatasc program in Rust that
attempts to be a 100% drop-in replacement.
2 days ago
Jason Ish c33bebd630 rust: remove allow of static mutables
As references to static mutables are highly discouraged, remove the
global suppressing of the compiler warning. Each use case can be
suppressed as needed.

Ticket: #7417
2 days ago
Jason Ish 4a2f10d235 smb: wrap read access to static mutables in function
Simply wrapping in a function removes static_mut_refs compiler
warning.

Ticket: #7417
2 days ago
Jason Ish d8c080b268 smtp: suppress static_mut_refs where needed
Allows us to get rid of the global supression.

Ticket: #7417
2 days ago
Jason Ish 9ed5b4c002 smtp: remove SCMimeSmtpConfigExtractUrlsSchemeReset
It doesn't appear to be needed. The vec being cleared is only set once
per run, so never needs to be cleared.

Removes one point where we have to supress the static_mut_refs compiler
warning.

Ticket: #7417
2 days ago
Philippe Antoine 97ee95c1a2 dns: move unit tests to suricata-verify
Ticket: 3725
Ticket: 7529
3 days ago
Jeff Lucovsky 49d4686144 main/flush: Support periodic flush logs
Issue: 3449
3 days ago
Jeff Lucovsky 36111450ac detect/flag: Pseudo pkt "flush log" flag
Issue: 3449

Add a flush directive to the packet that is distinct from the existing
"log flush" flag as the new flag is to distinguish between the 2 use
cases.
3 days ago
Jeff Lucovsky b18622554d output/log: Add flushing infrastructure
Issue: 3449

Add flushing functions and infrastructure. This includes:
- Flushing functions for packet loggers
- Log file flushing support
3 days ago
Jeff Lucovsky 04767f69fc output: Support buffer-size value
Issue: 3449
3 days ago
Jeff Lucovsky a3a3ad8968 doc/output: EVE output buffering related settings 3 days ago
Jeff Lucovsky 92b2aebe75 conf/output: Buffering related config settings
This commit adds 2 EVE output buffering settings
- buffer-size value which specifies the amount of buffering, if any,
  for regular/file output types.
- flush-interval Specifies the cadence at which Suricata will direct
  detect threads to flush EVE output.

Issue: 3449
3 days ago
Jeff Lucovsky 7621029507 output/log: Add flush function, collapse params
Issue: 3449

Add a flush function to packet logger registration and collapse the
parameter count for registration functions.
3 days ago
Philippe Antoine 80dbaac206 flow: remove unused definition
Fixes: 3f3964555e ("detect/iponly: use flow first flags")
3 days ago
Victor Julien e1446c30fa detect/alert: optimize no-alert path
Skip qsort call if no alerts are queued. Move logic into inline helper func.
3 days ago
Victor Julien 98423a0009 detect: constify arguments 3 days ago
Victor Julien 39b030b791 detect/tx: improve branch prediction 3 days ago
Victor Julien 1000b0cf33 app-layer: optimize pstate check
To assist branch prediction, which showed a 100% miss rate, assume pstate
is non-NULL. Code review suggests all paths leading to the function actually
check pstate first, or alstate which can only be non-NULL if pstate was first
initialized. For now add a debug check.
3 days ago
Victor Julien 99eda1504a threads/flow: assist branch prediction 3 days ago
Victor Julien f876baab6b detect/pmq: assist branch prediction 3 days ago
Jeff Lucovsky dd344bd07c ftp: Move config file handling to Rust
Issue: 4082

Move the configuration file handling to Rust.

These changes will no longer terminate Suricata when there's an invalid
value for ftp.memcap. Like earlier Suricata releases, an error message
is logged "Invalid value <value> for ftp.memcap" but Suricata will no
longer terminate execution. It will use a default value of "0" instead.
3 days ago
Jeff Lucovsky f0410c93d0 ftp: convert enumerations to Rust
As part of the effort to convert the FTP/FTPDATA parser to rust, move
the enums from C to rust.

Issue: 4082
3 days ago
Philippe Antoine 8c3bd3e8a0 dcerpc: consume bytes after gap resync
Ticket: 7567

After a gap, we search a new record that may start later than
the beginning of current stream slice.
If so, consume the first bytes before the start of the record,
so that AppLayerResult::incomplete can be consistent and not
trigger assertion !((res.needed + res.consumed < input_len))
3 days ago
Philippe Antoine 3bc2a14fbf rust: fix clippy 1.85 precedence warnings
warning: operator precedence can trip the unwary
   --> src/jsonbuilder.rs:781:36
    |
781 |                 buf[offset] = HEX[(x >> 4 & 0xf) as usize];
    |                                    ^^^^^^^^^^^^ help: consider parenthesizing your expression: `(x >> 4) & 0xf`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
    = note: `#[warn(clippy::precedence)]` on by default
1 week ago
Philippe Antoine 726de5520f quic: discard late retry packets
Ticket: 7556

See RFC 9000 section 17.2.5.2 :
After the client has received and processed an Initial
or Retry packet from the server,
it MUST discard any subsequent Retry packets that it receives.
1 week ago
Jeff Lucovsky e45204aecf detect/transform: Refactor setup/apply pattern
git grep -A 1 -w InspectionBufferSetup shows many cases of the following
call patterns:
    - InspectionBufferSetup
    - InspectionBufferApplyTransforms

Refactor the implementations of those functions into
InspectionBufferSetupAndApplyTransforms to reduce function call count.

Issue: 2290 (related to changed for this issue)
1 week ago
Shivani Bhardwaj a551674eae dcerpc: add iface to dcerpc request event
so as to avoid extra steps for correlation among events to find
this information.

Feature 7565
1 week ago
Jason Ish 4cdb879538 rust/bindgen: use temp file to generating bindings
Prefixing a file with sed doesn't appear to be portable. Instead, make
use of a temporary file.

Fixes generating the bindings on FreeBSD and Mac.
1 week ago
Alice Akaki 73ae6e997f detect: add ldap.responses.dn
ldap.responses.dn matches on LDAPDN from responses operations
This keyword maps the following eve fields:
ldap.responses[].search_result_entry.base_object
ldap.responses[].bind_response.matched_dn
ldap.responses[].search_result_done.matched_dn
ldap.responses[].modify_response.matched_dn
ldap.responses[].add_response.matched_dn
ldap.responses[].del_response.matched_dn
ldap.responses[].mod_dn_response.matched_dn
ldap.responses[].compare_response.matched_dn
ldap.responses[].extended_response.matched_dn
It is a sticky buffer
Supports prefiltering

Ticket: #7471
1 week ago
Alice Akaki 16dcee46fc detect: add ldap.request.dn
ldap.request.dn matches on LDAPDN from request operations
This keyword maps the following eve fields:
ldap.request.bind_request.name
ldap.request.add_request.entry
ldap.request.search_request.base_object
ldap.request.modify_request.object
ldap.request.del_request.dn
ldap.request.mod_dn_request.entry
ldap.request.compare_request.entry
It is a sticky buffer
Supports prefiltering

Ticket: #7471
1 week ago
Alice Akaki 8f807fcfcf doc: use the ldap protocol in rule examples in the LDAP keywords documentation 1 week ago
Alice Akaki 31ee18b5be doc: replace 'eve' with 'EVE' in the LDAP keywords documentation 1 week ago
Alice Akaki 7b350e9933 misc: fix name prefix in detect register functions 1 week ago
Philippe Antoine 359f736542 util: fix -Wshorten-64-to-32 warnings
Ticket: #6186
1 week ago
Philippe Antoine d61f36c66f quic: decrypt only initial packets
Ticket: 7556

Avoids failed_decrypt events when the first packet seen is not
a Quic Initial packet
1 week ago
Philippe Antoine 6d8910d245 quic: handle retry packets
Ticket: 7556
1 week ago
Philippe Antoine f295cc059d quic: handle fragmented hello over multiple packets
Ticket: 7556

To do so, we need to add 2 buffers (one for each direction)
to the QuicState structure, so that on parsing the second packet
with hello/crypto fragment, we still have the data of the first
hello/crypto fragment.

Use a hardcoded limit so that these buffers cannot grow indefinitely
and set an event when reaching the limit
1 week ago
Philippe Antoine 68adc87bd2 quic: parse ack frame number 3
cf rfc9000 section 19.3. ACK Frames

Ticket: 7556
1 week ago
Philippe Antoine ee04d667b5 quic: move all_consuming check to callee
Will alow to have decode_frames accept one additional parameter
with past fragment data
1 week ago
Philippe Antoine 294a33a890 quic: rustfmt 1 week ago