]>
git.ipfire.org Git - thirdparty/suricata.git/log
Jason Ish [Mon, 19 Sep 2016 16:45:05 +0000 (10:45 -0600)]
pcre: fix missing quote in pcre unit test
Victor Julien [Thu, 22 Sep 2016 08:45:29 +0000 (10:45 +0200)]
file-hashing: restore 'force-md5'
We don't want to break existing setups.
Do issue a warning that a new option is available.
Victor Julien [Thu, 22 Sep 2016 08:26:56 +0000 (10:26 +0200)]
file: introduce common flags handling function
Victor Julien [Thu, 22 Sep 2016 08:26:12 +0000 (10:26 +0200)]
common: introduce BIT_U16
Duarte Silva [Tue, 24 May 2016 17:58:13 +0000 (19:58 +0200)]
file-hashing: added configuration options and common parsing code
Duarte Silva [Fri, 29 Apr 2016 20:23:55 +0000 (22:23 +0200)]
file-hashing: added support for SHA-256 file hashing
Duarte Silva [Fri, 29 Apr 2016 19:51:12 +0000 (21:51 +0200)]
file-hashing: added support for SHA-1 file hashing
Duarte Silva [Fri, 29 Apr 2016 19:23:12 +0000 (21:23 +0200)]
file-hashing: common code added
Moved and adapted code from detect-filemd5 to util-detect-file-hash,
generalised code to work with SHA-1 and SHA-256 and added necessary
flags and other constants.
Mats Klepsland [Mon, 8 Aug 2016 08:04:17 +0000 (10:04 +0200)]
tls: add unit tests for tls_cert_issuer
Mats Klepsland [Mon, 8 Aug 2016 07:52:51 +0000 (09:52 +0200)]
tls: add unit tests for tls_cert_subject
Mats Klepsland [Thu, 21 Jul 2016 08:28:33 +0000 (10:28 +0200)]
tls: add (mpm) keyword tls_cert_subject
This keyword is a replacement for tls.subject.
Mats Klepsland [Thu, 21 Jul 2016 07:24:40 +0000 (09:24 +0200)]
tls: add (mpm) keyword tls_cert_issuer
This keyword is a replacement for tls.issuerdn.
Victor Julien [Fri, 10 Jun 2016 13:49:21 +0000 (15:49 +0200)]
iponly: fix unittests
Victor Julien [Fri, 10 Jun 2016 10:32:25 +0000 (12:32 +0200)]
detect: optimize rule address parsing
Many rules have the same address vars, so instead of parsing them
each time use a hash to store the string and the parsed result.
Rules now reference the stored result in the hash table.
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.
Eric Leblond [Tue, 31 May 2016 12:47:58 +0000 (14:47 +0200)]
util-time: new function to know if live or offline
Andreas Herz [Sun, 12 Jun 2016 18:55:16 +0000 (20:55 +0200)]
configure: set correct cppflags for enabled nfqueue
This change sets the correct CPPFLAGS received by PKG_CHECK to resolve
building issues with some systems like OpenSuse.
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.
Victor Julien [Mon, 12 Sep 2016 16:15:01 +0000 (18:15 +0200)]
decoder-event: BUG_ON on table mismatches
Abort when the event enum and the name<>event table are not matching.
Jason Ish [Mon, 12 Sep 2016 16:39:14 +0000 (10:39 -0600)]
setup-app-layer-logger.sh: update for logging changes
Jason Ish [Wed, 24 Aug 2016 14:39:39 +0000 (08:39 -0600)]
logging: proper failure on memory allocation error
unwinds all previous logger allocations
Jason Ish [Fri, 15 Jul 2016 14:14:03 +0000 (08:14 -0600)]
flow-vars: remove flow locks
Code is now entered under flow lock.
Jason Ish [Fri, 15 Jul 2016 14:13:16 +0000 (08:13 -0600)]
flow-bits: remove flow locks
Code is now entered under flow lock.
Jason Ish [Thu, 14 Jul 2016 15:53:59 +0000 (09:53 -0600)]
lua: remove flow locking from the lua layer
Jason Ish [Wed, 13 Jul 2016 23:07:45 +0000 (17:07 -0600)]
stream: remove lock from StreamTcpSegmentForEach
This is only entered from logging functions which are already
called with a locked flow.
Jason Ish [Wed, 13 Jul 2016 16:48:14 +0000 (10:48 -0600)]
logging: remove the packetqueue's from the logging path
They are not referenced by any loggers, and they probably
shouldn't be either.
Jason Ish [Mon, 20 Jun 2016 15:52:28 +0000 (09:52 -0600)]
logging: hook into flow worker thread
Jason Ish [Wed, 8 Jun 2016 19:56:35 +0000 (13:56 -0600)]
output-streaming: free thread store on deinit
Jason Ish [Tue, 7 Jun 2016 23:20:23 +0000 (17:20 -0600)]
logging: rename registration functions to not have tmm
As the logging modules are no longer threading modules, rename
them so they don't look like they are being registered as
threading modules.
Also, move the registration to the output.c which will handle
registration of the loggers.
Jason Ish [Tue, 7 Jun 2016 20:56:17 +0000 (14:56 -0600)]
logging: convert pcap log to non-thread module
Jason Ish [Tue, 7 Jun 2016 20:55:18 +0000 (14:55 -0600)]
logging: just return if no tx loggers
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.
Jason Ish [Mon, 6 Jun 2016 20:38:56 +0000 (14:38 -0600)]
logging: remove output priorities: not used
Jason Ish [Fri, 3 Jun 2016 21:38:02 +0000 (15:38 -0600)]
logging: remove dead code from output-json
The "parent" json logger was setup like a real logger, but
some of that code was never being called.
Jason Ish [Sun, 29 May 2016 06:11:03 +0000 (00:11 -0600)]
output.[ch]: consistent style
- Clean up function declaration.
- Consistenly use typedefs for function points.
No functional changes.
Jason Ish [Sat, 28 May 2016 00:57:06 +0000 (18:57 -0600)]
logging: add profiling back for non-tmm loggers
The loggers moved away from a TMM required a new
profiling support.
Jason Ish [Tue, 31 May 2016 16:23:34 +0000 (10:23 -0600)]
logging: convert lua output to non-thread module
Jason Ish [Fri, 3 Jun 2016 16:48:10 +0000 (10:48 -0600)]
logging: convert tls log to non-thread module
Jason Ish [Fri, 27 May 2016 19:16:22 +0000 (13:16 -0600)]
logging: convert alert debug log to non-thread module
Jason Ish [Fri, 27 May 2016 19:12:06 +0000 (13:12 -0600)]
logging: convert tcp data logging to non-thread module
Jason Ish [Fri, 27 May 2016 19:03:58 +0000 (13:03 -0600)]
logging: convert tls store logging to non-thread module
Jason Ish [Fri, 27 May 2016 18:55:50 +0000 (12:55 -0600)]
logging: convert file data logging to non-thread module
Jason Ish [Fri, 27 May 2016 17:59:13 +0000 (11:59 -0600)]
logging: convert file logging to non-thread module
Jason Ish [Fri, 27 May 2016 16:45:11 +0000 (10:45 -0600)]
logging: convert unified2 to non-thread module
Jason Ish [Fri, 27 May 2016 16:39:50 +0000 (10:39 -0600)]
logging: convert stats loggers to non-thread module
Jason Ish [Fri, 27 May 2016 16:21:19 +0000 (10:21 -0600)]
logging: convert http log to non-thread module
Jason Ish [Fri, 27 May 2016 16:17:21 +0000 (10:17 -0600)]
logging: convert alert syslog to non-thread module
Jason Ish [Fri, 27 May 2016 16:10:02 +0000 (10:10 -0600)]
logging: convert drop output to non-thread module
Jason Ish [Fri, 27 May 2016 16:05:44 +0000 (10:05 -0600)]
logging: convert json template output to non-thread module
Jason Ish [Fri, 27 May 2016 16:01:54 +0000 (10:01 -0600)]
tests: setup unit test framework earlier
Allows tests to be registered early, in support of moving
outputs away from thread modules.
Jason Ish [Fri, 27 May 2016 08:05:30 +0000 (02:05 -0600)]
logging: convert json drop output to non-thread module
Jason Ish [Fri, 27 May 2016 08:01:52 +0000 (02:01 -0600)]
logging: convert json smtp output to non-thread module
Jason Ish [Fri, 27 May 2016 08:00:24 +0000 (02:00 -0600)]
logging: convert json ssh output to non-thread module
Jason Ish [Fri, 27 May 2016 07:54:36 +0000 (01:54 -0600)]
logging: convert json netflow output to non-thread module
Jason Ish [Fri, 27 May 2016 07:52:01 +0000 (01:52 -0600)]
logging: convert json flow output to non-thread module
Jason Ish [Fri, 27 May 2016 07:33:10 +0000 (01:33 -0600)]
logging: convert json alert output to non-thread module
Jason Ish [Fri, 27 May 2016 07:18:22 +0000 (01:18 -0600)]
logging: convert json tls output to non-thread module
Jason Ish [Fri, 27 May 2016 07:07:10 +0000 (01:07 -0600)]
logging: convert prelude output to non-thread module
Jason Ish [Fri, 27 May 2016 07:03:13 +0000 (01:03 -0600)]
logging: convert eve http to non-thread module
Jason Ish [Fri, 27 May 2016 04:26:04 +0000 (22:26 -0600)]
logging: convert eve dns logging to non-thread module
Jason Ish [Thu, 26 May 2016 16:45:55 +0000 (10:45 -0600)]
logging: convert fast log to a non-thread module
Jason Ish [Thu, 26 May 2016 05:32:48 +0000 (23:32 -0600)]
logging: convert dns log to a non-thread module
Victor Julien [Fri, 16 Sep 2016 16:29:18 +0000 (18:29 +0200)]
detect: mark alproto in keyword reg deprecated
No existing code uses it, and it had been useless for some time.
Victor Julien [Fri, 16 Sep 2016 16:27:47 +0000 (18:27 +0200)]
gitignore: update to hide more local files
Victor Julien [Fri, 16 Sep 2016 16:24:29 +0000 (18:24 +0200)]
detect: don't set alproto while registering keyword
The field is not used except for some printing, and is wrong for
many keywords.
Victor Julien [Fri, 16 Sep 2016 13:13:33 +0000 (15:13 +0200)]
detect file: enable HTTP inspection from validate func
Victor Julien [Fri, 16 Sep 2016 12:40:35 +0000 (14:40 +0200)]
detect file: enforce protocol in single place
Instead of trying to enforce the app layer protocol in each file
function, enforce it in the generic validation function.
Victor Julien [Fri, 16 Sep 2016 12:39:56 +0000 (14:39 +0200)]
app-layer: add function to check if app-layer supports files
Victor Julien [Thu, 14 Jul 2016 08:36:54 +0000 (10:36 +0200)]
threads: remove EngineKill & SURICATA_KILL
EngineStop and EngineKill were effectively doing the same, so
removed the kill variant.
Victor Julien [Thu, 14 Jul 2016 07:49:21 +0000 (09:49 +0200)]
threads: failed thread is a fatal error now
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.
Victor Julien [Mon, 19 Sep 2016 10:37:12 +0000 (12:37 +0200)]
Open Suricata 3.2 development branch
Victor Julien [Mon, 19 Sep 2016 07:12:28 +0000 (09:12 +0200)]
magic: fix broken tests after CentOS6 update
Victor Julien [Mon, 12 Sep 2016 16:10:51 +0000 (18:10 +0200)]
mpls: add missing event type + rule
Victor Julien [Thu, 8 Sep 2016 08:39:51 +0000 (10:39 +0200)]
bpf: fix file parsing memory handling
Fix improper fread string handling. Improve error handling.
Skip trailing spaces for slightly more pretty printing.
Coverity CID 400763.
Thanks to Steve Grubb for helping address this issue.
Victor Julien [Thu, 1 Sep 2016 13:06:11 +0000 (15:06 +0200)]
detect: don't print (null) in --list-keywords=all
Eric Leblond [Fri, 16 Sep 2016 11:34:09 +0000 (13:34 +0200)]
detect: fix setup for some keywords
Fix problems found by siginit.cocci.
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.
Proposed-by: Victor Julien <victor@inliniac.net>
Jason Ish [Thu, 15 Sep 2016 17:19:12 +0000 (11:19 -0600)]
detect-flowbits: more unittest macro usage
Also cleanup some tests by removing extra code after a test was
determined to fail.
Jason Ish [Thu, 15 Sep 2016 16:40:22 +0000 (10:40 -0600)]
hostbits: use new unittest macros
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.
Jason Ish [Tue, 13 Sep 2016 16:57:09 +0000 (10:57 -0600)]
flowbits: validate that there are no spaces in the name
Fixes issue: https://redmine.openinfosecfoundation.org/issues/1889
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.
Eric Leblond [Wed, 14 Sep 2016 13:09:47 +0000 (15:09 +0200)]
unix-manager: fix output of version command
Make it consistent with the output of version command line flag.
Andreas Herz [Wed, 7 Sep 2016 20:17:01 +0000 (22:17 +0200)]
rule-parsing: reject unescaped double quote within content section
Victor Julien [Tue, 6 Sep 2016 15:52:45 +0000 (17:52 +0200)]
Update Changelog for 3.1.2
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.
Victor Julien [Tue, 6 Sep 2016 08:29:57 +0000 (10:29 +0200)]
dns: use nonnull attr for log functions
Victor Julien [Tue, 6 Sep 2016 08:20:38 +0000 (10:20 +0200)]
dns: fix coverity warning
** CID
1372324 : Null pointer dereferences (FORWARD_NULL)
/src/output-json-dns.c: 532 in OutputAnswer()
________________________________________________________________________________________________________
*** CID
1372324 : Null pointer dereferences (FORWARD_NULL)
/src/output-json-dns.c: 532 in OutputAnswer()
526 }
527 }
528
529 /* reset */
530 MemBufferReset(aft->buffer);
531 json_object_set_new(djs, "dns", js);
>>> CID
1372324 : Null pointer dereferences (FORWARD_NULL)
>>> Dereferencing null pointer "entry".
532 if (likely(DNSRRTypeEnabled(entry->type, aft->dnslog_ctx->flags))) {
533 OutputJSONBuffer(djs, aft->dnslog_ctx->file_ctx, &aft->buffer);
534 }
535 json_object_del(djs, "dns");
536
537 return;
Move checks to the top of the functions. Should be more efficient too.
Victor Julien [Fri, 2 Sep 2016 10:47:11 +0000 (12:47 +0200)]
detect-template: modernize
Jason Ish [Wed, 31 Aug 2016 14:24:08 +0000 (08:24 -0600)]
app-layer templates: cleanups
- cleanup file headers
- add todo section
- convert unit tests to new macros
- add markers to remove disabled by default behaviour
Jason Ish [Mon, 5 Sep 2016 14:15:46 +0000 (08:15 -0600)]
decode-icmpv6: use FAIL macros in tests
Jason Ish [Mon, 5 Sep 2016 14:15:26 +0000 (08:15 -0600)]
unittest: FAIL macro to unconditionally fail a test
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.
Fixes issue:
https://redmine.openinfosecfoundation.org/issues/1849
Victor Julien [Mon, 5 Sep 2016 08:17:40 +0000 (10:17 +0200)]
affinity: fix compilation on SunOS
Victor Julien [Mon, 5 Sep 2016 08:17:16 +0000 (10:17 +0200)]
byteswap: fix compilation on SunOS
Victor Julien [Mon, 5 Sep 2016 08:16:30 +0000 (10:16 +0200)]
configure: detect SunOS and link against required libs
Victor Julien [Mon, 5 Sep 2016 08:15:52 +0000 (10:15 +0200)]
threads: provide SCGetThreadIdLong for SunOS
Victor Julien [Mon, 5 Sep 2016 08:15:23 +0000 (10:15 +0200)]
decode: declare IPPROTO_IPIP if OS doesn't have it