Tom DeCanio [Fri, 16 Sep 2016 12:24:50 +0000 (05:24 -0700)]
util-decode-mime: remove quote from boundary= string.
remove quote from the end of the boundary= string. This was throwing off
the mime parser so that it wouldn't always catch mime boundaries causing
things like missed attachments.
Eric Leblond [Tue, 31 May 2016 13:02:12 +0000 (15:02 +0200)]
unix-socket: add auto mode
When running in live mode, the new default 'auto' value of
unix-command.enabled causes unix-command to be activated. This
will allow users of live capture to benefit from the feature and
result in no side effect for user running in offline capture.
Andreas Herz [Sat, 23 Jul 2016 19:59:12 +0000 (21:59 +0200)]
rule-reload: remember pending USR2 signals
We did ignore additional USR2 signals while a rule-reload was running.
This changes the counter to be incremented with every additional USR2
signal so we don't ignore them anymore but it's still limited to prevent
huge overload or even overflow.
Jason Ish [Mon, 19 Sep 2016 13:47:24 +0000 (07:47 -0600)]
defrag: use frag_pkt_too_large instead of frag_too_large
The rules were using the wrong decoder event type, which was
only set in the unlikely event of a complete overlap, which
really had nothing to do with being too large.
Remove FRAG_TOO_LARGE as its no longer being used, an overlap
event is already set in the case where this event would be set.
Jason Ish [Mon, 6 Jun 2016 19:58:37 +0000 (13:58 -0600)]
logging: use a single entry point for all loggers
Introduces a new thread module, TMM_LOGGER, which is the
root most logger.
Only handles loggers in the packet path, stats and flow
logging are not included.
The loggers are made up of a hierarchy of loggers. At the top we
have the root logger which is the main entry point to
logging. Under the root there exists parent loggers that are the
entry point for specific types of loggers such as packet logger,
transaction loggers, etc. Each parent logger may have 0 or more
loggers that actual handle the job of producing output to something
like a file.
Victor Julien [Wed, 13 Jul 2016 19:07:11 +0000 (21:07 +0200)]
threading: remove thread restart logic
Thread restarts never worked well and the rest of the engine was
never really expecting errors to lead to thread restarts. Either
and error is recoverable in the thread, or not at all.
So this patch removes the functionality completely.
Eric Leblond [Fri, 16 Sep 2016 09:47:20 +0000 (11:47 +0200)]
coccinelle: add siginit test
Add a test that check an inversion during keyword setup where
we add a sigmatch to a signature and then do error handling on it.
This was causing a double free of some elements and ultimately a
segfault.
Jason Ish [Tue, 13 Sep 2016 23:09:58 +0000 (17:09 -0600)]
hostbits: fail parse on unexpected trailing data
Address issue https://redmine.openinfosecfoundation.org/issues/1889
for hostbits. This involves updating the regular expresssion
to capture any trailing data as the regex already keeps
spaces out of the name.
A unit test was converted to new macros to find out which
line it was failing at after updating regex.
To catch the issue where the ';' is missing we have to expand the
regex to capture the whole name string, not just the leading
valid stuff. Then verify that there are no spaces in the name
(Snort has the same restriction) and fail if there is.
Victor Julien [Tue, 6 Sep 2016 09:29:09 +0000 (11:29 +0200)]
eve-drop: allow logging all drops
- drop:
alerts: yes # log alerts that caused drops
flows: all # start or all: 'start' logs only a single drop
# per flow direction. All logs each dropped pkt.
Jason Ish [Mon, 5 Sep 2016 13:41:33 +0000 (07:41 -0600)]
icmpv6: fix checksum verification if fcs present
Calculate the length of the ICMPv6 packet from decoded information
instead of off the wire length. This will provide the correct
length if trailing data like an FCS is present.
Victor Julien [Tue, 30 Aug 2016 17:35:18 +0000 (19:35 +0200)]
detect: fix ICMP error handling issue
The first packet in both directions of a flow looks up the rule group
(sgh) and stores it in the flow. This makes sure the lookup doesn't
have to be performed for each packet.
ICMPv4 error messages are connected to the TCP or UDP flow they apply
to. In the case of such an ICMP error being the first packet in a
flow's direction, this would lead to an issue.
The packet would look up the rule group based on the ICMP protocol,
not based on the embedded TCP/UDP. This makes sense, as the ICMP
packet is inspected as ICMP packet. The consequence however, was that
this rule group pointer (sgh) would be stored in the flow. This is
wrong, as TCP/UDP packets that follow the ICMP packet would have no sgh
or the wrong sgh.
In normal traffic this shouldn't normally happen, but it could be
used to evade Suricata's inspection.