Commit Graph

12932 Commits (c587e90ebccfe8883ea951e723be461dc58dcc06)

Author SHA1 Message Date
Victor Julien 5bb2132bb8 time: add SCTIME_CMP_EQ 10 months ago
Victor Julien f0c4f9d64b util/hash-string: fix compile warning
Clang 19:

util-hash-string.c:41:16: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
   41 |     int len1 = strlen((char *)data1);
      |         ~~~~   ^~~~~~~~~~~~~~~~~~~~~
util-hash-string.c:42:16: error: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Werror,-Wshorten-64-to-32]
   42 |     int len2 = strlen((char *)data2);
      |         ~~~~   ^~~~~~~~~~~~~~~~~~~~~
2 errors generated.
10 months ago
Victor Julien 270e19191b time: add gettimeofday wrapper for SCTime_t 10 months ago
Victor Julien bdc0df8454 time: remove unused function
It tripped up cppcheck:

src/util-time.h:124:35: error: syntax error [syntaxError]
    return !timercmp(first, second, >);
10 months ago
Victor Julien 3f85addaac stream: track pcap log segments timestamp with SCTime_t
This is a more compact time format.
10 months ago
Jason Ish a739d7623b eve/tls: don't construct const from other const
Some compiler/platform combinations don't like creating one const from
another as it can't guarantee the other is defined, resulting in the
following compile error:

output-json-tls.c:102:5: error: initializer element is not constant
     BASIC_FIELDS |
     ^~~~~~~~~~~~

Fixes commit 377989df6c
10 months ago
Adam Kiripolsky 175e690222 dpdk/hw_offload: add support for vlan stripping
Utilize DPDK API for hardware vlan stripping if supported by NIC.

Ticket: 7330
10 months ago
Nancy Enos e22c2a2332 applayer/htp: convert to new FAIL/PASS API
Ticket: #6935
10 months ago
Jason Ish d4a3ee163d misc: remove unneeded headers
Remove unneeded headers from worked on in previous commits, just
simple ones flagged by clangd.
10 months ago
Jason Ish ab6dcb3fc1 app-layer: use uint8_t consistent for event IDs
Introduce a common function for mapping names to IDs that performs
bounds checking.

Note: For event IDs in the enum that are larger than a uint8_t, -1
will be returned instead of -4. -4 has special meaning during
signature parsin that means requirements were not met. -4 has no
special handling prior to requirements, or the meaning has been lost.
10 months ago
Alice Akaki 5e563b0c8b detect/analyzer: add more details for flow_age
Ticket: #6312
10 months ago
Sascha Steinbiss 285cc29ec0 redis: add automatic trimming support for streams 10 months ago
Sascha Steinbiss d3d9f1c395 redis: implement XADD stream support
Ticket: #7082
10 months ago
Jason Ish 30806ce2b7 eve/tls: use BIT_U64 for flags
Minor cleanup.
10 months ago
Jason Ish 2462d9d4cf eve/tls: remove unused SC_ATOMIC_EXTERN 10 months ago
Jason Ish 714ada136c eve/tls: cleanup headers; update copyright year 10 months ago
Jason Ish 377989df6c eve/tls: reimplement basic and extended logging in terms of custom
Will prevent custom logging options getting out of sync with whats
available in extended.

Ticket: #7333
10 months ago
Jason Ish 2e788408c0 eve/tls: remove broken check for ja3 being enabled
During EVE TLS setup, a broken check for Ja3 being enabled led to Ja3
being disabled, but only in custom mode. This check is not needed, if
Ja3 is disabled, it won't be available, and won't be logged.

This is required to implement "extended" in terms of "custom" fields.
10 months ago
Jason Ish 6a185a8f96 eve/tls: add alpn logging to custom output
Adds custom fields "client_alpns" and "server_alpns".

Ticket: #7333
10 months ago
Jason Ish 3ddd9e2512 eve/tls: disable clang formatting around tls_fields array 10 months ago
Jeff Lucovsky 799822c3db profiling: Correct profiling data array size
The profiling arrays are incorrectly sized by the number of thread
modules. Since they contain app-layer protocol data, they should be
sized by ALPROTO_MAX.
10 months ago
Juliana Fajardini 69fe5121a1 tls: fix duplicate EVE field (issuerdn)
Wrong function call caused `issuerdn` to be logged when
`subjectaltname` was enabled, for custom logging, only.

Bug #7332
10 months ago
Shivani Bhardwaj 37fa2a6775 detect: rename port whitelisting to priority
This was done following the fact that this setting was historically
named incorrectly. The purpose of the setting was always to define the
ports that will be prioritized and have rule groups associated w them on
priority. Rename all occurences of this to correctly reflect the purpose
of the setting.
10 months ago
Shivani Bhardwaj abbdeed931 detect/engine: rename fn, add comments 10 months ago
Shivani Bhardwaj f8a5c91448 detect/proto: use BIT macros instead of expr 10 months ago
Shivani Bhardwaj 86c1e458f9 detect/engine: use combined flags for TCP 10 months ago
Alice Akaki fa1addae64 detect/analyzer: add more details for icmp_id
Ticket: #6360
10 months ago
Philippe Antoine 378f678d95 fuzz/detect: forbid rule with pcre only on stream
to avoid fuzzing blocks on timeouts with known bad rules

Ticket: 4858
10 months ago
Philippe Antoine 81f7ef89c4 stream: fix -Wshorten-64-to-32 warnings
Ticket: #6186
10 months ago
Philippe Antoine 58f7af8a31 output: fix -Wshorten-64-to-32 warnings
Ticket: #6186
10 months ago
Jason Ish 15c4eb3d16 threads: move wait for unpause outside of loop
Threads are only set to paused upon initialization and never again, we
should only have to wait once, so move the wait before any loop that
was waiting before.

Additionally, if the thread was killed while waiting to be unpaused,
don't enter the loop.
10 months ago
Jason Ish 7492fb6a91 threads: merge unpause test into wait for pause function
TmThreadTestThreadUnPaused was only being used by
TmThreadsWaitForUnpause and is still enough to just become one
function.
10 months ago
Jason Ish 3f8c3698db threads: helper function TmThreadsWaitForUnpause
The pattern of checking the pause flag, setting to paused then
waiting to unpause was done enough times to factor out into its own
function. This is also needed by library users who bring their own
packet acquisition threads.
10 months ago
Philippe Antoine 96c8470cdd template: move detect keywords to pure rust
Ticket: 3195

Also remove unused src/tests/detect-template-buffer.c

Completes commit 4a7567b3f0
to remove references to template-rust
10 months ago
Zemeteri Kamimizu 87e6e9374f conf: init parser after check with stat()
Commit changes are made to avoid possible memory leaks. If the parser
is initialized before configuration file checking, there was no deinit
call before function return. Do check config file existance and type
before YAML parser initialization, so we don't need to deinit parser
before exiting the function.

Bug: #7302
10 months ago
Jeff Lucovsky d32b28c85e napatech: bring back command line argument
Re-introduce support for command line argument "--napatech"

Issue: 7165
10 months ago
Jeff Lucovsky 330c408930 napatech: remove, to make room for plugin
Issue: 7166
10 months ago
Philippe Antoine 58556b7f8b template: remove -rust references
Ticket: 7315

Completes commit 4a7567b3f0

Allows keyword template.buffer to work properly when template
protocol is enabled
10 months ago
Jeff Lucovsky c9e4524b3c misc: Eliminate compiler warnings
Issue: 7314

Fixup macro usages to eliminate compiler warnings.
10 months ago
Philippe Antoine 76527dde79 http: fix condition check
Ticket: 7309

Do not use a constant expression in a condition
10 months ago
Alice Akaki d5dd549bcd detect/address: convert ipv4 unittests to FAIL/PASS
Ticket: OISF#6318
10 months ago
Philippe Antoine 40e97423b4 transform/base64: check for 0-sized buffer
So as to avoid undefined behavior with a 0-sized variable length
array

Ticket: #7296
10 months ago
Zemeteri Kamimizu adcac9ee0f detect: add new_de_ctx release in case of errors in initialization
Detect engine tenant reloading function hasn't got engine release call
under error label, so it is possible memory leak in case of errors in
further new detect engine initialization.

Bug: #7303
10 months ago
Jason Ish d8f73c9215 tm-modules: minor code cleanups
- includes
- loops
10 months ago
Jason Ish 415c5786de threading: remove TM_FLAG_LOGAPI_TM as its not used
This flag is never set, remove.
10 months ago
Shivani Bhardwaj 501f79c0ed detect/engine: deduplicate fn definitions 10 months ago
Alexey Simakov c72404e554 yaml: Add check of allocation for node object
Fix potential dereference of nullptr in case
of unsuccessful allocation of memory for
list node

Bug: #7270
10 months ago
Jason Ish 3b6f709331 threads: don't drop capabilities for packet threads
Remove the call to SCDropCaps for packet processing threads. This
logic in this function is required to setup packet processing even
when the thread is provided by a library user, in which case Suricata
should not be touching is capabilities.

As SCDropCaps is currently a no-op its clear this feature needs to
be (re)designed properly, taking into consideration library users as
well.

Related ticket: https://redmine.openinfosecfoundation.org/issues/2375
10 months ago
Ilya Bakhtin 976dec7f33 detect: pseudo-packets inherit inspect flags from parent packet
Instead of inheriting from flow, because encrypted protocols like TLS
and SSH may have just set the flow flags to indicate rest of stream is
encrypted and does not need to run stream inspection. But inspection
still needs to be run detection on this last flushing packet.

Ticket: #7235.
11 months ago
Philippe Antoine 26da953f6d util/hash: use randomized hash algorithm
For datasets and http ranges

Ticket: 7209

Prevents abusive hash collisions from known djb2 algorithm
11 months ago
Philippe Antoine bb714c9178 http: have a headers limit
Ticket: 7191

So as to avoid quadratic complexity in libhtp.
Make the limit configurable from suricata.yaml,
and have an event when network traffic goes over the limit.
11 months ago
Philippe Antoine 9203656496 defrag: fix off by one
Ticket: 7067

This off by one could lead to an empty fragment being inserted
in the rb tree, which led to integer underflow
11 months ago
Victor Julien 45eb7e4881 stream: improve 3whs completed by ACK with data
If the ACK packet completing the 3whs is received, the stream engine will
transition to "established". However, the packet itself will not be tagged
as "established". This will only happen for the next packet after the 3whs,
so that `flow:established` only matches after the 3whs.

It is possible that the ACK packet completing the 3whs was lost. Since the
ACK packets themselves are not acknowledged, there will be no retransmission
of them. Instead, the next packet can have the expected ACK flag as well as
data.

This case was mishandled in a subtle way. The stream engine state transition
was done correctly, as well as the data handling and app-layer updates.
However, the packet itself was not tagged as "established", which meant
that `flow:established` would not yet match.

This patch detects this case and tags the packet as established if ACK
with data is received that completes the 3whs.

Bug: #7264.
11 months ago
Philippe Antoine c55c7d6c27 detect/dataset: abort only in debug mode
Ticket: 7195
11 months ago
Philippe Antoine e47598110a detect/datasets: implement unset command
Ticket: 7195

Otherwise, Suricata aborted on such a rule
11 months ago
Philippe Antoine 1352ed68c7 datasets: restrict scope of macro/enum 11 months ago
Philippe Antoine 1d32f11745 ssl/ja3: better check for ja3 being enabled
Ticket: 6634

Completes commit 84735251b5

Avoids error log in Ja3BufferAddValue about NULL buffer
11 months ago
Noah Liu 951bcff970 stream/reassembly: optimize GetBlock
Current GetBlock degrees the sbb search from rb tree to
line, which costs much cpu time, and could be replaced by
SBB_RB_FIND_INCLUSIVE. It reduces time complexity from
O(nlogn) to O(logn).

Ticket: 7208.
11 months ago
Shivani Bhardwaj 6ff0f72f4d detect/base64: minor cleanups
1. decode_len can be u32 as it stores min of two u32s.
2. Add defensive check for payload_len calculation underflow.
11 months ago
Shivani Bhardwaj 86eec116eb transform/base64: add explicit mode to test
Without any mode setting, the test would take up the mode to be 0 which
used to be the relax mode for base64 decoder in C. However, there was no
code corresponding to that mode and it was never used so nothing
happened when this test was run.

Add an explicit strict mode as per the expectation of the test from its
comments.
11 months ago
Shivani Bhardwaj cbb571a61c rust/base64: add decoder
Add a pure rust base64 decoder. This supports 3 modes of operation just
like the C decoder as follows.
1. RFC 2045
2. RFC 4648
3. Strict

One notable change is that "strict" mode is carried out by the rust
base64 crate instead of native Rust. This crate was already used for
encoding in a few places like datasets of string type. As a part of this
mode, now, only the strings that can be reliably converted back are
decoded.

The decoder fn is available to C via FFI.

Bug 6280
Ticket 7065
Ticket 7058
11 months ago
Giuseppe Longo 969f4d131f sip: rustify sticky buffers
Ticket #7204
11 months ago
Jeff Lucovsky 8f107c8252 detect: Clear errno before strtoul
Per the notes for strtoul, since 0 or ULONG_MAX is a legitimate return
value, errno must be cleared before the call so an error can be checked
after the call by testing errno.

Issue: 7126
11 months ago
Jeff Lucovsky a115acf208 smtp: Prevent error messages on packet path
Issue: 7126

This commit abandons the use of StringParseUint32 which generates an
error message of there are non-numeric characters.

The SMTP parser had used this function on the packet path; this commit
uses strtoul instead.

An example of the content causing the error message to be emitted:

    3460 LAST
11 months ago
Juliana Fajardini 2c7824a41f pgsql: use new API style for extern C functions 11 months ago
Victor Julien 51392a6af1 eve/flow: turn error into debug assertion
In case this hits logging an error is harmful, better to silently
continue.

Remove use of `default` to help the compiler flag new enum additions.
11 months ago
Victor Julien b3ed752cf1 eve/flow: log flow state directly
No need to first turn it into a flags field.
11 months ago
Philippe Antoine de9413c654 detect: safety for app-layer logging of stream-only rules
If a stream-only rule matches, and we find a tx where we
want to log the app-layer data, store into the tx data that
we already logged, so that we do not log again the app-layer metadata

Ticket: 7085
11 months ago
Jeff Lucovsky 51b742738c output/json: Remove unneeded parameters
Issue: 4974

Remove unused parameters in output path for
- AlertJsonMetadata
- AlertJsonHeader
11 months ago
Jeff Lucovsky 8064847fc6 doc: Document reference config setting
Issue: 4974
11 months ago
Jeff Lucovsky 9bc468e63a alert/reference: Optionally add reference(s)
Issue: 4974

Optionally include rule references with the alert. Since there can be
multiple reference keywords, they are collected into an array.
11 months ago
Philippe Antoine 31bed10ff6 runmode: fix coverity warning
CID 1619284:  Memory - illegal accesses  (OVERRUN)

In ParseAFXDPConfig, a pointer to bool is cast into a pointer
to int.

Also removing the cast pattern when useless
11 months ago
Philippe Antoine 89d229c76f frames: do not rely on FRAME_STREAM_ID
As it is not always the first frame to be created :
if it is not enabled, it does not get created, and other enabled
frames may be created first. see use of FrameConfigTypeIsEnabled

This resulted that this other frame got its length updated
on stream end, which led to false positives.

Resorting on FRAME_STREAM_TYPE is more consistent.

Ticket: 7213
11 months ago
Victor Julien 79aa4861e0 detect/app-layer-proto: don't run detection on ALPROTO_UNKNOWN
The `app-layer-protocol` keyword inconsistently checks whether the
alproto is ALPROTO_UNKNOWN. In the regular match function it isn't
checked, in the prefilter function its checked for all but the "either"
mode.

This leads to false positives for negated matching, as an expression
like "!tls" will match if checked against ALPROTO_UNKNOWN.

This patch adds the checking everywhere. The keyword returns no match as
long as the alproto is ALPROTO_UNKNOWN.

Bug: #7241.
11 months ago
Philippe Antoine 84735251b5 tls/ja3: do not append to ja3 str once ja3 hash is computed
Ticket: 6634

That means take only the first client hello into account.
This way, we do not end with ja3 string with 9 commas...
11 months ago
Jason Ish 685baa9680 output-filedata: rename and document registration function
Prefix registration function and pointer function type with SC, as
well as document.

Ticket: #7227
12 months ago
Jason Ish b51eeb3ab5 output-file: rename and document registration function
Rename OutputRegisterFileLogger to SCOutputRegisterFileLogger, add
function documentation and include in userguide.

Ticket: #7227
12 months ago
Jason Ish 14b648f286 output-streaming: rename and document registration
Prefix the registration function and types with "SC", and add function
documentation.

Ticket: #7227
12 months ago
Jason Ish cba8527f75 output-file: use void *initdata instead of OutputCtx
Avoids leaking a higher level abstraction into a low level logger.

Ticket: #7227
12 months ago
Jason Ish 80d395efbb output-filedata: use void *initdata instead of OutputCtx
Avoids leaking a higher level abstraction into a low level logger.

Ticket: #7227
12 months ago
Jason Ish c02e7099b7 output-streaming: use void *initdata instead of OutputCtx
Using OutputCtx leaks a higher level abstraction into the low level
logger.

Ticket: #7227
12 months ago
Jason Ish fe69dd972a output: remove remaining ThreadExitPrintStats callbacks
Not used in output modules.

Ticket: #7227
12 months ago
Jason Ish d88d8fc4f0 output-stats: remove ThreadExitPrintStats callback
Not used.

Ticket: #7227
12 months ago
Jason Ish 07d4d08665 output-streaming: remove ThreadExitPrintStats callback
Not used.

Ticket: #7227
12 months ago
Jason Ish a93bd8a387 output-filedata: remove ThreadExitPrintStats callback
Not used.

Ticket: #7227
12 months ago
Jason Ish 16125013db output-file: remove ThreadExitPrintStats callback
Not used.

Ticket: #7227
12 months ago
Jason Ish 1ebf33b3c9 output-tx: rename and document transaction logger registration
Rename OutputRegisterTxLogger to SCOutputRegisterTxLogger to make it
part of the public API as well as document.

Ticket: #7227
12 months ago
Jason Ish ee07855891 output-tx.h: include tm-threads.h
Required to properly resolve the types in the header without depending
on includes coming before it in C files.

Ticket: #7227
12 months ago
Jason Ish 7397b7a00f output-tx: remove ThreadExitPrintStats callback
After removing the exit stats function from log-tlslog, this callback
is no longer used.

Ticket: #7227
12 months ago
Jason Ish 0f7eac62f5 log-tlslog: remove unneeded includes
Ticket: #7227
12 months ago
Jason Ish 6e660bd9bc log-tlslog: remove ThreadExitPrintStats callback
Remove the ThreadExitPrintStats callback, this is the only logger that
was actually using it, and this logger is marked for deprecation. This
allows us to remove the callback from the registration signature.

Ticket: #7227
12 months ago
Jason Ish 594cca77ce tlsstore: remove ThreadExitPrintStats callback
Remove the callback to print stats on thread exit.  The counter value
was never being used and this helps us get rid of this callback
altogether as their is only one other usage of it.

Ticket: #7227
12 months ago
Jason Ish 32e2225b7d output-tx: use void * instead of OutputCtx
Using OutputCtx results in the low level output-tx packet logger being
aware of Suricata's higher level loggers that use OutputCtx, for the
low level logger this is purely opaque data that may not be an
OutputCtx for custom loggers.

Ticket: #7227
12 months ago
Jason Ish bb128e3959 devguide: more on low level logging
Use the extending/output section to introduce the low level logging
API.

Ticket: #7227
12 months ago
Jason Ish a2779ac916 output-flow: rename register function and document
Rename OutputRegisterFlowLogger to SCOutputRegisterFlowLogger and
document in the header file.

Mark other functions in the header file as part of the internal API.

Ticket: #7227
12 months ago
Jason Ish 7b4271c309 output-packet: rename register function and document
Rename OutputRegisterPacketLogger to SCOutputRegisterPacketLogger as
its part of the public API and document its parameters.

Comment on the other functions in the header that they are part of the
internal API.

Ticket: #7227
12 months ago
Jason Ish 8735c02995 packet-logger: remove ThreadExitPrintStats
The ThreadExitPrintStats callback was never being used, remove.

Ticket: #7227
12 months ago
Jason Ish 3d2820ba39 profiling: create a LOGGER_USER id
Loggers need an ID uniquely identify them for profiling. To help with
loggers registered at runtime (library, plugins), provide a
LOGGER_USER that can be used. It won't provide per-logger details if
they have more than one, but will provide a total for all their
registered loggers.

Ticket: #7227
12 months ago
Jason Ish cc89d35256 output-packet.h: include tm-threads.h and decode.h
This allows the header to be used without including other headers this
one depends on.

Ticket: #7227
12 months ago
Jason Ish 203ddb2709 output-packet: use void * instead of OutputCtx * for initdata
The use of OutputCtx as the data type for initdata was leaking Eve
submodule logic into the low level packet logger. Instead use void *,
as the packet logging module is not concerned with the type of data
here.

Also document this initdata parameter.

Ticket: #7227
12 months ago
Jason Ish e5ac439226 output-flow.h: include flow.h and decode.h
A library/plugin user wanting to register a custom flow logger must
include "output-flow.h", however that depends on some other includes.
One train of thought with respect to include files in libraries, is
that they should include all their dependencies on behalf of the
user. To make a custom flow logger just a little easier, include
"flow.h" and "decode.h".

Ticket: #7227
12 months ago
Jason Ish 0d16ce2af4 output-flow: remove ThreadExitPrintStats callback
The callback, ThreadExitPrintStats is not used in the flow loggers.

Ticket: #7227
12 months ago
Jason Ish 0506043dea output-flow: use void * instead of OutputCtx * for initdata
The use of OutputCtx as the data type for initdata was leaking Eve
submodule logic into the low level flow logger. Instead use void *, as
the flow logging module is not concerned with the type of data here.

Also document this initdata parameter.

Ticket: #7227
12 months ago
Jason Ish bd81f9f4d3 output-flow: document the name field as for debugging only
Ticket: #7227
12 months ago
Jason Ish afcf591719 output-flow: remove unused initdata argument
The initdata argument to OutputFlowThreadInit was always NULL, remove
it. Internally the ThreadInit functions still get initdata, but this
is the data provided when that logging instance was registered.

Ticket: #7227
12 months ago
Jason Ish 15fe844ae7 syslog: deprecate
The standalone syslog output is now deprecated for Suricata 8. Display
a warning on use and add notes to the userguide.

Ticket: #6544
12 months ago
Jason Ish 5853fb922d tls-log: deprecate
tls-log is now deprecated and will be removed in Suricata 9.0. Display
a deprecation notice on use, and add notes to the user guide.

Ticket: #6542
12 months ago
Jason Ish ab26323a96 http-log: deprecate
http-log is now deprecated and will be removed in Suricata
9.0. Display a deprecation notice on use, and add notes to the
userguide.

Issue: #6543
12 months ago
Jason Ish d7e33a51bc arp: profiling logger id must come before LOGGER_SIZE
Also added comment to make this more clear.
12 months ago
Eric Leblond 4668c95513 datasets: fix parsing of ip4 in ip6
The lookup function was not taking into account that we can have
an IPv4 or an IPv6 address as parameters and that this addresses
need to be converted to Suricata internal storage.
By using the already defined dedicated parsing function, we are
fixing the issue.

Issue: #6969
12 months ago
Lukas Sismis a32b68985f profiling: use correct conditional on packet profiling data dump
Ticket: #7218
12 months ago
Victor Julien cff82f16b3 pcap-file: limit setvbuf to linux
As it fails to work correctly on FreeBSD and OpenBSD.

On FreeBSD, these are the errors:

Info: pcap: Pcap-file will use 4096 buffer size [PcapFileGlobalInit:source-pcap-file.c:159]
Error: pcap: failed to get first packet timestamp. pcap_next_ex(): -2 [PeekFirstPacketTimestamp:source-pcap-file-helper.c:186]
Warning: pcap: Failed to init pcap file input.pcap, skipping [ReceivePcapFileThreadInit:source-pcap-file.c:299]
Error: pcap: pcap file reader thread failed to initialize [ReceivePcapFileLoop:source-pcap-file.c:185]
12 months ago
Victor Julien 688bd538cf pcap: implement pcap-file-buffer-size option
Allows easy specification of buffer size on the commandline.

Ticket: #7155.
12 months ago
Victor Julien 7b730c2e68 pcap-file: improve setvbuf implementation
Make optional through `pcap-file.buffer-size` config option.

Make sure to check through configure.

Ticket: #7155.
12 months ago
Jason Ish 5f2aef7777 pcap-file: use larger buffer for reading pcap files
Inspired by a recent Zeek blog post, this could speed up PCAP
processing by a few percent.

Ticket: #7155.
12 months ago
Victor Julien 96a0ffadde packetpool: allow larger max-pending-packets
Original limit was due to a specific data structure.
12 months ago
Giuseppe Longo edf70276d6 rust/ldap: enable parser for udp
This introduces a new parser registration function for LDAP/UDP, and update
ldap configuration in order to be able to enable/disable a single parser
independently (such as dns).
Also, GAPs are accepted only for TCP parser and not for UDP.

Ticket #7203
1 year ago
Philippe Antoine ede77bc4db rfb: move app-layer registration code to rust
Ticket: 7178
1 year ago
Philippe Antoine 62a186ceef detect/rfb: move keywords to rust
Ticket: 7178

On the way, convert rfb.secresult to a generic integer with enumeration
cf ticket 6723
1 year ago
Philippe Antoine 61cb14d272 detect: make events prefilterable
Ticket: 6728
1 year ago
Philippe Antoine bd23185f7d detect: minor optimization for tx
do not bother to clean the buffers, if we did not run detection
for this transaction.
1 year ago
Philippe Antoine 3ad15f5c37 detect/tx: avoid a call to memset
just initialize the small struct to zero
1 year ago
Philippe Antoine 3f8251bd47 fuzz: make confyaml.c an explicit source
Ticket: 7181

Allows confyaml.c to be in the release archive
1 year ago
Philippe Antoine f96994fb3b source: fix -Wshorten-64-to-32 warnings
Ticket: #6186
1 year ago
Philippe Antoine 4ae5799720 log: fix -Wshorten-64-to-32 warnings
Ticket: #6186
1 year ago
Philippe Antoine 87eb4b5077 output/tx: use dynamic number of app-layer protos
Ticket: 5053
1 year ago
Philippe Antoine 323610c1e8 output: use dynamic number of app-layer protos
Ticket: 5053
1 year ago
Philippe Antoine dacb965fb8 runmodes: use dynamic number of app-layer protos
Ticket: 5053
1 year ago
Philippe Antoine 6ae294c770 detect: run frames on pseudo flush packets
for SSH packets that mark the end of plaintext
1 year ago
Philippe Antoine 7f6c963ac4 doh2: log like dns v3 1 year ago
Philippe Antoine bd5ad0d74a util/profiling: remove assertion
Now a flow alproto can be changed by a call to AppLayerParserParse
when HTTP2 forces the flow to turn into DOH2.
1 year ago
Philippe Antoine 0ccad8fd88 doh: make dns and http keywords for doh2
Ticket: 5773
1 year ago
Philippe Antoine 1e82e20c65 doh: implement dns over http2 app-proto
Ticket: 5773
1 year ago
Philippe Antoine 10ef4e832f runmodes: fix -Wshorten-64-to-32 warnings
Ticket: #6186
1 year ago
Philippe Antoine ce2c087e92 defrag: fix -Wshorten-64-to-32 warnings
Ticket: #6186
1 year ago
Philippe Antoine bb9a45cfd0 datasets: fix -Wshorten-64-to-32 warnings
Ticket: #6186
1 year ago
Giuseppe Longo 910a5b226c rust/ldap: implement logger 1 year ago
Giuseppe Longo 93da339975 rust/ldap: implement app-layer 1 year ago
Philippe Antoine b8c12090f7 smtp: add port 465 for probing 1 year ago
Philippe Antoine eac9cd959f smtp: do not return error on NULL buffer for end of stream 1 year ago
Philippe Antoine e2d1d05878 smtp: recognize more reply codes
Ticket: 6821
1 year ago
Philippe Antoine 694b2797cd ftp: adds server side detection 1 year ago
Philippe Antoine cc3dde8ada smtp: adds server side detection
Ticket: #1125
1 year ago
mmaatuq 64d18e3cc2 imap: extend detection patterns
Ticket: #2886

Signed-off-by: mmaatuq <mahmoudmatook.mm@gmail.com>
1 year ago
Philippe Antoine bce8f4b853 detect/ssh: remove deprecated keywords
Ticket: 2377
1 year ago
Philippe Antoine 0a1062fad2 detect/mqtt: move keywords to rust
Ticket: 4863

On the way, convert some keywords to use the first-class integer
support.
And helpers for pure rust the support for multi-buffer.

Move the C unit tests about keyword mqtt.protocol_version
to unit tests for generic integer parsing, and test version 5
instead of testing twice version 3.

Also iterate all tx's messages for reason code as is done for other
keywords.

And allow detection on empty topics.
1 year ago
Philippe Antoine f4e7d1e217 detect: helper function for multibuffer registration
So that rust does not need to know about SIG_FLAG_TOCLIENT value
1 year ago
Philippe Antoine 4e074b8f38 output/alert: remove now unused include
Including the mqtt one, now that it is almost rust only
1 year ago
Philippe Antoine daad7f2d41 detect/integers: harmonize parser return handling
Ticket: 7172

When parsing an integer for a rule keyword fails, we return error
straight away, without bothering to try to free the NULL pointer.

On the way, remove some one-line wrapper around DetectUxParse
1 year ago
Jason Ish fcc1b1067b eve/dns: make version required
The "eve.version" field is not always logged. Update the schema to
enforce that it is, and fix it for records that don't log it.

Ticket: #7167
1 year ago