]>
git.ipfire.org Git - thirdparty/suricata.git/log
Juliana Fajardini [Wed, 24 Aug 2022 20:36:47 +0000 (17:36 -0300)]
exceptions: error out when invalid policy is used
Before, if an invalid value was passed as exception policy, Suricata
would log a warning and set the exception policy to "ignore". This is a
very different result, than, say, dropping or bypassing a midstream flow.
Task #5504
Philippe Antoine [Thu, 25 Aug 2022 15:05:41 +0000 (17:05 +0200)]
detect: transforms check for 0-sized buffer
So as to avoid undefined behavior with a 0-sized variable length
array
Ticket: #5521
Eric Leblond [Tue, 28 Jun 2022 13:52:04 +0000 (15:52 +0200)]
rust/smb: log uuid of interface in dcerpc
When doing a DCERPC request, we can use the context id to log the
interface that is used. Doing that we can see in one single event
what is the DCERPC interface and opnum that are used. This allows
to have all the information needed to resolve the request to a
function call.
Feature #5413.
Eric Leblond [Tue, 28 Jun 2022 13:50:50 +0000 (15:50 +0200)]
rust/smb/dcerpc: parse context id
As context id is used to know to which variant of the endpoint the
request is done, it is interesting to parse it.
Feature #5413.
Philippe Antoine [Wed, 24 Aug 2022 07:51:52 +0000 (09:51 +0200)]
fuzz: disable enip detection based on source port
So as to avoid fuzzing detecting protocol polyglots with enip
Philippe Antoine [Thu, 16 Jun 2022 08:58:42 +0000 (10:58 +0200)]
fuzz: remove check about max transactions
Suricata can indeed pipeline many HTTP1 transactions
Victor Julien [Thu, 25 Aug 2022 10:23:21 +0000 (12:23 +0200)]
profiling: fix implicit-int-float-conversion warnings
Victor Julien [Thu, 25 Aug 2022 10:39:10 +0000 (12:39 +0200)]
packetpool: ifdef debug check
Juliana Fajardini [Tue, 23 Aug 2022 13:35:18 +0000 (10:35 -0300)]
decode: remove unused macros, replace w/ functions
With the recent changes, these macros weren't being used anymore.
Related to
Bug #5458
Juliana Fajardini [Mon, 8 Aug 2022 14:12:33 +0000 (11:12 -0300)]
stream/tcp: remove repeated header declaration
StreamTcpRegisterTests was being declared twice.
Juliana Fajardini [Mon, 1 Aug 2022 23:04:22 +0000 (20:04 -0300)]
detect/alert: add unittests to check packet action
Add unittests to check that packet flags are correctly updated after
detection finds drop or reject rules that match.
Related to
Bug #5458
Juliana Fajardini [Mon, 8 Aug 2022 14:04:59 +0000 (11:04 -0300)]
decode: validate if dropped packet has drop reason
Related to
Bug #5458
Juliana Fajardini [Thu, 28 Jul 2022 23:05:47 +0000 (20:05 -0300)]
detect/alert: ensure reject action is applied
Bug 5458 states that the reject action is no longer working. While SV
tests that use the reject action still pass, it indeed seems that a
regression has happened with commit
aa93984 , because while the
function that applies rule actions to the flow (RuleActionToFlow) does
check for the reject action, the newly added function PacketApply
SignatureActions only checks for ACTION_DROP or ACTION_PASS when
deciding to call RuleActionToFlow.
Bug #5458
Juliana Fajardini [Thu, 28 Jul 2022 15:04:45 +0000 (12:04 -0300)]
decode: make PacketDrop use action as parameter
A Packet may be dropped due to several different reasons. This change
adds action as a parameter, so we can update the packet action when we
drop it, instead of setting it to drop.
Related to
Bug #5458
Eric Leblond [Wed, 24 Aug 2022 19:15:57 +0000 (21:15 +0200)]
luajit: fix unittests build
When building with the following options:
./configure CC=clang --enable-luajit --enable-geoip --enable-unittests
There is a build failure:
runmode-unittests.c:234:9: error: implicit declaration of function 'LuajitSetupStatesPool' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (LuajitSetupStatesPool() != 0) {
jason taylor [Wed, 24 Aug 2022 12:22:02 +0000 (12:22 +0000)]
userguide: update dsize documentation/examples
Signed-off-by: jason taylor <jtfas90@gmail.com>
dependabot[bot] [Mon, 22 Aug 2022 19:51:17 +0000 (19:51 +0000)]
github-actions: bump actions/cache from 3.0.7 to 3.0.8
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/
a7c34adf76222e77931dedbf4a45b2e4648ced19 ...
fd5de65bc895cf536527842281bea11763fefd77 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Philippe Antoine [Mon, 25 Apr 2022 06:23:53 +0000 (08:23 +0200)]
protocol-change: sets event in case of failure
Protocol change can fail if one protocol change is already
occuring.
Ticket: #5509
Philippe Antoine [Thu, 2 Sep 2021 09:40:45 +0000 (11:40 +0200)]
smb: do not use tree id to match create request and response
As an SMB2 async response does not have a tree id, even if
the request has it.
Per spec, MessageId should be enough to identifiy a message request
and response uniquely across all messages that are sent on the same
SMB2 Protocol transport connection.
So, the tree id is redundant anyways.
Ticket: #5508
Victor Julien [Thu, 18 Aug 2022 13:05:46 +0000 (15:05 +0200)]
github: update Rust versions
Victor Julien [Thu, 18 Aug 2022 12:27:54 +0000 (14:27 +0200)]
github: bump ubuntu-18.04 runners to 22.04
Philippe Antoine [Mon, 4 Jul 2022 12:25:33 +0000 (14:25 +0200)]
dhcp: adds leasetime keyword
As it is logged
Ticket: #5435
Jason Ish [Tue, 9 Aug 2022 18:21:31 +0000 (12:21 -0600)]
app-layer: don't wrap around on port 65535
A port value of 65535 caused the port value to wrap-around to 0
resulting in an infinite loop.
Fixes: 53fc70a9a73c ("protodetect: fix int warnings")
dependabot[bot] [Thu, 11 Aug 2022 19:35:50 +0000 (19:35 +0000)]
github-actions: bump actions/cache from 3.0.6 to 3.0.7
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.6 to 3.0.7.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.0.6...
a7c34adf76222e77931dedbf4a45b2e4648ced19 )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Victor Julien [Wed, 17 Aug 2022 07:37:50 +0000 (09:37 +0200)]
rust: set MSRV to 1.58.1
Ticket: #4163.
Juliana Fajardini [Mon, 15 Aug 2022 18:57:58 +0000 (15:57 -0300)]
detect/parse: test sig parsing for more actions
Our unittests were only covering sig parsing for alert actions. As in
environments without LibNet the reject action will not work, we must
ensure that our parser properly fails in such cases, instead of silently
accepting an unsupported action.
Added tests for the reject and drop action.
Task #5496
Shivani Bhardwaj [Fri, 12 Aug 2022 09:46:14 +0000 (15:16 +0530)]
doc/conf: fix sphinx language setting
sphinx-build 5.1.1 and above throws a warning which is treated as an
error while building.
Invalid configuration value found: 'language = None'. Update your configuration to a valid language code. Falling back to 'en' (English).
Philippe Antoine [Sun, 24 Jul 2022 19:54:24 +0000 (21:54 +0200)]
http2: remove to_vec for comparisons
Ticket: #5454
Philippe Antoine [Wed, 3 Aug 2022 06:29:40 +0000 (08:29 +0200)]
http2: fix clippy warning about &Vec<u8>
Using &[u8] instead in function prototype
Shivani Bhardwaj [Wed, 29 Jun 2022 11:22:10 +0000 (16:52 +0530)]
eve/schema: add smtp url bool fields
Eric Leblond [Sat, 18 Jun 2022 13:33:43 +0000 (15:33 +0200)]
smtp/mime: fix url extraction when no config is set
Eric Leblond [Sun, 19 Dec 2021 23:36:52 +0000 (00:36 +0100)]
eve/email: log existing url type
MIME parsing was setting flag on URL to indicate their
estimated type. This patch attach the information to
the email object so the user can extract interesting
email directly:
```
"email": {
"status": "PARSE_DONE",
"from": "Eric Leblond <regit@regit.org>",
"to": [
"eric@regit.org"
],
"has_ipv6_url": false,
"has_ipv4_url": false,
"has_exe_url": true,
"url": [
"http://www.toto.com",
"http://perdu.com.",
"https://hacke.me/pown.exe"
]
}
```
Eric Leblond [Mon, 20 Dec 2021 00:02:40 +0000 (01:02 +0100)]
util/mime: add some extensions to exe list
Benjamin Wilkins [Wed, 3 Nov 2021 17:20:06 +0000 (13:20 -0400)]
doc: Document SCByteVarGet lua function
Add documentation for accessing results from byte_extract and byte_math
in lua match functions
Issue: 2871
Benjamin Wilkins [Tue, 26 Oct 2021 19:20:41 +0000 (15:20 -0400)]
lua: Expose byte extract to lua match scripts
Allow lua match scripts to access variables defined in rule by
byte_extract or byte_math
Issue: 2871
Philippe Antoine [Sun, 24 Jul 2022 20:18:29 +0000 (22:18 +0200)]
ike: log ikev1 tx fields instead of state ones
As state fields can grow abitrarily, and this can lead to DOS
by quadratic complexity (CPU time and disk space)
Adds a direction field to retain all the information in the
transaction.
Also checks array vendor_ids had at least one element before
logging it.
Ticket: #5455
Philippe Antoine [Sun, 31 Jul 2022 13:50:26 +0000 (15:50 +0200)]
ike: rustfmt
Jason Ish [Mon, 8 Aug 2022 19:17:01 +0000 (13:17 -0600)]
github-ci: add AlmaLinux 9 build
Jason Ish [Sun, 7 Aug 2022 16:24:56 +0000 (10:24 -0600)]
github-ci: test execution of suricatasc and suricata-update
Jason Ish [Tue, 3 May 2022 18:34:57 +0000 (12:34 -0600)]
python: install without distutils
Instead of using distutils/setuptools for installing the Python code,
just install it into our own Python directory.
Distutils is being removed from Python, and setuptools doesn't work well
when trying to install into your own location. For our usage its just
simpler to install with make.
In addition to removing the configure check for distutils, also remove
the check for pyyaml. This lets the user install pyyaml after Suricata
is installed, and Suricata-Update does handle this case gracefully.
Issue: #5313
Eric Leblond [Thu, 4 Aug 2022 14:21:27 +0000 (16:21 +0200)]
detect/tls: fix descriptions
Most keywords were presented as content modifiers when they
were in fact sticky buffers.
Victor Julien [Sat, 6 Aug 2022 08:06:58 +0000 (10:06 +0200)]
netmap: fix includes
dependabot[bot] [Fri, 5 Aug 2022 20:05:18 +0000 (20:05 +0000)]
github-actions: bump actions/cache from 3.0.5 to 3.0.6
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/
0865c47f36e68161719c5b124609996bb5c40129 ...
f4278025ab0f432ce369118909e46deec636f50c )
---
updated-dependencies:
- dependency-name: actions/cache
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Jason Ish [Tue, 3 May 2022 19:36:11 +0000 (13:36 -0600)]
bundle.sh: comment line fixup
Accept lines that start with a hash, but not immediately followed by a
space as a comment as well.
Philippe Antoine [Tue, 12 Jul 2022 12:30:05 +0000 (14:30 +0200)]
detect/krb: no more wrapper around DetectEngineInspectGenericList
Philippe Antoine [Fri, 22 Jul 2022 15:21:31 +0000 (17:21 +0200)]
krb: detection for ticket encryption
As is done for logging.
Ticket: #5442
Philippe Antoine [Fri, 22 Jul 2022 15:20:58 +0000 (17:20 +0200)]
krb: log for ticket encryption
Also logs if the ticket encryption is weak.
It is different from the encryption used for the rest of the
packet, and this allows to detect kerberoasting attack.
Ticket: #5442
Philippe Antoine [Tue, 12 Jul 2022 13:25:50 +0000 (15:25 +0200)]
krb: rustfmt kerberos.rs
Philippe Antoine [Tue, 12 Jul 2022 07:17:50 +0000 (09:17 +0200)]
krb: bump up crate version
kerberos parser crate is also used by other procotols : nfs and
smb. These protocols use an older der_parser crate version.
Upgrading der_parser will simplify the code further.
Philippe Antoine [Tue, 12 Jul 2022 09:53:44 +0000 (11:53 +0200)]
krb: rustfmt detect.rs
Victor Julien [Fri, 5 Aug 2022 15:10:54 +0000 (17:10 +0200)]
flow: minor compiler warnings
flow-util.c: In function 'FlowEndCountersRegister':
flow-util.c:294:34: warning: 'name' may be used uninitialized in this function [-Wmaybe-uninitialized]
294 | fec->flow_tcp_state[i] = StatsRegisterCounter(name, t);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jeff Lucovsky [Tue, 12 Jul 2022 13:07:49 +0000 (09:07 -0400)]
stream/rules: add example rule for reassembly depth
Issue: 3512
Jeff Lucovsky [Tue, 12 Jul 2022 13:07:00 +0000 (09:07 -0400)]
stream/event: Trigger stream reassembly event
Issue: 3512
This commit triggers the stream reassembly depth reached event.
Jeff Lucovsky [Tue, 12 Jul 2022 13:06:38 +0000 (09:06 -0400)]
general: Typo fixup
Jeff Lucovsky [Tue, 12 Jul 2022 13:03:29 +0000 (09:03 -0400)]
stream/event: New reassembly depth event
Issue: 3512
This commit adds a stream event triggered when the stream assembly depth
is reached.
Philippe Antoine [Wed, 3 Aug 2022 08:11:55 +0000 (10:11 +0200)]
ci: update to macos latest
Jason Ish [Tue, 2 Aug 2022 17:34:37 +0000 (11:34 -0600)]
github-ci: enable nfqueue on fedora 36 build
Jason Ish [Wed, 29 Jun 2022 17:28:25 +0000 (11:28 -0600)]
rust/frames: cleanups
- Implement the Display trait on Direction to print "toserver" or
"toclient" which used in a format string.
- Use Direction struct inside Frame instead of a u32. Requires a helper
method as there are two representation in C for direction, and the C
methods for frames don't use the internal representation of the
Direction enum (some sweeping changes could help here)
Jason Ish [Fri, 18 Feb 2022 18:27:35 +0000 (12:27 -0600)]
rust/frames: derive direction from StreamSlice
On the Rust side, a Frame requires a StreamSlice to be created. We can
derive the direction from the StreamSlice removing the need for callers
to provide the direction when operating on the frame.
Jason Ish [Wed, 29 Jun 2022 21:19:09 +0000 (15:19 -0600)]
dns/tests: fix StreamSlice to satisfy debug validation
Philippe Antoine [Tue, 2 Aug 2022 12:23:41 +0000 (14:23 +0200)]
quic: update to nom7
Philippe Antoine [Sun, 31 Jul 2022 18:22:59 +0000 (20:22 +0200)]
quic: reassemble crypto frames and parse it
Philippe Antoine [Fri, 1 Jul 2022 09:26:17 +0000 (11:26 +0200)]
ci: have one github workflow with MSRV
Philippe Antoine [Wed, 8 Jun 2022 09:23:47 +0000 (11:23 +0200)]
quic: complete schema.json
adding ja3 and extension fields
Philippe Antoine [Wed, 16 Mar 2022 13:45:41 +0000 (14:45 +0100)]
quic: events and rules on them
Philippe Antoine [Fri, 4 Mar 2022 09:31:16 +0000 (10:31 +0100)]
quic: parse gquic version Q039
Ticket: #5166
Philippe Antoine [Fri, 25 Mar 2022 13:53:09 +0000 (14:53 +0100)]
quic: ja3 computation and logging and detection
Logging as is done in TLS.
Detection using the generic generic ja3.string keyword
Ticket: #5143
Philippe Antoine [Mon, 14 Feb 2022 08:38:10 +0000 (09:38 +0100)]
quic: complete parsing of initial for non gquic
The format of initial packet for quic ietf, ie quic v1,
is described in rfc 9000, section 17.2.2
Parse more frames and logs interesting extensions from crypto frame
Do not try to parse encrypted data, ie after we have seen
a crypto frame in each direction.
Use sni from crypto frame with tls for detection already implemented
Ticket: #4967
Philippe Antoine [Mon, 14 Feb 2022 08:06:02 +0000 (09:06 +0100)]
quic: rustfmt
Philippe Antoine [Thu, 5 May 2022 12:18:15 +0000 (14:18 +0200)]
rust: bump up digest crates
so that we can use hkdf crate for quic
Philippe Antoine [Tue, 22 Feb 2022 07:49:46 +0000 (08:49 +0100)]
rdp: bump up tls-parser crate version
so that we can use new functions in quic parser
Juliana Fajardini [Tue, 10 May 2022 20:01:20 +0000 (17:01 -0300)]
detect/engine: fix typos in assorted files
Juliana Fajardini [Mon, 9 May 2022 14:57:31 +0000 (11:57 -0300)]
commandline: add alert-queue expand failure option
For testing purposes. Meant to simulate a reallocation failure when
dynamically growing the alert queue in DetectEngineThreadCtx, so we can
check that Suri's behavior doesn't break under such circumstances.
Task #5319
Victor Julien [Thu, 28 Jul 2022 19:38:46 +0000 (21:38 +0200)]
nflog: fix missing util-time include; cleanups
Victor Julien [Thu, 28 Jul 2022 19:38:24 +0000 (21:38 +0200)]
nflog: update copyright years
Jeff Lucovsky [Mon, 10 Jan 2022 18:20:29 +0000 (13:20 -0500)]
classification/config: Propagate validation errors
Issue: #4554
This commit modifies the workflow to propagate classification parsing
errors when in test mode.
When not in test mode, errors continue to be displayed but they do not
halt Suricata execution.
Jeff Lucovsky [Thu, 27 Jan 2022 19:09:15 +0000 (14:09 -0500)]
classification/config: Raise error on validation errors
This commit adds logic which raises an error if parse errors occur while
loading classification.config
Issue: 4554
Jufajardini Reichow [Wed, 20 Jul 2022 16:35:07 +0000 (13:35 -0300)]
userguide/rules/meta: minor formatting adjustments
Jufajardini Reichow [Tue, 19 Jul 2022 21:28:19 +0000 (18:28 -0300)]
userguide/rules: explain sid uniqueness within gid
While Suri will throw an error if two signatures have the same `sid`
and no `gid`, or same `sid` and same `gid`, it will just accept same
`sid` for different `gid`s.
Related to
Task #5441
Philippe Antoine [Tue, 12 Jul 2022 12:30:05 +0000 (14:30 +0200)]
detect: remove wrappers around DetectEngineInspectGenericList
Scott Jordan [Fri, 15 Jul 2022 14:50:21 +0000 (10:50 -0400)]
stream: fix StreamTcpSegmentForSession missing segments
Bugfix, segment traversal was being initialized at root node, but
should have been started at the min node. Bug resulted in captures
missing segments left of root node.
jason taylor [Mon, 18 Jul 2022 22:39:48 +0000 (22:39 +0000)]
doc: update priority wording userguide meta
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Mon, 18 Jul 2022 22:30:30 +0000 (22:30 +0000)]
doc: update to 80 char formatting userguide meta
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Mon, 18 Jul 2022 22:20:46 +0000 (22:20 +0000)]
doc: metadata information update userguide meta
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Mon, 18 Jul 2022 22:11:50 +0000 (22:11 +0000)]
doc: update priority information userguide meta
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Mon, 18 Jul 2022 22:07:54 +0000 (22:07 +0000)]
doc: update reference section in userguide meta
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Mon, 18 Jul 2022 22:00:41 +0000 (22:00 +0000)]
doc: update userguide meta classtype information
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Mon, 18 Jul 2022 21:55:33 +0000 (21:55 +0000)]
doc: update rev and gid userguide meta wording
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Mon, 18 Jul 2022 21:12:46 +0000 (21:12 +0000)]
doc: add clarity around userguide meta information
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Fri, 15 Jul 2022 20:55:52 +0000 (20:55 +0000)]
doc: add sid reserved range reference
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Fri, 15 Jul 2022 19:27:19 +0000 (19:27 +0000)]
doc: add clarity to rule msg tips
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Thu, 14 Jul 2022 20:05:03 +0000 (20:05 +0000)]
doc: update example rule list
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Thu, 14 Jul 2022 19:28:22 +0000 (19:28 +0000)]
doc: add clarity to role wording
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Tue, 12 Jul 2022 22:05:16 +0000 (22:05 +0000)]
doc: meta keyword doc example rule update
Signed-off-by: jason taylor <jtfas90@gmail.com>
jason taylor [Mon, 25 Jul 2022 23:22:00 +0000 (23:22 +0000)]
doc: add bsize keyword examples
Signed-off-by: jason taylor <jtfas90@gmail.com>
Victor Julien [Thu, 28 Jul 2022 09:17:04 +0000 (11:17 +0200)]
detect/file: minor cleanups
Victor Julien [Thu, 28 Jul 2022 09:16:37 +0000 (11:16 +0200)]
detect/file: reduce scope of keyword data structures
Victor Julien [Thu, 28 Jul 2022 09:12:55 +0000 (11:12 +0200)]
detect/file: update copyright years
Victor Julien [Thu, 28 Jul 2022 06:20:55 +0000 (08:20 +0200)]
detect/cip: cleanup includes
Philippe Antoine [Mon, 4 Jul 2022 13:28:39 +0000 (15:28 +0200)]
quic: do not log empty cyu array
Ticket: #5167