]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
9 years agooutput-json: constify API 1900/head
Victor Julien [Tue, 1 Mar 2016 16:31:33 +0000 (17:31 +0100)] 
output-json: constify API

9 years agoalert-debuglog: trigger rotation on non-decoder events as well
Jason Ish [Wed, 2 Mar 2016 15:54:07 +0000 (09:54 -0600)] 
alert-debuglog: trigger rotation on non-decoder events as well

The write handling was missed for non-decoder events that
would trigger rotation after a HUP.

9 years agogccprotect: fix SECLDFLAGS not getting used
Victor Julien [Thu, 3 Mar 2016 08:57:46 +0000 (09:57 +0100)] 
gccprotect: fix SECLDFLAGS not getting used

9 years agoapp-layer-smtp: fix memory leak
Eric Leblond [Tue, 1 Mar 2016 13:59:13 +0000 (14:59 +0100)] 
app-layer-smtp: fix memory leak

This patch fixes the following leak:

Direct leak of 9982880 byte(s) in 2902 object(s) allocated from:
    #0 0x4c253b in malloc ??:?
    #1 0x10c39ac in MimeDecInitParser /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/util-decode-mime.c:2379
    #2 0x6a0f91 in SMTPProcessRequest /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/app-layer-smtp.c:1085
    #3 0x697658 in SMTPParse /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/app-layer-smtp.c:1185
    #4 0x68fa7a in SMTPParseClientRecord /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/app-layer-smtp.c:1208
    #5 0x6561c5 in AppLayerParserParse /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/app-layer-parser.c:908
    #6 0x53dc2e in AppLayerHandleTCPData /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/app-layer.c:444
    #7 0xf8e0af in DoReassemble /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/stream-tcp-reassemble.c:2635
    #8 0xf8c3f8 in StreamTcpReassembleAppLayer /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/stream-tcp-reassemble.c:3028
    #9 0xf94267 in StreamTcpReassembleHandleSegmentUpdateACK /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/stream-tcp-reassemble.c:3404
    #10 0xf9643d in StreamTcpReassembleHandleSegment /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/stream-tcp-reassemble.c:3432
    #11 0xf578b4 in HandleEstablishedPacketToClient /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/stream-tcp.c:2245
    #12 0xeea3c7 in StreamTcpPacketStateEstablished /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/stream-tcp.c:2489
    #13 0xec1d38 in StreamTcpPacket /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/stream-tcp.c:4568
    #14 0xeb0e16 in StreamTcp /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/stream-tcp.c:5064
    #15 0xff52a4 in TmThreadsSlotVarRun /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/tm-threads.c:130
    #16 0xffdad1 in TmThreadsSlotVar /home/victor/qa/buildbot/donkey/z600fuzz/Private/src/tm-threads.c:474
    #17 0x7f7cd678d181 in start_thread /build/buildd/eglibc-2.19/nptl/pthread_create.c:312 (discriminator 2)

We come to this case when a SMTP session contains at least 2 mails
and then the ending of the first is not correctly detected. In that
case, switching to a new tx seems a good solution. This way we still
have partial logging.

9 years agoapp-layer-smtp: fix mem leak and add new alert
Eric Leblond [Tue, 1 Mar 2016 14:44:27 +0000 (15:44 +0100)] 
app-layer-smtp: fix mem leak and add new alert

If SMTP session is weird then we may reach a state where a field
like MAIL FROM is seen as duplicated.

Valgrind output is:

30 bytes in 1 blocks are definitely lost in loss record 96 of 399
   at 0x4C29C0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x4A5803: SMTPParseCommandWithParam (app-layer-smtp.c:996)
   by 0x4A4DCE: SMTPParseCommandMAILFROM (app-layer-smtp.c:1016)
   by 0x4A3F55: SMTPProcessRequest (app-layer-smtp.c:1127)
   by 0x4A1F8C: SMTPParse (app-layer-smtp.c:1191)
   by 0x493AD7: SMTPParseClientRecord (app-layer-smtp.c:1214)
   by 0x4878A6: AppLayerParserParse (app-layer-parser.c:908)
   by 0x42384E: AppLayerHandleTCPData (app-layer.c:444)
   by 0x8D7EAD: DoReassemble (stream-tcp-reassemble.c:2635)
   by 0x8D795F: StreamTcpReassembleAppLayer (stream-tcp-reassemble.c:3028)
   by 0x8D8BE0: StreamTcpReassembleHandleSegmentUpdateACK (stream-tcp-reassemble.c:3404)
   by 0x8D8F6E: StreamTcpReassembleHandleSegment (stream-tcp-reassemble.c:3432)

9 years agobuild: install app-layer-events.rules
Eric Leblond [Tue, 1 Mar 2016 08:12:53 +0000 (09:12 +0100)] 
build: install app-layer-events.rules

9 years agofile: fix flags type in API
Victor Julien [Mon, 14 Dec 2015 17:27:09 +0000 (18:27 +0100)] 
file: fix flags type in API

9 years agohttp: remove unused param from HtpBodyAppendChunk
Victor Julien [Fri, 13 Nov 2015 22:26:07 +0000 (23:26 +0100)] 
http: remove unused param from HtpBodyAppendChunk

9 years agospm: constify search args
Victor Julien [Fri, 13 Nov 2015 06:55:44 +0000 (07:55 +0100)] 
spm: constify search args

9 years agofile: shrink data structure
Victor Julien [Fri, 13 Nov 2015 09:33:21 +0000 (10:33 +0100)] 
file: shrink data structure

9 years agohtp file: constify name/data args
Victor Julien [Fri, 13 Nov 2015 06:58:15 +0000 (07:58 +0100)] 
htp file: constify name/data args

9 years agofile: constify data/name args
Victor Julien [Fri, 13 Nov 2015 06:56:36 +0000 (07:56 +0100)] 
file: constify data/name args

9 years agohttp body: use HTPCalloc
Victor Julien [Fri, 13 Nov 2015 21:53:55 +0000 (22:53 +0100)] 
http body: use HTPCalloc

9 years agohtp: add HTPCalloc wrapper
Victor Julien [Fri, 13 Nov 2015 16:11:08 +0000 (17:11 +0100)] 
htp: add HTPCalloc wrapper

9 years agomagic: make data arg const
Victor Julien [Mon, 30 Nov 2015 20:20:59 +0000 (21:20 +0100)] 
magic: make data arg const

9 years agodcerpc: cleanup list handling
Jason Ish [Tue, 1 Mar 2016 21:08:14 +0000 (15:08 -0600)] 
dcerpc: cleanup list handling

9 years agodcerpc: fix memory leak when called from smb
Jason Ish [Tue, 1 Mar 2016 20:36:17 +0000 (14:36 -0600)] 
dcerpc: fix memory leak when called from smb

When DCERPC was wrapped in SMB it wasn't being initialized or
cleaned up properly. To fix, expose DCERPC initialization and
cleanup functions for use by the SMB application layer.

Redmine ticket:
https://redmine.openinfosecfoundation.org/issues/1708

9 years agorule-parsing: quick fix for rules with wrong double quotes
Andreas Herz [Mon, 29 Feb 2016 21:37:24 +0000 (22:37 +0100)] 
rule-parsing: quick fix for rules with wrong double quotes

The stripping of leading and trailing "s has issues with rules like the
ones described in issue 1638 thus resulted in crashing the rule parser.
So for now this is a quick fix which approaches this issue directly by
stripping those "s correctly and handling error cases. It also adds the
skip for leading spaces at the msg keyword and worksaround a possible
null pointer dereference (that should never occur though).
A more general approach should be done in the future.

9 years agolua output: clean up memory at shutdown 1889/head
Victor Julien [Tue, 1 Mar 2016 11:53:02 +0000 (12:53 +0100)] 
lua output: clean up memory at shutdown

Lua module and submodules we're completely freed at exit, and nor
was the lua_State.

This patch does all the cleanup.

9 years agopcre: use pcre_free_study to free the study data 1887/head
Victor Julien [Tue, 1 Mar 2016 07:59:07 +0000 (08:59 +0100)] 
pcre: use pcre_free_study to free the study data

9 years agodetect ports: fix memory leak
Victor Julien [Mon, 29 Feb 2016 08:37:04 +0000 (09:37 +0100)] 
detect ports: fix memory leak

Fix mem leak on rules that contained ports like "![21,25,119]".

9 years agovlan: fix bad checks in unittests
Victor Julien [Sun, 28 Feb 2016 13:29:09 +0000 (14:29 +0100)] 
vlan: fix bad checks in unittests

9 years agonfqueue: fix wrong return value check in error cases 1883/head
Andreas Herz [Thu, 25 Feb 2016 20:33:36 +0000 (21:33 +0100)] 
nfqueue: fix wrong return value check in error cases

The check for the return value was wrong, we have 0 for success and 1
(and 2) for the error cases like TM_ECODE_FAILED, so we should quit
unless TM_ECODE_OK (0) is returned for NFQInitThread. This fixes #1870

9 years agomodbus: fix compiler uninitialized warnings with -Wmaybe-uninitialized
DIALLO David [Thu, 25 Feb 2016 09:37:52 +0000 (10:37 +0100)] 
modbus: fix compiler uninitialized warnings with -Wmaybe-uninitialized

All variables are initialized thanks to ModbusExtractUint8 or ModbusExtractUint16
function that extracts 8bits or 16bits data from pointer the received input data.
In case of extracting error (because of length), ModbusExtractUint8 or
ModbusExtractUint16 returns an error that is managed by the caller function.

All variables are now initialized to zero when they are declared. It does not
change anything functionnally but it removes Modbus warnings.

9 years agomake install-rules: update URL to https and 3.0
Victor Julien [Thu, 25 Feb 2016 14:01:29 +0000 (15:01 +0100)] 
make install-rules: update URL to https and 3.0

9 years agocuda: fix compilation
Victor Julien [Sat, 30 Jan 2016 16:54:41 +0000 (17:54 +0100)] 
cuda: fix compilation

9 years agocuda: update build system for modern versions
Victor Julien [Sat, 30 Jan 2016 16:28:28 +0000 (17:28 +0100)] 
cuda: update build system for modern versions

Remove support for compute capabilities below 2.0.

Add capabilities until 5.3.

9 years agoxff: fix address overwrite in forward case
Eric Leblond [Thu, 11 Feb 2016 10:44:12 +0000 (11:44 +0100)] 
xff: fix address overwrite in forward case

9 years agooutput-json-alert: fix segfault when alerts separated out from eve-log.
Tom DeCanio [Tue, 12 Jan 2016 19:25:47 +0000 (11:25 -0800)] 
output-json-alert: fix segfault when alerts separated out from eve-log.

9 years agooutput-json-http: Add JSON support for X-Flash-Version.
Tom DeCanio [Thu, 25 Feb 2016 01:15:09 +0000 (17:15 -0800)] 
output-json-http: Add JSON support for X-Flash-Version.
Supported as a custom field.

9 years agoAdd JSON support for X-Authenticated-User. Supported as a custom field.
Tom DeCanio [Tue, 1 Sep 2015 23:09:26 +0000 (16:09 -0700)] 
Add JSON support for X-Authenticated-User.  Supported as a custom field.

9 years agohttp: close file when http body limit is reached 1880/head
Giuseppe Longo [Wed, 24 Feb 2016 08:28:41 +0000 (09:28 +0100)] 
http: close file when http body limit is reached

In some conditions, if stream.reassembly.depth is greater than
request/response-body-limit size, the logging output is wrong
if filestore keyword is used with http.

For example, we get:
{... "app_proto":"http","fileinfo":{"filename":"\/file.pdf","state":"CLOSED","stored":false,"size":1049292,"tx_id":0}}

"state":"CLOSED","stored":false should be "state":"TRUNCATED","stored":true.

This happens because the file state and file flags,
which is the information that determine a correct output,
are not set properly since a file is logged before and then closed (HTPFileClose).

The logic of this patch is to close a file when we are above
the limits, such that the proper state and flags can be set
and the file will be logged correctly.

9 years agojson-drop-log: clean up memory at shutdown
Victor Julien [Wed, 24 Feb 2016 15:19:13 +0000 (16:19 +0100)] 
json-drop-log: clean up memory at shutdown

9 years agoflowbits: remove unused debugging code 1872/head
Victor Julien [Wed, 24 Feb 2016 12:39:10 +0000 (13:39 +0100)] 
flowbits: remove unused debugging code

9 years agoflowbits: fix memory leak
Victor Julien [Wed, 24 Feb 2016 11:45:47 +0000 (12:45 +0100)] 
flowbits: fix memory leak

Flowbits removed from a flow by 'toggle' or 'unset' were not actually
freed, leading a small memory leak.

9 years agoflowbits: optimize set and remove
Victor Julien [Wed, 24 Feb 2016 09:50:06 +0000 (10:50 +0100)] 
flowbits: optimize set and remove

9 years agobuild-info: workaround special _FORTIFY_SOURCE defines 1871/head
Andreas Herz [Tue, 23 Feb 2016 22:27:59 +0000 (23:27 +0100)] 
build-info: workaround special _FORTIFY_SOURCE defines

On systems like Gentoo where _FORTIFY_SOURCE is already defined like
FORTIFY_SOURCE=((defined __OPTIMIZE && OPTIMIZE > 0) ? 2 : 0) the use
within the printf function (%d) won't result in the correct value and
we end up with 'defined' undeclared compile error. This workaround makes
sure that just the resolved value is checked and then printed.

9 years agopcre: work around harmless coverity warnings 1869/head
Victor Julien [Tue, 23 Feb 2016 11:12:24 +0000 (12:12 +0100)] 
pcre: work around harmless coverity warnings

9 years agobpf: fix memleak on unusual error (CID 1197757)
Victor Julien [Tue, 23 Feb 2016 10:59:00 +0000 (11:59 +0100)] 
bpf: fix memleak on unusual error (CID 1197757)

9 years agolua: if pkg-config fails, try -llua
Victor Julien [Wed, 17 Feb 2016 13:27:10 +0000 (14:27 +0100)] 
lua: if pkg-config fails, try -llua

9 years agoconfigure: OS X fixes
Victor Julien [Wed, 17 Feb 2016 09:25:02 +0000 (10:25 +0100)] 
configure: OS X fixes

Remove unnecessary -lpthread from tests.

Make linker warnings non-fatal with -Werror.

9 years agohttp: fix NULL deref on certain out of memory conditions
Victor Julien [Thu, 18 Feb 2016 19:58:09 +0000 (20:58 +0100)] 
http: fix NULL deref on certain out of memory conditions

9 years agorunmode: fix memleak on live modes setup (CID 1197760)
Victor Julien [Tue, 23 Feb 2016 09:20:29 +0000 (10:20 +0100)] 
runmode: fix memleak on live modes setup (CID 1197760)

9 years agodetect-engine: free memory in error conditions (CID 1351210)
Victor Julien [Tue, 23 Feb 2016 09:09:24 +0000 (10:09 +0100)] 
detect-engine: free memory in error conditions (CID 1351210)

9 years agomulti-tenants: improve error handling (CID 1312702)
Victor Julien [Tue, 23 Feb 2016 09:05:48 +0000 (10:05 +0100)] 
multi-tenants: improve error handling (CID 1312702)

9 years agoconf: explicitly ignore retval (CID 1353490)
Victor Julien [Tue, 23 Feb 2016 08:52:09 +0000 (09:52 +0100)] 
conf: explicitly ignore retval (CID 1353490)

9 years agounix-manager: fix memleak in error case (CID 1353491)
Victor Julien [Tue, 23 Feb 2016 08:50:40 +0000 (09:50 +0100)] 
unix-manager: fix memleak in error case (CID 1353491)

9 years agopcre: blacklist 8.35 for JIT use (issue #1693)
Victor Julien [Tue, 23 Feb 2016 08:26:56 +0000 (09:26 +0100)] 
pcre: blacklist 8.35 for JIT use (issue #1693)

9 years agojansson: cleanup JSON_ESCAPE_SLASH use 1868/head
Victor Julien [Thu, 18 Feb 2016 11:42:31 +0000 (12:42 +0100)] 
jansson: cleanup JSON_ESCAPE_SLASH use

9 years agounix-socket: optimize response sends
Victor Julien [Thu, 18 Feb 2016 09:44:14 +0000 (10:44 +0100)] 
unix-socket: optimize response sends

Instead of sending responses to clients in small chunks, send it in
one big chunk. For this the JSON message is first serialized into
a MemBuffer before sending.

9 years agojson: make membuffer helper public
Victor Julien [Thu, 18 Feb 2016 09:36:20 +0000 (10:36 +0100)] 
json: make membuffer helper public

Make json_t to MemBuffer helper public so it can reused.

9 years agostats: fix dump-counters when no loggers are active
Victor Julien [Wed, 17 Feb 2016 21:33:54 +0000 (22:33 +0100)] 
stats: fix dump-counters when no loggers are active

9 years agounix-socket: restore dump-counters functionality
Victor Julien [Wed, 17 Feb 2016 19:45:09 +0000 (20:45 +0100)] 
unix-socket: restore dump-counters functionality

Create a eve.stats like output for dump-counters.

9 years agostats: export StatsToJSON
Victor Julien [Wed, 17 Feb 2016 19:25:47 +0000 (20:25 +0100)] 
stats: export StatsToJSON

9 years agojson-stats: split out json generation
Victor Julien [Wed, 17 Feb 2016 19:19:20 +0000 (20:19 +0100)] 
json-stats: split out json generation

Split out JSON generation logic so the code becomes reusable.

9 years agojansson: include in suricata-common.h
Victor Julien [Thu, 18 Feb 2016 10:58:07 +0000 (11:58 +0100)] 
jansson: include in suricata-common.h

9 years agoconfigure: warn if libpcre 8.35 is used
Andreas Herz [Sun, 21 Feb 2016 20:54:32 +0000 (21:54 +0100)] 
configure: warn if libpcre 8.35 is used

9 years agoyaml: disable rules by default
Travis Green [Wed, 10 Feb 2016 17:18:29 +0000 (10:18 -0700)] 
yaml: disable rules by default

Change to "disable by default" rulefiles

9 years agooutput-json-dns: add logging of NS answer record content.
Tom DeCanio [Thu, 18 Feb 2016 22:24:26 +0000 (14:24 -0800)] 
output-json-dns: add logging of NS answer record content.

9 years agodetect-tls-version: fix small resource leak
Andreas Herz [Tue, 16 Feb 2016 21:55:28 +0000 (22:55 +0100)] 
detect-tls-version: fix small resource leak

9 years agojson: use top-level sensor-name if provided. 1860/head
Jason Ish [Thu, 11 Feb 2016 20:45:23 +0000 (14:45 -0600)] 
json: use top-level sensor-name if provided.

Currently the default configuration file contains a "sensor-name"
at the root of the configuration file, however, eve-log will only
use it if its specified under eve-log.

Now we will look for it at the eve-log, if present we'll use it
but log a deprecation warning, if its not present we'll look
for sensor-name at the root of the configuration.

9 years agossh: fix string handling in unittest 1856/head
Victor Julien [Tue, 16 Feb 2016 21:23:16 +0000 (22:23 +0100)] 
ssh: fix string handling in unittest

9 years agotravis: set CFLAGS to error on cc warnings
Victor Julien [Tue, 16 Feb 2016 16:42:38 +0000 (17:42 +0100)] 
travis: set CFLAGS to error on cc warnings

9 years agoeve: fix mishandling of big messages
Victor Julien [Tue, 16 Feb 2016 15:50:48 +0000 (16:50 +0100)] 
eve: fix mishandling of big messages

When the string representation of a JSON message grew bigger than
64k, the JSON record would just be truncated. This lead to errors
in the parser(s) of the JSON stream.

This patch changes the buffer logic to grow the buffer on demand.

9 years agocounters: fix thread stats delta logging
Victor Julien [Tue, 16 Feb 2016 15:45:01 +0000 (16:45 +0100)] 
counters: fix thread stats delta logging

Just like with the global stats, store prev values. Fixes delta logging.

9 years agoqa: add leak sanitzer suppression 1851/head
Victor Julien [Fri, 12 Feb 2016 08:48:05 +0000 (09:48 +0100)] 
qa: add leak sanitzer suppression

9 years agowirefuzz: exit with error code on more issues
Victor Julien [Thu, 11 Feb 2016 17:51:15 +0000 (18:51 +0100)] 
wirefuzz: exit with error code on more issues

9 years agowirefuzz: logdir handling improvement
Victor Julien [Thu, 11 Feb 2016 08:46:44 +0000 (09:46 +0100)] 
wirefuzz: logdir handling improvement

9 years agowirefuzz: remove obsolete stream mem check
Victor Julien [Thu, 26 Nov 2015 17:59:34 +0000 (18:59 +0100)] 
wirefuzz: remove obsolete stream mem check

9 years agowirefuzz: add -N option to count complete passes
Victor Julien [Thu, 26 Nov 2015 16:32:25 +0000 (17:32 +0100)] 
wirefuzz: add -N option to count complete passes

9 years agowirefuzz: improve logfile cleanup
Victor Julien [Thu, 26 Nov 2015 13:37:10 +0000 (14:37 +0100)] 
wirefuzz: improve logfile cleanup

9 years agowirefuzz: enforce -n option per run
Victor Julien [Thu, 26 Nov 2015 12:42:43 +0000 (13:42 +0100)] 
wirefuzz: enforce -n option per run

9 years agowirefuzz: add -S option for exclusive rule load
Victor Julien [Thu, 26 Nov 2015 12:29:05 +0000 (13:29 +0100)] 
wirefuzz: add -S option for exclusive rule load

9 years agohttp: fix multipart body tracking slowdown
Victor Julien [Fri, 12 Feb 2016 15:31:57 +0000 (16:31 +0100)] 
http: fix multipart body tracking slowdown

Optimize HTTP multipart body parsing. Big records that were not files
could slow down Suricata. The reason was that the body tracker was not
moved forward. This lead to growing body buffers, which were expensive
wrt memory and inspection.

This patch add logic to move the tracker forward in this case.

9 years agoasan: fix reputation code include
Victor Julien [Thu, 11 Feb 2016 17:19:34 +0000 (18:19 +0100)] 
asan: fix reputation code include

9 years agotls-sni: fix uninitialized memory use
Victor Julien [Fri, 12 Feb 2016 09:54:02 +0000 (10:54 +0100)] 
tls-sni: fix uninitialized memory use

On bad traffic the parser could allocated memory that was not
intialized. This was later used in the JSON output logging as
a valid null terminated string.

9 years agopool: fix memory leak
Victor Julien [Fri, 12 Feb 2016 09:48:26 +0000 (10:48 +0100)] 
pool: fix memory leak

Due to pointer size mishandling, the pool code could consider a
block of memory inside the 'preallocated' block. It would then not
free the block.

9 years agostream: improve StreamTcpSegmentForEach for IPS 1846/head
Victor Julien [Wed, 3 Feb 2016 08:51:33 +0000 (09:51 +0100)] 
stream: improve StreamTcpSegmentForEach for IPS

StreamTcpSegmentForEach would only return ACK'd segments. This lead
to missing stream data in alerts when running in IPS mode.

This patch changes the behavior for IPS. All segments are iterated
now, also the non-ACK'd ones. For IDS mode the behavior is unchanged.

9 years agoqa: add --simulate-ips option
Victor Julien [Sun, 31 Jan 2016 18:27:35 +0000 (19:27 +0100)] 
qa: add --simulate-ips option

This option forces the engine in 'IPS' mode. This is useful for testing
some IPS code paths based on pcaps.

9 years agoeve: fix stream payload logging wrong direction
Victor Julien [Sun, 31 Jan 2016 12:40:07 +0000 (13:40 +0100)] 
eve: fix stream payload logging wrong direction

In the EVE stream payload logging the IPS path logged the wrong dir.
Both IDS and IPS can take the same path as the detection engine
inspects in the same direction in both cases, so the alert is also
generated in the same direction.

Bug #1684

9 years agoAdded checking of negated "totals" and "threads" config values for stats. 1845/head
Maxtors [Mon, 1 Feb 2016 13:54:29 +0000 (14:54 +0100)] 
Added checking of negated "totals" and "threads" config values for stats.

9 years agolua: expose TLS certificate chain to lua
Mats Klepsland [Mon, 2 Nov 2015 12:21:37 +0000 (13:21 +0100)] 
lua: expose TLS certificate chain to lua

Expose TLS certificate chain to lua through TlsGetCertChain().

9 years agofile-store: add force-filestore configuration option to enable writing all
Tom DeCanio [Mon, 5 Oct 2015 22:34:55 +0000 (15:34 -0700)] 
file-store: add force-filestore configuration option to enable writing all
            extracted files to filesystem.

9 years agolua: set thread vars in DetectLuaMatch
Nicolas Thill [Fri, 5 Feb 2016 10:11:13 +0000 (11:11 +0100)] 
lua: set thread vars in DetectLuaMatch

Fix internal error when calling SCThreadInfo from Lua detection modules.

Signed-off-by: Nicolas Thill <ntl@p1sec.com>
9 years agofilestore-call: forcing a call to FileStore instead of manually updating
Maurizio Abba [Mon, 16 Nov 2015 12:21:27 +0000 (12:21 +0000)] 
filestore-call: forcing a call to FileStore instead of manually updating
the relative flag in order to have a single point where we actually
touch the File structure

9 years agofix nfq_get_timestamp
notnyt [Sat, 6 Feb 2016 00:11:03 +0000 (19:11 -0500)] 
fix nfq_get_timestamp

Handle case when nfq_get_timestamp returns 0 for success, but timestamp is empty.

9 years agoFix typo of trailing ] in configure --help
bladeswords [Wed, 3 Feb 2016 11:09:34 +0000 (22:09 +1100)] 
Fix typo of trailing ] in configure --help

It is the small things that count.  This is an example of the fix

Before
--disable-threading-tls Disable TLS (thread local storage)]

After
--disable-threading-tls Disable TLS (thread local storage)

9 years agoFix the comment and explanation for random-chunk-size
Andreas Herz [Tue, 17 Nov 2015 11:25:29 +0000 (12:25 +0100)] 
Fix the comment and explanation for random-chunk-size

9 years agojson: fix missing includes in disable unix socket case 1842/head
Andreas Herz [Sun, 7 Feb 2016 22:02:14 +0000 (23:02 +0100)] 
json: fix missing includes in disable unix socket case

9 years agodrmemory: suppress magic leak
Victor Julien [Mon, 8 Feb 2016 10:50:20 +0000 (11:50 +0100)] 
drmemory: suppress magic leak

9 years agofile-magic: improve libmagic handling on *nix systems
Andreas Herz [Fri, 29 Jan 2016 21:02:22 +0000 (22:02 +0100)] 
file-magic: improve libmagic handling on *nix systems

9 years agoIn configuration test mode, check signatures if 'delayed-detect' is enabled
Alexander Gozman [Thu, 4 Feb 2016 12:33:23 +0000 (15:33 +0300)] 
In configuration test mode, check signatures if 'delayed-detect' is enabled

When 'detection-engine.delayed-detect' option was set to 'yes',
suricata didn't check signatures validity in configuration test mode.

9 years agoremove unnecessary braces
Andreas Herz [Sun, 31 Jan 2016 21:34:56 +0000 (22:34 +0100)] 
remove unnecessary braces

9 years agoconfigure: add --disable-python option
Andreas Herz [Sun, 31 Jan 2016 22:15:20 +0000 (23:15 +0100)] 
configure: add --disable-python option

9 years agoasn1: fix memory leak
Jason Ish [Wed, 3 Feb 2016 20:28:50 +0000 (14:28 -0600)] 
asn1: fix memory leak

As reported in issue #1395, fix 2 memory leaks when destroying
asn.1 decode contexts.

9 years agoFix two more potential issues like bug 1550
Victor Julien [Tue, 22 Sep 2015 13:20:25 +0000 (15:20 +0200)] 
Fix two more potential issues like bug 1550

9 years agoSegfault fix
Alessandro Guido [Wed, 16 Sep 2015 13:14:11 +0000 (15:14 +0200)] 
Segfault fix

9 years agococcinelle: fix typo for strchrnul 1821/head
Andreas Herz [Tue, 19 Jan 2016 20:38:37 +0000 (21:38 +0100)] 
coccinelle: fix typo for strchrnul

9 years agoconf: null guard in ConfNodeLookupChild
Jason Ish [Thu, 21 Jan 2016 04:41:22 +0000 (22:41 -0600)] 
conf: null guard in ConfNodeLookupChild

Add NULL guarding to the lookup so callers can process nodes
in a loop with less error checking.

Addresses issue #1660.

9 years agounix manager: log client's version with debug level
Alexander Gozman [Wed, 23 Dec 2015 08:49:11 +0000 (11:49 +0300)] 
unix manager: log client's version with debug level

As (dis)connects are already logged as a debug events, this one
should do the same.