Commit Graph

12819 Commits (5baf94e40ddeb3deab97a897b9da2e93ece4c654)
 

Author SHA1 Message Date
Victor Julien b9189946f9 af-packet: remove tpacket-v1 support
Ticket: #4796.

V2 (for IDS and IPS) and V3 (for IDS) are widely supported. V2 was introduced
in 2008, so we can safely assume that all systems can run V2+.
4 years ago
Jason Ish 1f6a15cdf3 app-layer/template: don't always enable if unittests built
314ec77f88 had the unintended side affect
of enabling the template parser and detection buffer if unittests were
enabled.

Fix this by using the new `Default` method for registering parsers.
However, the buffer still needs an explicit configuration check.

Also convert Notice debug messages to Debug to reduce output when in
unittest mode.  If we feel stronly this should still be Notice in the
template, that is a conversion we can make in the generation script when
generating a new parser.
4 years ago
Jeff Lucovsky 6a470a84e7 tftp: Change references to echo
This commit changes the references to the "echo" protocol to tftp. The
references to echo are part of the template parser code.
4 years ago
Jeff Lucovsky 23faeaea5c ftp: Remove diagnostic print
This commit removes a diagnostic message displayed during extraction of
the EPSV port.
4 years ago
Jeff Lucovsky ca7d097225 netmap: V14 API changes
This commit modifies the Netmap packet handling to use API version 14.

@bmeeks8 contributed many changes instrumental to this effort.
4 years ago
Jeff Lucovsky 3496e543af util: Add sys/ioctl.h to common include
This commit adds another system include file based on autoconf to the
common Suricata include file for convenience.
4 years ago
Jeff Lucovsky 84ee01dbe9 util/log: Include device name with thread count 4 years ago
Jeff Lucovsky 1c1c21be9e config/netmap: Check for latest API version
This commit checks for the latest Netmap API version.
4 years ago
Philippe Antoine c023116857 range: prevents memory leak of file from HTTP2
If a HTTP2 transaction gets freed before the end of the range
request, we need to have the files container which is in
the state, to transfer owernship of this file to the files
container.

Ticket: 4811
4 years ago
Philippe Antoine 15649424a7 conf: avoid quadratic complexity
Ticket: 4812

When adding many sequence nodes
4 years ago
Pierre Chifflier acb3ec6db1 rust/nfs: convert parser to nom7 functions (NFS v2 records) 4 years ago
Pierre Chifflier ea1d03f8e3 rust/nfs: add a maximum number of operations per compound
The `count` combinator preallocates a number of bytes. Since the value
is untrusted, this can result in an Out Of Memory allocation.
Use a maximum value, large enough to cover all current implementations.
4 years ago
Pierre Chifflier 0ffe123330 rust/nfs: convert parser to nom7 functions (NFS v3 and v4 records) 4 years ago
Modupe Falodun c33cfed704 detect-fragoffset: convert unittests to FAIL/PASS APIs
Bug: #4040
4 years ago
Corey Thomas 7be793f7b4 ci: add fedora 35 to builds 4 years ago
Jason Ish 52b9c12f41 smtp: log transaction even if no email present
The SMTP transaction logger was not writing the log if the email
portion of the logger failed, such as in the case of STARTTLS
where this is no email decoded.

Ticket #4817
4 years ago
Sam Muhammed fcf399b02c detect/proto: convert unittests to FAIL/PASS APIs
Task #4027
4 years ago
Modupe Falodun 2a800d572c detect-icode: convert unittests to FAIL/PASS APIs
Bug: #4045
4 years ago
Modupe Falodun 97801c795b detect-id: convert unittests to FAIL/PASS APIs
Bug: #4046
4 years ago
Sam Muhammed 4076c8b762 detect/siggroup: convert unittests to FAIL/PASS APIs
Task #4028
4 years ago
Benjamin Wilkins e21a50fee6 lua: Fix SCRule functions for match scripts
Save Signature structure to lua register so SCRule functions can work
in match scripts, where no PacketAlert is present

Resolves Feature #2450
4 years ago
Jason Ish 9b71f56728 modbus: free eve thread context on deinit
Was triggering ASAN leak detection.
4 years ago
Jason Ish eb6cc62937 dhcp: fix url in comment
rustdoc was complaining about the format of the URL in a comment
while trying to generate documentation. Convert the comment to a
non-rustdoc comment for now to satisfy rustdoc.
4 years ago
Jason Ish 55ff912ee7 app-layer: remove IsTxEventAware: never used
The function AppLayerParserProtocolIsTxEventAware is not used so
remove.
4 years ago
Jason Ish b57280ff48 rdp: fix transaction id
By our convention the transaction ID is incremented then applied
to the new transaction. And the generic transaction iterator
requires this behaviour.
4 years ago
Jason Ish 1ad71b96da app-layer: remove tx detect state setter and getter
Instead access detect state through AppLayerParserGetTxData.
4 years ago
Jason Ish 9c67c634c1 app-layer: include DetectEngineState in AppLayerTxData
Every transaction has an existing mandatory field, tx_data. As
DetectEngineState is also mandatory, include it in tx_data.

This allows us to remove the boilerplate every app-layer has
for managing detect engine state.
4 years ago
Jason Ish f4b4d531b0 rdp: add tx iterator 4 years ago
Jason Ish 238ec953b7 krb5: use tx iterator 4 years ago
Jason Ish ef0c351953 ntp: add tx iterator 4 years ago
Jason Ish 871fb035b4 sip: add tx iterator 4 years ago
Jason Ish d6b2d7e16a ike: add tx iterator
For IKE the manual iterator functions were there, but never
registered. So this commit does add a tx iterator to ike.
4 years ago
Jason Ish 3f2d2bc12b snmp: use generic tx iterator 4 years ago
Jason Ish ac4c5ada2f dhcp: use generic tx iterator 4 years ago
Jason Ish 54e62ddf71 http2: use generic tx iterator 4 years ago
Jason Ish 6cffecfe3e template: use generic tx iterator 4 years ago
Jason Ish a936755731 nfs: use generic tx iterator 4 years ago
Jason Ish 0188a01daf rfb: use generic tx iterator 4 years ago
Jason Ish b335409690 mqtt: use generic tx iterator 4 years ago
Jason Ish d71bcd82d9 modbus: use generic tx iterator 4 years ago
Jason Ish fcfc9876ce smb: use generic tx iterator 4 years ago
Jason Ish 049d43212e rust/app-layer: provide generic implementation of iterator
Create traits for app-layer State and Transaction that allow
a generic implementation of a transaction iterator that parser
can use when the follow the common pattern for iterating
transactions.

Also convert DNS to use the generic for testing purposes.
4 years ago
Eric Leblond 6d5f59696d profiling: fix profiling with sample rate
Rules profiling was returning invalid results when used with sample
rate. The problem was that the sample condition was run twice in the
packet flow. As a result, the second pass was not initializing the
variable storing the initial CPU ticks and the resulting performance
counters were reporting invalid values.

Bug: #4836.
4 years ago
Philippe Antoine 16f4e5f31c detect: file_data keyword works on nfs protocol
Ticket: #4839
4 years ago
Shivani Bhardwaj 26c7d3cc35 http2: remove needless borrows 4 years ago
Shivani Bhardwaj f3a1e3b92e core: Remove unneeded consts 4 years ago
Shivani Bhardwaj b5a123adb1 ssh: use Direction enum 4 years ago
Shivani Bhardwaj baf30cfc05 snmp: use Direction enum 4 years ago
Shivani Bhardwaj 89cb337930 smb: use Direction enum 4 years ago
Shivani Bhardwaj 8f9f78c2d0 sip: use Direction enum 4 years ago