]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
6 years agodetect/pcre: minor fix to modifiers 3710/head
Victor Julien [Wed, 6 Mar 2019 14:16:03 +0000 (15:16 +0100)] 
detect/pcre: minor fix to modifiers

Set SIG_FLAG_APPLAYER when setting the alproto to make sure the
sig is processed correctly.

6 years agoaf-packet: fix v3 code using v2 union member
Victor Julien [Sat, 2 Mar 2019 13:26:07 +0000 (14:26 +0100)] 
af-packet: fix v3 code using v2 union member

6 years agorust/ikev2: fix events not being raised in first message
Pierre Chifflier [Mon, 4 Mar 2019 17:47:07 +0000 (18:47 +0100)] 
rust/ikev2: fix events not being raised in first message

The `set_event` function requires that the transaction is already
inserted, or the event set is silently lost.
When parsing first IKEv2 message, first insert transaction, prepare
values, and borrow back inserted transaction to update it.

6 years agorules: fix event names for ikev2 (weak authentication and DH parameters)
Pierre Chifflier [Mon, 4 Mar 2019 17:45:38 +0000 (18:45 +0100)] 
rules: fix event names for ikev2 (weak authentication and DH parameters)

6 years agoeve/http: add proxy related custom headers
Victor Julien [Sat, 23 Feb 2019 18:27:22 +0000 (19:27 +0100)] 
eve/http: add proxy related custom headers

6 years agoeve/http: fix custom header table
Victor Julien [Sat, 23 Feb 2019 18:03:13 +0000 (19:03 +0100)] 
eve/http: fix custom header table

6 years agonetmap: refresh netmap_if address after each NIOCREGIF 3692/head
Murat Balaban [Wed, 27 Feb 2019 17:09:13 +0000 (09:09 -0800)] 
netmap: refresh netmap_if address after each NIOCREGIF

With the introduction of netmap "partial opening" feature
netmap requires that we get a new NETMAP_IF pointer after
every `NIOCREGIF` registration. Because this allocates an
independent instance of `struct netmap_if`. If one
separately opens hw rings and sw rings he/she'll get two
`struct netmap_if`, one with the valid hw rings, and the other
with valid sw rings.

Because of that we get a new netmap_if pointer after each
NIOCREGIF.

Also removing netmap_if struct from NetmapDevice since
it's no more required.

Ticket #2855.

6 years agostream/ips: set proper payload len for inspection
Victor Julien [Wed, 27 Feb 2019 06:16:18 +0000 (07:16 +0100)] 
stream/ips: set proper payload len for inspection

On mem(cap) presure we fall back to the packet payload. The previous
patch failed to properly set the payload length.

6 years agoips/stream: handle low mem(cap) crash 3681/head
Victor Julien [Fri, 22 Feb 2019 19:41:41 +0000 (20:41 +0100)] 
ips/stream: handle low mem(cap) crash

In low memory or memcap reached conditions a crash could happen in
inline stream detection.

The crash had the following path:

A packet would come in and it's data was added to the stream. Due
to earlier packet loss, the stream buffer uses a stream buffer block
tree to track the data blocks. When trying to add the current packets
block to the tree, the memory limit was reached and the add fails.

A bit later in the pipeline for the same packet, the inline stream
mpm inspection function gets the data to inspect. For inline mode
this is the current packet + stream data before and after the packet,
if available.

The code looking up the packets data in the stream would not
consider the possibility that the stream block returned wasn't
the right one. The tree search returns either the correct or the
next block. In adjusting the returned block to add the extra stream
data it would miscalculate offsets leading to a corrupt pointer to the
data.

This patch more carefully checks the result of the lookup, and
falls back to simply inspecting the packet payload if the lookup
didn't produce the expected result.

Bug 2842.

Reported-by: Ad Schellevis <ad@opnsense.org>
6 years agostream-buffer: fix block search compare func
Victor Julien [Fri, 22 Feb 2019 15:14:48 +0000 (16:14 +0100)] 
stream-buffer: fix block search compare func

Sbb search function could return the wrong block due to an off by
one error.

6 years agostream-buffer: fix streaming buffer size issue
Victor Julien [Fri, 22 Feb 2019 10:55:07 +0000 (11:55 +0100)] 
stream-buffer: fix streaming buffer size issue

It was using buffer size instead of the real usage of the buffer.

6 years agonetmap: fix checksum auto check under high load
Victor Julien [Sat, 23 Feb 2019 08:07:10 +0000 (09:07 +0100)] 
netmap: fix checksum auto check under high load

6 years agodetect/pcre: fix false positive
Victor Julien [Wed, 20 Feb 2019 15:58:34 +0000 (16:58 +0100)] 
detect/pcre: fix false positive

Fix case where a HTTP modifier in PCRE statements would lead to
the rule alerting when it should not.

Bug #2769

6 years agoapp-layer-ssl: check that cipher suites length is divisible by two
Mats Klepsland [Sat, 16 Feb 2019 20:55:19 +0000 (21:55 +0100)] 
app-layer-ssl: check that cipher suites length is divisible by two

Cipher suites length should always be divisible by two. If it is a
odd number, which should not happen with normal traffic, it ends up
reading one byte too much.

6 years agoutil-ja3: fix AddressSanitizer heap-buffer-overflow
Mats Klepsland [Sat, 16 Feb 2019 20:49:23 +0000 (21:49 +0100)] 
util-ja3: fix AddressSanitizer heap-buffer-overflow

No resizing is done in Ja3BufferResizeIfFull() when the buffer is
empty. This leads to a potential overflow when this happens, since
a ',' is appended even when the buffer is empty.

Bug #2762

6 years agowindows: allow multiple pcap devices on commandline 3662/head
Victor Julien [Fri, 15 Feb 2019 10:29:00 +0000 (11:29 +0100)] 
windows: allow multiple pcap devices on commandline

Ticket #2774

6 years agoips: set host mode only after engine mode
Victor Julien [Fri, 15 Feb 2019 09:45:12 +0000 (10:45 +0100)] 
ips: set host mode only after engine mode

Make sure it is set after the final engine mode update.

6 years agostream: fix 'stream.inline=auto' for L2 IPS
Victor Julien [Fri, 15 Feb 2019 09:37:42 +0000 (10:37 +0100)] 
stream: fix 'stream.inline=auto' for L2 IPS

Make sure the livedev setup is finalized before initializing the
stream engine.

Bug #2811

Reported-by: Ad Schellevis
6 years agodcerpc/udp: fix int mishandling in opnum parsing
Victor Julien [Fri, 25 Jan 2019 11:00:13 +0000 (12:00 +0100)] 
dcerpc/udp: fix int mishandling in opnum parsing

For Big Endian support in the protocol, the opnum would not be set
correctly.

Found using undefined sanitizer.

6 years agofile/swf: fix undefined int behaviour
Victor Julien [Fri, 25 Jan 2019 10:52:06 +0000 (11:52 +0100)] 
file/swf: fix undefined int behaviour

Fix warnings by the undefined sanitizer.

6 years agodetect/bytetest: don't print errors at runtime
Victor Julien [Fri, 25 Jan 2019 10:48:50 +0000 (11:48 +0100)] 
detect/bytetest: don't print errors at runtime

6 years agoissue 2795: python 3 fix in Rust C header gen
Jason Ish [Thu, 7 Feb 2019 19:53:23 +0000 (13:53 -0600)] 
issue 2795: python 3 fix in Rust C header gen

The C header generation script was failing with a unicode error
in Python 3 on FreeBSD.  Fix the reading of files to properly
handle unicode in all Python 3 environments.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2794

6 years agorust/dns: add dns to dns alerts
Jason Ish [Wed, 23 Jan 2019 20:08:21 +0000 (14:08 -0600)] 
rust/dns: add dns to dns alerts

6 years agoconfigure.ac: fix --{disable,enable}-xxx options
Fabrice Fontaine [Thu, 31 Jan 2019 07:56:15 +0000 (08:56 +0100)] 
configure.ac: fix --{disable,enable}-xxx options

Currently, if the user provides --enable-libmagic or
--disable-libmagic, libmagic will be disabled because $enableval is not
used to know if the user provided --enable or --disable

Most of the options have this issue so fix them all by using $enableval

Fixes:
 - https://redmine.openinfosecfoundation.org/issues/2797

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
6 years agolog/stats: fix formatting of long decoder events
Victor Julien [Tue, 29 Jan 2019 10:40:57 +0000 (11:40 +0100)] 
log/stats: fix formatting of long decoder events

6 years agouserguide: improve stats logging documentation
Victor Julien [Mon, 28 Jan 2019 15:55:59 +0000 (16:55 +0100)] 
userguide: improve stats logging documentation

6 years agosource-pcap:set PktAcqBreakLoop as pcap_breakloop 3625/head
Jingyu Yang [Mon, 24 Dec 2018 08:22:42 +0000 (16:22 +0800)] 
source-pcap:set PktAcqBreakLoop as pcap_breakloop

6 years agostream: fix false negative on bad RST
Victor Julien [Fri, 18 Jan 2019 14:03:39 +0000 (15:03 +0100)] 
stream: fix false negative on bad RST

If a bad RST was received the stream inspection would not happen
for that packet, but it would still move the 'raw progress' tracker
forward. Following good packets would then fail to detect anything
before the 'raw progress' position.

Bug #2770

Reported-by: Alexey Vishnyakov
6 years agoeve.stats: warn that output might miss decoder-events
Victor Julien [Thu, 24 Jan 2019 11:23:37 +0000 (12:23 +0100)] 
eve.stats: warn that output might miss decoder-events

6 years agoeve.stats: make decoder event prefix configurable
Victor Julien [Thu, 24 Jan 2019 10:40:39 +0000 (11:40 +0100)] 
eve.stats: make decoder event prefix configurable

6 years agoeve: fix missing decoder-events in stats
Victor Julien [Wed, 23 Jan 2019 20:18:59 +0000 (21:18 +0100)] 
eve: fix missing decoder-events in stats

In the eve log the decoder events are added as optional counters. This
behaviour is enabled by default. However, lots of the counters are
missing, as the names colide with other counters.

E.g.

decoder.ipv6 counts ipv6 packets
decoder.ipv6.unknown_next_header counts how often an unknown next
    header is encountered.

In this example 'ipv6' would be both a json integer and a json object.
It appears that jansson favours the first that is generated, so the
event counters are mostly missing.

This patch registers them as 'decoder.events.<event>' instead. As
these names are generated on the fly, a hash table to contain the
allocated strings was added as well.

6 years agohash: move string hash funcs into util files
Victor Julien [Wed, 23 Jan 2019 21:02:25 +0000 (22:02 +0100)] 
hash: move string hash funcs into util files

6 years agodecoder: add gre over ipv6 support
Victor Julien [Wed, 23 Jan 2019 20:17:56 +0000 (21:17 +0100)] 
decoder: add gre over ipv6 support

6 years agoaf-packet: minor code cleanups 3621/head
Victor Julien [Tue, 22 Jan 2019 20:34:28 +0000 (21:34 +0100)] 
af-packet: minor code cleanups

6 years agoaf-packet: re-enable sync for tpacket v2
Victor Julien [Tue, 22 Jan 2019 20:28:40 +0000 (21:28 +0100)] 
af-packet: re-enable sync for tpacket v2

Synchronize start was disabled for v2 when v3 was introduced, without
a reason being given.

Re-enable as v2 will otherwise also start reading packets before the
other threads are set up. This will lead to hashing issues.

Part of bug #2788.

6 years agoaf-packet: fix sync start for tpacket v3
Victor Julien [Tue, 22 Jan 2019 20:00:57 +0000 (21:00 +0100)] 
af-packet: fix sync start for tpacket v3

The tpacket-v3 implementation of the synchonize start logic would
not correctly consider the timestamp parameter, leading to threads
starting before synchronization between threads was complete.

Bug #2788

6 years agonfqueue: inject fake packet on timeout
Alexander Gozman [Fri, 21 Dec 2018 16:16:29 +0000 (16:16 +0000)] 
nfqueue: inject fake packet on timeout

Fixes nfqueue and delayed-detect.

On systems with small amount of traffic (or with no traffic at all)
nfqueue with 'delayed-detect' enabled hanged in 'workers' mode.

Bug #2362.

6 years agodoc: fix minor typo
Pascal Delalande [Wed, 9 Jan 2019 20:33:32 +0000 (21:33 +0100)] 
doc: fix minor typo

6 years agolua: add lua dir with example to make dist 3602/head
Eric Leblond [Thu, 27 Dec 2018 22:02:47 +0000 (23:02 +0100)] 
lua: add lua dir with example to make dist

6 years agococcinelle: add missing tests to make dist
Eric Leblond [Thu, 27 Dec 2018 22:01:43 +0000 (23:01 +0100)] 
coccinelle: add missing tests to make dist

6 years agoutil-binsearch: remove the files
Eric Leblond [Thu, 27 Dec 2018 20:49:31 +0000 (21:49 +0100)] 
util-binsearch: remove the files

6 years agodoc: add _static dir to make dist
Eric Leblond [Thu, 27 Dec 2018 20:44:09 +0000 (21:44 +0100)] 
doc: add _static dir to make dist

6 years agoebpf: include files in make dist 3601/head
Eric Leblond [Thu, 27 Dec 2018 13:19:46 +0000 (14:19 +0100)] 
ebpf: include files in make dist

6 years agochangelog: update for 4.1.2 release suricata-4.1.2
Victor Julien [Thu, 20 Dec 2018 17:57:46 +0000 (18:57 +0100)] 
changelog: update for 4.1.2 release

6 years agosmb: improve request/response mapping 3593/head
Victor Julien [Thu, 20 Dec 2018 08:11:21 +0000 (09:11 +0100)] 
smb: improve request/response mapping

Only use ssn_id and msg_id for mapping a response to a request.

By not using the tree_id it can always be included in the tx.hdr which
means it can be logged properly in case of IOCTL and DCERPC.

6 years agodoc: add missing and fix 404 for --list-keywords
Travis Green [Thu, 20 Dec 2018 01:41:28 +0000 (18:41 -0700)] 
doc: add missing and fix 404 for --list-keywords

6 years agodoc: added tos keyword
Travis Green [Thu, 20 Dec 2018 00:45:11 +0000 (17:45 -0700)] 
doc: added tos keyword

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2583

6 years agoFixes other affected tests for smtp pipelining 3590/head
Philippe Antoine [Wed, 5 Dec 2018 09:22:18 +0000 (10:22 +0100)] 
Fixes other affected tests for smtp pipelining

Either checking state has pipelining
Or removing pipelining from input

6 years agosmtp: improve pipelining support
Philippe Antoine [Wed, 5 Dec 2018 08:31:56 +0000 (09:31 +0100)] 
smtp: improve pipelining support

Fixes #1863

6 years agoproto/detect: workaround dns misdetected as dcerpc
Victor Julien [Wed, 19 Dec 2018 10:49:42 +0000 (11:49 +0100)] 
proto/detect: workaround dns misdetected as dcerpc

The DCERPC UDP detection would misfire on DNS with transaction
ID 0x0400. This would happen as the protocol detection engine
gives preference to pattern based detection over probing parsers for
performance reasons.

This hack/workaround fixes this specific case by still running the
probing parser if DCERPC has been detected on UDP. The probing
parser result will take precedence.

Bug #2736.

6 years agoteredo: be stricter on what to consider valid teredo
Victor Julien [Wed, 19 Dec 2018 08:45:35 +0000 (09:45 +0100)] 
teredo: be stricter on what to consider valid teredo

Invalid Teredo can lead to valid DNS traffic (or other UDP traffic)
being misdetected as Teredo. This leads to false negatives in the
UDP payload inspection.

Make the teredo code only consider a packet teredo if the encapsulated
data was decoded without any 'invalid' events being set.

Bug #2736.

6 years agodetect: fix crash during startup with malformed yaml
Victor Julien [Tue, 18 Dec 2018 20:08:19 +0000 (21:08 +0100)] 
detect: fix crash during startup with malformed yaml

detect-engine:
  custom-values:
    toclient-groups: 200
    toserver-groups: 200

Bug #2745

6 years agouserguide/install: add rust, python-yaml to ubuntu 3588/head
Victor Julien [Tue, 18 Dec 2018 15:01:19 +0000 (16:01 +0100)] 
userguide/install: add rust, python-yaml to ubuntu

6 years agooffloading: on bsd, disable rxcsum and v6 variants
Victor Julien [Sat, 15 Dec 2018 14:57:31 +0000 (15:57 +0100)] 
offloading: on bsd, disable rxcsum and v6 variants

6 years agooffloading: don't set multiple times per interface
Victor Julien [Sat, 15 Dec 2018 14:20:39 +0000 (15:20 +0100)] 
offloading: don't set multiple times per interface

This could happen with netmap igb0->igb0^ IPS mode.

6 years agochangelog: update for 4.1.1 suricata-4.1.1
Victor Julien [Mon, 17 Dec 2018 09:13:31 +0000 (10:13 +0100)] 
changelog: update for 4.1.1

6 years agodetect: fix content inspection flags 3584/head
Victor Julien [Thu, 13 Dec 2018 10:23:03 +0000 (11:23 +0100)] 
detect: fix content inspection flags

Fix generic inspect function content inspection flags so that
streaming buffers work correctly.

6 years agodetect/rawbytes: improve error message plus do minor cleanups
Victor Julien [Fri, 14 Dec 2018 09:22:39 +0000 (10:22 +0100)] 
detect/rawbytes: improve error message plus do minor cleanups

6 years agodetect/file-data: fix enabling http body tracking
Victor Julien [Thu, 13 Dec 2018 10:16:04 +0000 (11:16 +0100)] 
detect/file-data: fix enabling http body tracking

6 years agoKrb5: make TCP probing function less strict, messages can be fragmented 3583/head
Pierre Chifflier [Thu, 13 Dec 2018 19:30:29 +0000 (20:30 +0100)] 
Krb5: make TCP probing function less strict, messages can be fragmented

6 years agodetect/parse: error out on unused sticky buffers 3580/head
Victor Julien [Wed, 28 Nov 2018 09:02:57 +0000 (10:02 +0100)] 
detect/parse: error out on unused sticky buffers

6 years agodetect/prefilter: add closing debug return statement
Victor Julien [Tue, 27 Nov 2018 15:09:54 +0000 (16:09 +0100)] 
detect/prefilter: add closing debug return statement

6 years agoyaml: add missing eve pcap-file comment
Victor Julien [Mon, 10 Dec 2018 20:24:38 +0000 (21:24 +0100)] 
yaml: add missing eve pcap-file comment

6 years agocapture: fix mtu plus sign names for non-netmap
Victor Julien [Mon, 10 Dec 2018 19:43:37 +0000 (20:43 +0100)] 
capture: fix mtu plus sign names for non-netmap

Bug #2502.

6 years agostats: more accurate interval handling 3577/head
Victor Julien [Sat, 8 Dec 2018 17:51:23 +0000 (18:51 +0100)] 
stats: more accurate interval handling

In the stats loop sleep for a time period more closely matching
the stats.interval setting. Fix an off by one that would make
the loop wake up ~1 second early.

Bug #2716

6 years agocheck-setup: fix script names for .sh to .py
Jason Ish [Fri, 7 Dec 2018 23:59:35 +0000 (17:59 -0600)] 
check-setup: fix script names for .sh to .py

6 years agotravis: update rust version to 1.24.1 and 1.31.0.
Jason Ish [Fri, 7 Dec 2018 16:42:40 +0000 (10:42 -0600)] 
travis: update rust version to 1.24.1 and 1.31.0.

1.24.1 is now the oldest version we test support for. All major
distributions appear to be at this version or new.

With the release of 1.31.0 just out, test that as the most
recent version.

6 years agodns json v2 (C) - log rrtype in response
Jason Ish [Fri, 7 Dec 2018 15:26:31 +0000 (09:26 -0600)] 
dns json v2 (C) - log rrtype in response

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2723

6 years agorust/dns/v2 - log rrtype in response
Jason Ish [Fri, 7 Dec 2018 15:25:56 +0000 (09:25 -0600)] 
rust/dns/v2 - log rrtype in response

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2723

6 years agodns/rust - if let Some over options instead of loop.
Jason Ish [Fri, 7 Dec 2018 15:08:16 +0000 (09:08 -0600)] 
dns/rust - if let Some over options instead of loop.

Except in one case where the loop makes more sense for easy break
out.

Also remove one line of non-conforming debug logging.

6 years agorust/dns/lua - fix call convention to match C.
Jason Ish [Thu, 6 Dec 2018 17:16:00 +0000 (11:16 -0600)] 
rust/dns/lua - fix call convention to match C.

Also, when requesting the query, if the request doesn't exist,
return the query from the response. This makes it behave
more like C implementation.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2730

6 years agorust/dns: add v1 dns logging
Jason Ish [Mon, 3 Dec 2018 16:34:36 +0000 (10:34 -0600)] 
rust/dns: add v1 dns logging

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2704

6 years agounix: fix deadlock in unix runmode on many cores 3576/head
Victor Julien [Sun, 9 Dec 2018 08:05:44 +0000 (09:05 +0100)] 
unix: fix deadlock in unix runmode on many cores

Same issue as in 7f8795c7563827f090d8679cb35847af0085fc56, with the
solution now also applied to the unix socket runmode.

Bug #2734

6 years agooutput/tx: fix multi-instance logger output
Victor Julien [Fri, 7 Dec 2018 12:18:37 +0000 (13:18 +0100)] 
output/tx: fix multi-instance logger output

Fix transactions not being logged after the first tx logger had
logged.

6 years agoapp-layer: improve transaction cleanup handling
Victor Julien [Thu, 6 Dec 2018 14:35:40 +0000 (15:35 +0100)] 
app-layer: improve transaction cleanup handling

The app layers with a custom iterator would skip a tx if during
the ..Cleanup() pass a transaction was removed.

Address this by storing the current index instead of the next
index. Also pass in the next "min_tx_id" to be incremented from
the last TX. Update loops to do this increment.

Also make sure that the min_id is properly updated if the last
TX is removed when out of order.

Finally add a SMB unittest to test this.

Reported by: Ilya Bakhtin

6 years agoapp-layer: fix tx tracking updates in tx cleanup
Victor Julien [Wed, 5 Dec 2018 21:09:15 +0000 (22:09 +0100)] 
app-layer: fix tx tracking updates in tx cleanup

Fix min_id not getting updated in all cases.

Reported by: Ilya Bakhtin

6 years agoapp-layer: add debug statements to tx cleanup logic
Victor Julien [Wed, 5 Dec 2018 21:07:53 +0000 (22:07 +0100)] 
app-layer: add debug statements to tx cleanup logic

6 years agounittests/app-layer: add helper to get app tx trackers
Victor Julien [Wed, 5 Dec 2018 21:05:49 +0000 (22:05 +0100)] 
unittests/app-layer: add helper to get app tx trackers

6 years agouserguide: updated hyperscan version reference 3571/head
jason taylor [Tue, 4 Dec 2018 20:01:55 +0000 (15:01 -0500)] 
userguide: updated hyperscan version reference

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agoUpdated link for Prelude SIEM
Travis Green [Mon, 3 Dec 2018 22:51:10 +0000 (15:51 -0700)] 
Updated link for Prelude SIEM

Updated link for Prelude SIEM to https://www.prelude-siem.org/

6 years agodetect-depth: remove semi coma from desc 3570/head
Eric Leblond [Mon, 12 Nov 2018 22:09:11 +0000 (23:09 +0100)] 
detect-depth: remove semi coma from desc

It was breaking the CSV export.

6 years agodoc: fix some links in list-keywords command
Eric Leblond [Sun, 11 Nov 2018 17:49:39 +0000 (18:49 +0100)] 
doc: fix some links in list-keywords command

6 years agosuricata.yaml: fix path to XDP doc 3567/head
Eric Leblond [Tue, 4 Dec 2018 16:08:40 +0000 (17:08 +0100)] 
suricata.yaml: fix path to XDP doc

6 years agoutil-bpf: workaround OpenBSD old libpcap
Eric Leblond [Mon, 3 Dec 2018 17:06:16 +0000 (18:06 +0100)] 
util-bpf: workaround OpenBSD old libpcap

OpenBSD is not using a pcap_compile_* function so we can just
comment the code for OpenBSD users.

6 years agoaf-packet: remove unused field in AFPThreadVars
Eric Leblond [Thu, 22 Nov 2018 14:00:11 +0000 (15:00 +0100)] 
af-packet: remove unused field in AFPThreadVars

6 years agoconfigure.ac: better llc binary detection
Eric Leblond [Tue, 23 Oct 2018 04:39:18 +0000 (06:39 +0200)] 
configure.ac: better llc binary detection

llc is needed to build the ebpf files and current autoconf code
was not working properly on Debian.

6 years agoaf-packet: remove years old todos
Eric Leblond [Fri, 12 Oct 2018 17:34:43 +0000 (19:34 +0200)] 
af-packet: remove years old todos

6 years agonetmap: use custom BPF compile function
Eric Leblond [Wed, 10 Oct 2018 22:17:59 +0000 (00:17 +0200)] 
netmap: use custom BPF compile function

6 years agoaf-packet: use the new BPF compilation function
Eric Leblond [Wed, 10 Oct 2018 22:12:00 +0000 (00:12 +0200)] 
af-packet: use the new BPF compilation function

6 years agoutil-bpf: introduce custom BPF compile functions
Eric Leblond [Wed, 10 Oct 2018 22:10:54 +0000 (00:10 +0200)] 
util-bpf: introduce custom BPF compile functions

We can't get error from pcap_compile_nopcap() so let's get our
own function and output message.

6 years agoaf-packet: micro optimization
Eric Leblond [Wed, 10 Oct 2018 17:26:29 +0000 (19:26 +0200)] 
af-packet: micro optimization

Use a else if instead of two chained if constructs.

6 years agoaf-packet: improve error handling
Eric Leblond [Mon, 8 Oct 2018 21:51:37 +0000 (23:51 +0200)] 
af-packet: improve error handling

Stress condition in Suricata could lead to interface to disconnect
when it is not necessary. This patch updates the error handling
code to try to continue reading when such a case occurs.

6 years agobypass:added new documentation reference 3563/head
jason taylor [Tue, 27 Nov 2018 19:35:35 +0000 (14:35 -0500)] 
bypass:added new documentation reference

Documentation didn't previously exist for the bypass keyword

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agodebug/log: add log level for JSON type
Eric Urban [Mon, 12 Nov 2018 18:38:50 +0000 (12:38 -0600)] 
debug/log: add log level for JSON type

resolves #2671

6 years agoconfigure: allow for --disable-suricata-update
Jason Ish [Sun, 25 Nov 2018 15:03:22 +0000 (09:03 -0600)] 
configure: allow for --disable-suricata-update

This is to prevent suricata-update from being installed if it
would otherwise be installed based on in being bundled, and
its dependencies being available.

Warn the user that Suricata-Update will not be installed if it
is bundled, but python-yaml is missing (this will also cover
the case where Python is missing).

Add "Install suricata-update" to the build summary. For consistency,
relable "Suricatasc install" as "Install suricatasc".

6 years agoconfigure: check for python-yaml
Jason Ish [Sat, 24 Nov 2018 18:06:46 +0000 (12:06 -0600)] 
configure: check for python-yaml

Don't install suricata-update if python-yaml does not
exist.

6 years agoconfigure: print datarootdir
Jason Ish [Fri, 16 Nov 2018 18:32:01 +0000 (10:32 -0800)] 
configure: print datarootdir

This is relevant now as its where Suricata engine rules
get installed.

6 years agodetect/mpm: fix fast_pattern handling of len >255
Victor Julien [Sat, 1 Dec 2018 09:06:54 +0000 (10:06 +0100)] 
detect/mpm: fix fast_pattern handling of len >255

The fast pattern selection logic would truncate a patterns len to
255 leading to assigning the same pid to different patterns.

This in turn would be caught by the hyperscan setup code which would
abort.

Bug #2714.

6 years agorust/filetracker: remove reachable panic 3561/head
Victor Julien [Fri, 30 Nov 2018 10:59:17 +0000 (11:59 +0100)] 
rust/filetracker: remove reachable panic

Remove reachable panic condition when an existing file chunk is not
completed. Instead trunc the file and reset.

Related to bug #2717

6 years agonfs: improve file tracking under packet loss
Victor Julien [Fri, 30 Nov 2018 10:38:04 +0000 (11:38 +0100)] 
nfs: improve file tracking under packet loss

In case of packet loss during an in-progress chunk the file tracker
could loose track of a file because it couldn't map the XID to a
file handle.

The file tracker would then panic if a new file was opened, as
it noticed the last chunk wasn't yet complete.

This patch tracks the file handle for a in-progress chunk in the
state, just like the tracking of the size that is left.

Bug #2717