]>
git.ipfire.org Git - thirdparty/suricata.git/log
Eric Leblond [Sun, 17 Mar 2019 20:00:50 +0000 (21:00 +0100)]
util-ebpf: rename field 'unlink' to avoid confusion
Eric Leblond [Sun, 17 Mar 2019 19:58:42 +0000 (20:58 +0100)]
af-packet: improve warning message
Eric Leblond [Sun, 17 Mar 2019 19:50:29 +0000 (20:50 +0100)]
af-packet: rename option 'no-percpu-hash'
Eric Leblond [Sun, 17 Mar 2019 19:34:52 +0000 (20:34 +0100)]
af-packet: warn when XDP is not supported
Eric Leblond [Sun, 17 Mar 2019 19:32:39 +0000 (20:32 +0100)]
af-packet: remove question from code
Eric Leblond [Sun, 17 Mar 2019 19:24:58 +0000 (20:24 +0100)]
flow-bypass: rename variables
Eric Leblond [Sun, 17 Mar 2019 19:22:55 +0000 (20:22 +0100)]
flow-hash: doc and code cleaning
Eric Leblond [Sun, 17 Mar 2019 19:00:04 +0000 (20:00 +0100)]
flow-bypass: clock_gettime error handling
Only reason clock_gettime could fail is a permission so let's
error and leave the flow bypass manager if it is the case.
Also let's suppress the error message if ever the error appear in
the middle of a run (which is unlikely).
Eric Leblond [Sun, 17 Mar 2019 18:51:14 +0000 (19:51 +0100)]
util-ebpf: log level fixes and code cleaning
Eric Leblond [Sun, 17 Mar 2019 18:45:58 +0000 (19:45 +0100)]
util-ebpf: init code optimization
Eric Leblond [Wed, 13 Mar 2019 08:01:04 +0000 (09:01 +0100)]
configure: libbpf path
Eric Leblond [Sun, 10 Mar 2019 19:47:06 +0000 (20:47 +0100)]
ebpf: reindent xdp_filter.c
Eric Leblond [Sun, 10 Mar 2019 15:58:25 +0000 (16:58 +0100)]
doc: improve ebpf doc
Add example of bypass rules and explain clang dependency.
Eric Leblond [Sat, 9 Mar 2019 23:01:39 +0000 (00:01 +0100)]
doc: document netronome hardware bypass usage
Eric Leblond [Sun, 10 Mar 2019 10:53:22 +0000 (11:53 +0100)]
util-ebpf: fix error reported by coccinelle check
Some allocation errors were not checked during init phase.
Eric Leblond [Sat, 9 Mar 2019 20:47:40 +0000 (21:47 +0100)]
af-packet: add vlan_id in bypass key
Bypassing on vlan was not supported due to the missing key.
Eric Leblond [Sat, 9 Mar 2019 14:13:26 +0000 (15:13 +0100)]
ebpf: fix percpu hash handling
An alignement issue was preventing the code to work properly.
We introduce macros taken from Linux source code sample to get
something that should work on the long term.
Eric Leblond [Tue, 5 Mar 2019 23:16:33 +0000 (00:16 +0100)]
flow-bypass: increase bypass timeout
This is needed as we did switch from counter maintained in kernel
to internal polling so we need a bigger value.
Eric Leblond [Tue, 5 Mar 2019 22:54:36 +0000 (23:54 +0100)]
flow-bypass: fix timeout of maps bypassed flows
The time is taken from the parameter and is checked against real
flow entries so we need a standard time.
Eric Leblond [Tue, 5 Mar 2019 22:28:26 +0000 (23:28 +0100)]
util-ebpf: fix IPv6 deletion loop
Eric Leblond [Tue, 5 Mar 2019 22:12:12 +0000 (23:12 +0100)]
af-packet: fix bypass for IPv6
Eric Leblond [Tue, 5 Mar 2019 21:09:29 +0000 (22:09 +0100)]
util-ebpf: add message if key deletion fails
Eric Leblond [Mon, 4 Mar 2019 23:44:11 +0000 (00:44 +0100)]
util-ebpf: can't delete in place so update algo
Eric Leblond [Mon, 4 Mar 2019 22:34:04 +0000 (23:34 +0100)]
af-packet: fix default in pinned maps name
Eric Leblond [Mon, 4 Mar 2019 22:18:36 +0000 (23:18 +0100)]
af-packet: be sure to nullify option if not set
Eric Leblond [Mon, 4 Mar 2019 21:37:50 +0000 (22:37 +0100)]
util-ebpf: simplify function declarations
Eric Leblond [Mon, 4 Mar 2019 21:17:50 +0000 (22:17 +0100)]
util-ebpf: micro optimization
Eric Leblond [Sun, 3 Mar 2019 23:11:36 +0000 (00:11 +0100)]
util-ebpf: create flow from bypassed flows
Eric Leblond [Sun, 3 Mar 2019 23:10:54 +0000 (00:10 +0100)]
flow-hash: new function to get flow from flowkey
Eric Leblond [Sun, 3 Mar 2019 20:06:53 +0000 (21:06 +0100)]
ebpf: make table iterator generic
Also adds a basic skeleton for flow creation loop.
Eric Leblond [Sun, 3 Mar 2019 19:42:06 +0000 (20:42 +0100)]
af-packet: bypass with init function
Eric Leblond [Sat, 2 Mar 2019 22:21:05 +0000 (23:21 +0100)]
ebpf: fix indentation in xdp_filter
Eric Leblond [Sat, 2 Mar 2019 21:26:12 +0000 (22:26 +0100)]
util-ebpf: fix iteration in flow timeout
We were not setting the key using the correct item in map. Result
was deletion of wrong flow.
Eric Leblond [Mon, 25 Feb 2019 22:54:11 +0000 (23:54 +0100)]
ebpf: set number of RSS queues to a power of 2
This is needed as netronome can not do a division (so can't do a modulo)
in hardware.
Eric Leblond [Mon, 25 Feb 2019 21:11:27 +0000 (22:11 +0100)]
doc: use github mirror to setup libbpf
Eric Leblond [Mon, 25 Feb 2019 13:18:02 +0000 (14:18 +0100)]
ebpf: implement RSS load balancing in hardware mode
Eric Leblond [Mon, 25 Feb 2019 12:27:20 +0000 (13:27 +0100)]
ebpf: use atomic for counter in hw offload case
Eric Leblond [Sun, 24 Feb 2019 22:57:04 +0000 (23:57 +0100)]
af-packet: correctly set up hardware offload
Eric Leblond [Sun, 24 Feb 2019 22:51:04 +0000 (23:51 +0100)]
ebpf: more conditional code for netronome support
Eric Leblond [Thu, 14 Feb 2019 11:54:32 +0000 (12:54 +0100)]
ebpf: remove BPF_LL_OFF in nhoff offset
It fixes invalid parsing in with recent kernels and does
not affect older kernels.
Eric Leblond [Wed, 13 Feb 2019 15:11:53 +0000 (16:11 +0100)]
af-packet: fix loading of ebpf filter
Eric Leblond [Wed, 13 Feb 2019 14:40:37 +0000 (15:40 +0100)]
ebpf: sync header with upstream
Eric Leblond [Wed, 13 Feb 2019 08:10:02 +0000 (09:10 +0100)]
doc: typo fixes on ebpf doc
Eric Leblond [Sun, 10 Feb 2019 22:31:32 +0000 (23:31 +0100)]
af-packet: fix the start when XDP is pinned
Eric Leblond [Sun, 10 Feb 2019 22:30:00 +0000 (23:30 +0100)]
util-ebpf: change return of pinned maps loading
The calling function needs to be able to see when this is a success
and XDP do not need to be reloaded.
Eric Leblond [Sun, 20 Jan 2019 21:29:18 +0000 (22:29 +0100)]
doc: document externally managed global switch
This is currently implemented as an exposed map and it seems
a good way to do it.
Eric Leblond [Sun, 20 Jan 2019 20:49:11 +0000 (21:49 +0100)]
util-ebpf: conditional flow table loading
Eric Leblond [Sun, 20 Jan 2019 19:29:46 +0000 (20:29 +0100)]
ebpf: implement global switch bypass
Add a switch to allow to bypass all traffic if the switch is on.
Concept is to use a persistant script and pinned maps, so an
external tool can be used to trigger global bypass in case Suricata
is dead.
Eric Leblond [Sun, 20 Jan 2019 18:53:09 +0000 (19:53 +0100)]
af-packet: implement pinned-maps-name
Eric Leblond [Sat, 19 Jan 2019 16:33:46 +0000 (17:33 +0100)]
af-packet: fix build when eBPF not built-in
Eric Leblond [Sun, 9 Dec 2018 22:22:08 +0000 (23:22 +0100)]
util-ebpf: implement pinned maps loading
Load flow tables at start if asked to.
Eric Leblond [Sun, 9 Dec 2018 20:11:27 +0000 (21:11 +0100)]
util-ebpf: only unlink pinned maps in eBPF filter
Eric Leblond [Sun, 9 Dec 2018 19:34:28 +0000 (20:34 +0100)]
af-packet: conditionaly remove XDP filter
Only remove the XDP filter if we are in XDP mode and not using the
pinned maps.
Eric Leblond [Sun, 9 Dec 2018 19:24:36 +0000 (20:24 +0100)]
doc: white space and typo fix
Eric Leblond [Sun, 9 Dec 2018 19:03:31 +0000 (20:03 +0100)]
util-ebpf: conditional pinning of maps
Only pin maps if `pinned-maps` is set in the configuration. This
ensure backward compatibility.
Eric Leblond [Sun, 9 Dec 2018 12:08:53 +0000 (13:08 +0100)]
doc: more eBPF and XDP capabilities
Eric Leblond [Sat, 8 Dec 2018 07:21:44 +0000 (08:21 +0100)]
util-ebpf: fix loop on maps
We were missing the last element of the map by working on previous
key instead of current key.
Eric Leblond [Fri, 7 Dec 2018 15:41:31 +0000 (16:41 +0100)]
util-ebpf: suppress spaces at end of line
Eric Leblond [Thu, 29 Nov 2018 17:18:52 +0000 (18:18 +0100)]
ebpf: add filter by maps on example filter
Eric Leblond [Wed, 14 Nov 2018 21:14:49 +0000 (22:14 +0100)]
util-ebpf: pin the maps
By pinning the maps we are creating a file in /sys/fs/bpf that can
be used by external program to access the map. This has multiple
benefits such as handling list from an external program.
The pinned maps could be persistent accross Suricata reload but
this can be complicated in term of handling everything in the life
of Suricata.
Eric Leblond [Sun, 7 Oct 2018 18:46:45 +0000 (20:46 +0200)]
ebpf: document XDP iface redirect
Eric Leblond [Sun, 7 Oct 2018 18:07:56 +0000 (20:07 +0200)]
ebpf: reduce counter size to allow netronome offload
Eric Leblond [Tue, 25 Sep 2018 11:13:36 +0000 (13:13 +0200)]
ebpf: add VLAN support to loadbalancing
This patchs adds VLAN support to eBPF load balancing by doing a
parsing of VLAN headers.
Eric Leblond [Fri, 25 May 2018 15:05:17 +0000 (17:05 +0200)]
ebpf: change the logic to avoid ktime usage
Kernel time is not available (and/or costly) on NIC such as
Netronome so we update the logic to detect dead flows based on a
lack of update of packets counters. This way, the XDP filter will
be usable by network card.
This patch also updates the ebpf code to support per CPU and
regular mapping. Netronome is not supporting it and the structure
is using atomic for counter so the cost of simultaneous update
is really low.
This patch also updates the xdp_filter to be able to select if the
flow table is per CPU on shared. Second option will be used for
hardward offload. To deactivate the per cpu hash, you need to set
USE_PERCPU_HASH to 0.
This patch also adds an new option to af-packet named no-percpu-hash
If this option is set to yes then the Flow bypassed manager thread
will use one CPU instead of the number of cores. By doing that
we are able to handle the case where USE_PERCPU_HASH is unset (so
hardware offload for Netronome).
This patch also remove aligment indications in the eBPF filter. This
was not really needed and it seems it is causing problem with
some recent version of LLVM toolchain.
Eric Leblond [Sat, 14 Jul 2018 20:37:03 +0000 (22:37 +0200)]
flow-manager: no force reassembly on bypassed flow
When a bypassed flow is created we are forcing the reassembly so
we don't need to do it again when it timeout.
Eric Leblond [Thu, 12 Jul 2018 19:13:00 +0000 (21:13 +0200)]
suricata.yaml: fix path to ebpf and xdp doc
Shivani Bhardwaj [Fri, 7 Jun 2019 14:12:58 +0000 (19:42 +0530)]
detect/content: Message for escaping backslash
So far, if the rule loaded had a backslash character ("\") in its
content field, the rule will fail to load but without giving a
descriptive error message. This patch tells the user to escape the
troubling character.
Before
```
9409] 7/6/2019 -- 16:12:22 - (detect-engine-loader.c:184) <Error> (DetectLoadSigFile) -- [ERRCODE: SC_ERR_INVALID_SIGNATURE(39)] - error parsing signature "alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"Backslash needs escaping msg"; flow:established,to_server; content:"MyBackslash\here"; sid:86; rev:1; )" from file /var/lib/suricata/rules/myrule.rules at line 1
```
After
```
[9409] 7/6/2019 -- 16:12:22 - (detect-content.c:155) <Error> (DetectContentDataParse) -- [ERRCODE: SC_ERR_INVALID_SIGNATURE(39)] - '\' has to be escaped
[9409] 7/6/2019 -- 16:12:22 - (detect-engine-loader.c:184) <Error> (DetectLoadSigFile) -- [ERRCODE: SC_ERR_INVALID_SIGNATURE(39)] - error parsing signature "alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"Backslash needs escaping msg"; flow:established,to_server; content:"MyBackslash\here"; sid:86; rev:1; )" from file /var/lib/suricata/rules/myrule.rules at line 1
```
Closes redmine ticket #2626
Andreas Herz [Fri, 31 May 2019 21:02:24 +0000 (23:02 +0200)]
doc: convert fancy quotes to straight quotes
Victor Julien [Wed, 12 Jun 2019 07:57:02 +0000 (09:57 +0200)]
threads: minor code cleanups
Victor Julien [Wed, 12 Jun 2019 07:56:26 +0000 (09:56 +0200)]
threads: improve flow timeout loop
Improve thread safety and remove BUG_ON
Victor Julien [Wed, 12 Jun 2019 05:45:38 +0000 (07:45 +0200)]
stats: walk tv_root under lock
Victor Julien [Wed, 12 Jun 2019 05:34:21 +0000 (07:34 +0200)]
stats: more accurate time handling for wakeup thread
Victor Julien [Wed, 12 Jun 2019 05:33:17 +0000 (07:33 +0200)]
stats: minor code cleanups
Jeff Lucovsky [Sat, 15 Jun 2019 17:57:15 +0000 (13:57 -0400)]
make: Remove rust generated headers during clean
Philippe Antoine [Tue, 5 Mar 2019 13:08:01 +0000 (14:08 +0100)]
New app layer event for invalid http request line
Handles logs from libhtp even if case of error
Philippe Antoine [Thu, 6 Jun 2019 13:42:47 +0000 (15:42 +0200)]
signature: error for rules with illegal port
Fixes #2080
Philippe Antoine [Tue, 4 Jun 2019 09:27:04 +0000 (11:27 +0200)]
warnings: fixes integer sizes in format strings
Fixes #3009
Philippe Antoine [Mon, 3 Jun 2019 07:22:07 +0000 (09:22 +0200)]
http: adds unit tests for HTPParseContentRange
Philippe Antoine [Wed, 29 May 2019 19:21:03 +0000 (21:21 +0200)]
http: fix overflow in HTPParseContentRange
Pierre Chifflier [Thu, 6 Jun 2019 08:24:20 +0000 (10:24 +0200)]
rust/snmp: fix libc deprecation warnings for int types
Pierre Chifflier [Thu, 6 Jun 2019 08:06:03 +0000 (10:06 +0200)]
rust/snmp: use snake_case when logging PDU types
Victor Julien [Thu, 23 May 2019 04:49:23 +0000 (06:49 +0200)]
snmp: fix 'defined but not used' warning
Remove HAVE_RUST guards as well.
Pierre Chifflier [Wed, 22 May 2019 14:59:55 +0000 (16:59 +0200)]
snmp.version: move unittests to tests/
Pierre Chifflier [Wed, 22 May 2019 14:55:59 +0000 (16:55 +0200)]
snmp.pdu_type: move unittests to tests/
Pierre Chifflier [Wed, 22 May 2019 12:45:21 +0000 (14:45 +0200)]
snmp.community: move unittests to tests/
Pierre Chifflier [Wed, 22 May 2019 12:38:34 +0000 (14:38 +0200)]
detect/snmp: convert snmp.community keyword to v2, and MPM
Pierre Chifflier [Tue, 21 May 2019 19:10:02 +0000 (21:10 +0200)]
rust/snmp: fix missing IPPROTO_* declarations (use core)
Pierre Chifflier [Mon, 13 May 2019 12:14:48 +0000 (14:14 +0200)]
detect/snmp: rename keywords to snmp.<name>, and make rust mandatory
Pierre Chifflier [Thu, 14 Feb 2019 16:11:50 +0000 (17:11 +0100)]
rust/snmp: fix selection of v1/v2c parser
Pierre Chifflier [Tue, 11 Dec 2018 16:21:44 +0000 (17:21 +0100)]
SNMP: add the "snmp.pdu_type" detection keyword
Pierre Chifflier [Tue, 11 Dec 2018 07:54:17 +0000 (08:54 +0100)]
SNMP: add the "snmp.community" detection keyword
Pierre Chifflier [Mon, 10 Dec 2018 12:48:00 +0000 (13:48 +0100)]
SNMP: add the "snmp.version" detection keyword
Pierre Chifflier [Wed, 5 Dec 2018 08:46:16 +0000 (09:46 +0100)]
SNMP: add missing case for profiling enum
Pierre Chifflier [Tue, 4 Dec 2018 16:40:28 +0000 (17:40 +0100)]
SNMP: use explicit references to support build with old rust compiler
Pierre Chifflier [Mon, 8 Oct 2018 08:37:01 +0000 (10:37 +0200)]
SNMP: start looking for transactions from end of list
Pierre Chifflier [Mon, 8 Oct 2018 08:36:39 +0000 (10:36 +0200)]
SNMP: add logger
Pierre Chifflier [Wed, 8 Aug 2018 13:35:31 +0000 (15:35 +0200)]
Add SNMP (v1/v2c/v3) application layer
Pierre Chifflier [Sat, 21 Apr 2018 14:05:33 +0000 (16:05 +0200)]
Rust: expose function AppLayerParserRegisterGetTxIterator
Victor Julien [Mon, 3 Jun 2019 07:47:23 +0000 (09:47 +0200)]
rust: fix warnings about wrong type of comments
"rustdoc does not generate documentation for macro expansions"
Victor Julien [Mon, 3 Jun 2019 07:40:57 +0000 (09:40 +0200)]
rust: fix libc deprecation warnings for int types