]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
8 years agohttp: allow lower/mixed case in proto detect 2454/head
Victor Julien [Tue, 13 Dec 2016 09:23:21 +0000 (10:23 +0100)] 
http: allow lower/mixed case in proto detect

In HTTP detection registered patterns were upper case only. Since the
detection is based on both sides this would still work for sessions
where one of the talkers misbehaved. If both sides misbehave this
would fail however, so this patch introduces case insensive matching.

8 years agotravis: use a build matrix and add additional builds 2447/head
Jason Ish [Tue, 29 Nov 2016 17:03:03 +0000 (11:03 -0600)] 
travis: use a build matrix and add additional builds

The following builds were added:
- linux, clang with -Wshadow
- linux w/ profiling
- linux w/ debug
- linux w/ no-json support

Removes the extra OS X build.

Travis file was reworked signficantly for readabilty.

8 years agoprofiling: fix shadow error
Jason Ish [Tue, 29 Nov 2016 16:45:02 +0000 (10:45 -0600)] 
profiling: fix shadow error

Local variable store was shadowing variable in function
definition.

8 years agounix-socket: clean up path handling
Victor Julien [Fri, 2 Dec 2016 09:10:20 +0000 (10:10 +0100)] 
unix-socket: clean up path handling

Create/check socket path in a single place. Don't use dynamic
memory allocation.

8 years agounix-socket: create socket directory if possible 2445/head
Victor Julien [Thu, 1 Dec 2016 14:19:35 +0000 (15:19 +0100)] 
unix-socket: create socket directory if possible

Create the socket directory in the default case.

Since we're doing stat+mkdir indicate to Coverity not to worry about
the toctou case.

8 years agounix-socket: be more specific about problems
Victor Julien [Thu, 1 Dec 2016 14:06:57 +0000 (15:06 +0100)] 
unix-socket: be more specific about problems

8 years agounix-socket: don't error out on unix socket failure
Victor Julien [Thu, 1 Dec 2016 13:54:04 +0000 (14:54 +0100)] 
unix-socket: don't error out on unix socket failure

If --init-errors-fatal is specified do error out.

Bug https://redmine.openinfosecfoundation.org/issues/1973

8 years agoUpdate Changelog for 3.2 release suricata-3.2
Victor Julien [Tue, 29 Nov 2016 17:15:42 +0000 (18:15 +0100)] 
Update Changelog for 3.2 release

8 years agodnp3: use _ in keyword names instead of "." 2440/head
Jason Ish [Tue, 29 Nov 2016 13:57:02 +0000 (07:57 -0600)] 
dnp3: use _ in keyword names instead of "."

dnp3.ind -> dnp3_ind
dnp3.func -> dnp3_func
dnp3.obj -> dnp3_obj

The variations with a "." are now aliases.

8 years agoaf-packet: fix fanout support on Debian Jessie
Victor Julien [Fri, 7 Oct 2016 11:49:40 +0000 (13:49 +0200)] 
af-packet: fix fanout support on Debian Jessie

Debian Jessie with kernel 3.16 would not accept the 'id' of 99 used
in the test. Id 1 does work.

8 years agoFix port parsing in config file, added one more corresponding test.
Alexander Gozman [Wed, 12 Oct 2016 08:12:34 +0000 (11:12 +0300)] 
Fix port parsing in config file, added one more corresponding test.

Some examples from wiki caused parsing errors.
For example, "[1:80,![2,4]]" was treated as a mistake.

Also fixed loop detection in variables declaration. For example,
'A: "HOME_NET, !$HOME_NET"' resulted in parsing error.

8 years agoqa: only run cocci tests on one linux builder 2438/head
Victor Julien [Tue, 29 Nov 2016 08:29:17 +0000 (09:29 +0100)] 
qa: only run cocci tests on one linux builder

8 years agotravis: macos support
Jason Ish [Mon, 28 Nov 2016 16:23:34 +0000 (10:23 -0600)] 
travis: macos support

8 years agounittest-helper: fix format string compiler warnings
Jason Ish [Mon, 28 Nov 2016 18:19:52 +0000 (12:19 -0600)] 
unittest-helper: fix format string compiler warnings

8 years agodetect-stream_size: fix format string compiler warnings
Jason Ish [Mon, 28 Nov 2016 18:19:13 +0000 (12:19 -0600)] 
detect-stream_size: fix format string compiler warnings

8 years agostream-tcp: fix format string compiler warnings
Jason Ish [Mon, 28 Nov 2016 18:18:47 +0000 (12:18 -0600)] 
stream-tcp: fix format string compiler warnings

8 years agomodbus: fix format string compiler warnings
Jason Ish [Mon, 28 Nov 2016 18:18:23 +0000 (12:18 -0600)] 
modbus: fix format string compiler warnings

8 years agodnp3: rename "index" variables to "point_index"
Jason Ish [Mon, 28 Nov 2016 16:07:41 +0000 (10:07 -0600)] 
dnp3: rename "index" variables to "point_index"

Gcc 4.6 will warning with -Wshadow for a local variable
named "index" as <strings.h> has a function named "index".

Newer versions of gcc handle this case.

8 years agodnp3-gen: rename index variable to point_index
Jason Ish [Mon, 28 Nov 2016 16:06:14 +0000 (10:06 -0600)] 
dnp3-gen: rename index variable to point_index

Gcc 4.6 will warning with -Wshadow for a local variable
named "index" as <strings.h> has a function named "index".

Newer versions of gcc handle this case.

8 years agoqa: add -Wshadow to appveyor builds 2433/head
Victor Julien [Mon, 28 Nov 2016 13:40:20 +0000 (14:40 +0100)] 
qa: add -Wshadow to appveyor builds

8 years agoproto detect: fix -Wshadow warning 2432/head
Victor Julien [Mon, 28 Nov 2016 12:03:34 +0000 (13:03 +0100)] 
proto detect: fix -Wshadow warning

8 years agodcerpc: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 11:54:16 +0000 (12:54 +0100)] 
dcerpc: fix -Wshadow warnings

8 years agocommandline: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 11:51:52 +0000 (12:51 +0100)] 
commandline: fix -Wshadow warnings

8 years agodetect-address: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 11:36:41 +0000 (12:36 +0100)] 
detect-address: fix -Wshadow warnings

8 years agoasn1: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 11:36:26 +0000 (12:36 +0100)] 
asn1: fix -Wshadow warnings

8 years agoasn1: modernize test
Victor Julien [Mon, 28 Nov 2016 11:24:35 +0000 (12:24 +0100)] 
asn1: modernize test

8 years agoyaml: fix tests for -Wshadow
Victor Julien [Mon, 28 Nov 2016 11:24:19 +0000 (12:24 +0100)] 
yaml: fix tests for -Wshadow

8 years agodnp3: fix test for -Wshadow
Victor Julien [Mon, 28 Nov 2016 11:24:03 +0000 (12:24 +0100)] 
dnp3: fix test for -Wshadow

8 years agorunmodes: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 09:29:25 +0000 (10:29 +0100)] 
runmodes: fix -Wshadow warnings

8 years agompm ac-bs: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 09:27:34 +0000 (10:27 +0100)] 
mpm ac-bs: fix -Wshadow warnings

8 years agothreads: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 09:27:18 +0000 (10:27 +0100)] 
threads: fix -Wshadow warnings

8 years agocommandline: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 09:21:53 +0000 (10:21 +0100)] 
commandline: fix -Wshadow warnings

8 years agonfq: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 09:18:03 +0000 (10:18 +0100)] 
nfq: fix -Wshadow warnings

Rename globals to make sure it's clear they are globals.

8 years agoreputation: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 09:11:44 +0000 (10:11 +0100)] 
reputation: fix -Wshadow warnings

8 years agoeve-flow: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 09:10:40 +0000 (10:10 +0100)] 
eve-flow: fix -Wshadow warning

8 years agoeve-file: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 09:09:16 +0000 (10:09 +0100)] 
eve-file: fix -Wshadow warnings

8 years agoippair: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 09:07:39 +0000 (10:07 +0100)] 
ippair: fix -Wshadow warning

8 years agohost: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 09:07:25 +0000 (10:07 +0100)] 
host: fix -Wshadow warning

8 years agoflow: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 09:07:09 +0000 (10:07 +0100)] 
flow: fix -Wshadow warning

8 years agowithin: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 09:06:42 +0000 (10:06 +0100)] 
within: fix -Wshadow warning

8 years agoprefilter: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 09:05:51 +0000 (10:05 +0100)] 
prefilter: fix -Wshadow warnings

8 years agodetect: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 09:04:25 +0000 (10:04 +0100)] 
detect: fix -Wshadow warning

8 years agoapp engines: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 09:03:11 +0000 (10:03 +0100)] 
app engines: fix -Wshadow warning

8 years agoaddress: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 09:01:52 +0000 (10:01 +0100)] 
address: fix -Wshadow warning

8 years agodistance: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 09:00:35 +0000 (10:00 +0100)] 
distance: fix -Wshadow warning

8 years agocontent: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 08:59:05 +0000 (09:59 +0100)] 
content: fix -Wshadow warning

8 years agomem: fix SCStrdup -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 08:58:44 +0000 (09:58 +0100)] 
mem: fix SCStrdup -Wshadow warning

8 years agodns: fix -Wshadow warnings
Victor Julien [Mon, 28 Nov 2016 08:55:17 +0000 (09:55 +0100)] 
dns: fix -Wshadow warnings

8 years agoapp-layer-proto-detect: fix -Wshadow warning
Victor Julien [Mon, 28 Nov 2016 08:48:22 +0000 (09:48 +0100)] 
app-layer-proto-detect: fix -Wshadow warning

8 years agodnp3: fix coverity CID 1374300
Victor Julien [Mon, 28 Nov 2016 08:44:23 +0000 (09:44 +0100)] 
dnp3: fix coverity CID 1374300

8 years agoflow: suppress coverity CID 400600
Victor Julien [Mon, 28 Nov 2016 12:53:57 +0000 (13:53 +0100)] 
flow: suppress coverity CID 400600

8 years agostat: suppress CID 1293508 and 1312013
Victor Julien [Mon, 28 Nov 2016 08:39:02 +0000 (09:39 +0100)] 
stat: suppress CID 1293508 and 1312013

8 years agonfq: suppress CID 1374302 and 1374303
Victor Julien [Mon, 28 Nov 2016 08:34:43 +0000 (09:34 +0100)] 
nfq: suppress CID 1374302 and 1374303

8 years agohost-info: coverity 1298890
Victor Julien [Mon, 28 Nov 2016 08:20:01 +0000 (09:20 +0100)] 
host-info: coverity 1298890

8 years agottl: coverity 400560 + minor cleanups
Victor Julien [Mon, 28 Nov 2016 08:16:05 +0000 (09:16 +0100)] 
ttl: coverity 400560 + minor cleanups

8 years agotos: coverity 400559
Victor Julien [Mon, 28 Nov 2016 08:12:23 +0000 (09:12 +0100)] 
tos: coverity 400559

8 years agossl-state: coverity 400558
Victor Julien [Mon, 28 Nov 2016 08:11:42 +0000 (09:11 +0100)] 
ssl-state: coverity 400558

8 years agoissue 1961: depth: fail if numeric value has trailing text
Jason Ish [Thu, 24 Nov 2016 17:21:48 +0000 (11:21 -0600)] 
issue 1961: depth: fail if numeric value has trailing text

Catches the case where the depth is not terminated with a
semicolon (eg: "depth:17 classtype:trojan-activity") which
is usually a sign the rule has a missing semi-colon.

8 years agolog-pcap.c: cleanup scan-build warning
Jason Ish [Thu, 24 Nov 2016 16:59:15 +0000 (10:59 -0600)] 
log-pcap.c: cleanup scan-build warning

Don't initialize value to a value that is never used.

8 years agolog-pcap.c: fix resource leak found by coverity
Jason Ish [Thu, 24 Nov 2016 16:36:27 +0000 (10:36 -0600)] 
log-pcap.c: fix resource leak found by coverity

Goto the failure label instead of returning which will allow the open
directory to get cleaned up.

Fixes:

*** CID 1394675:  Resource leaks  (RESOURCE_LEAK)
/src/log-pcap.c: 615 in PcapLogInitRingBuffer()
609                  * failure as the file might just not be a pcap log file. */
610                 continue;
611             }
612
613             PcapFileName *pf = SCCalloc(sizeof(*pf), 1);
614             if (unlikely(pf == NULL)) {
>>>     CID 1394675:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "dir" going out of scope leaks the storage it points to.
615                 return TM_ECODE_FAILED;
616             }
617             char path[PATH_MAX];
618             snprintf(path, PATH_MAX - 1, "%s/%s", pattern, entry->d_name);
619             if ((pf->filename = SCStrdup(path)) == NULL) {
620                 goto fail;

This also means that pf can be NULL which should clear up CID
1394676 (REVERSE_INULL).

8 years agodoc: document that that ;, \, " need to be escaped in rules
Jason Ish [Wed, 23 Nov 2016 21:59:28 +0000 (15:59 -0600)] 
doc: document that that ;, \, " need to be escaped in rules

8 years agoqa: appveyor support 2421/head
Victor Julien [Wed, 23 Nov 2016 14:27:28 +0000 (15:27 +0100)] 
qa: appveyor support

8 years agoqa: update url in libhtp script
Victor Julien [Thu, 24 Nov 2016 12:31:05 +0000 (13:31 +0100)] 
qa: update url in libhtp script

8 years agopcap-log: seed ring buffer on start up 2414/head
Jason Ish [Sat, 24 Sep 2016 02:46:06 +0000 (20:46 -0600)] 
pcap-log: seed ring buffer on start up

On start, look for existing pcap log files and add them to
the ring buffer. This makes pcap-log self maintaining over
restarts removing the need for external tools to clear
orphaned files.

8 years agodocumentation: fix list keywords URLs
Eric Leblond [Wed, 9 Nov 2016 19:08:07 +0000 (14:08 -0500)] 
documentation: fix list keywords URLs

Update URLs in keyword definition to point to sphinx documentation.

8 years agologging: hook the application log file into rotation
Jason Ish [Tue, 8 Nov 2016 17:02:23 +0000 (12:02 -0500)] 
logging: hook the application log file into rotation

8 years agologging: open application log file in append mode
Jason Ish [Tue, 8 Nov 2016 15:13:01 +0000 (10:13 -0500)] 
logging: open application log file in append mode

It was being open in read/write mode, which was likely
a mistake with append mode being the intention.

8 years agodns: accept a data length of 0 without marking as malformed
Jason Ish [Mon, 7 Nov 2016 15:46:45 +0000 (10:46 -0500)] 
dns: accept a data length of 0 without marking as malformed

Addresses issue:
https://redmine.openinfosecfoundation.org/issues/1924

8 years agodns-events: fix direction of malformed events + typo
Jason Ish [Mon, 7 Nov 2016 15:02:18 +0000 (10:02 -0500)] 
dns-events: fix direction of malformed events + typo

8 years agoipfw: disable more code to suppress compiler warnings
Jason Ish [Mon, 21 Nov 2016 16:24:17 +0000 (10:24 -0600)] 
ipfw: disable more code to suppress compiler warnings

Disabled code lead to unused variable warnings, so disable the
variable code as well.

8 years agocompiler warnings: fix compiler warnings in format strings
Jason Ish [Mon, 21 Nov 2016 16:16:14 +0000 (10:16 -0600)] 
compiler warnings: fix compiler warnings in format strings

8 years agodetect-lua: unify on using 'lua' name vs 'luajit'
Victor Julien [Fri, 18 Nov 2016 10:18:57 +0000 (11:18 +0100)] 
detect-lua: unify on using 'lua' name vs 'luajit'

8 years agoluajit: remove unused instance counter
Victor Julien [Fri, 18 Nov 2016 10:18:33 +0000 (11:18 +0100)] 
luajit: remove unused instance counter

8 years agoluajit: update default yaml and doc for 'states'
Victor Julien [Thu, 17 Nov 2016 13:27:41 +0000 (14:27 +0100)] 
luajit: update default yaml and doc for 'states'

8 years agolua: luajit improvements
Victor Julien [Thu, 17 Nov 2016 07:54:44 +0000 (08:54 +0100)] 
lua: luajit improvements

Luajit has a strange memory requirement, it's 'states' need to be in the
first 2G of the process' memory.

This patch improves the pool approach by moving it to the front of the
start up.

A new config option 'luajit.states' is added to control how many states
are preallocated. It defaults to 128.

Add a warning when more states are used then preallocated. This may fail
if flow/stream/detect engines use a lot of memory. Add hint at exit that
gives the max states in use if it's higher than the default.

8 years agodoc: only build pdf on dist if pdflatex is installed
Jason Ish [Fri, 18 Nov 2016 17:50:02 +0000 (11:50 -0600)] 
doc: only build pdf on dist if pdflatex is installed

8 years agodoc: fix build pdf on non gnu make platforms
Jason Ish [Fri, 18 Nov 2016 17:41:11 +0000 (11:41 -0600)] 
doc: fix build pdf on non gnu make platforms

The Makefile generated by sphinx-build is GNU Make specific
causing the PDF phase to fail. Instead call pdflatex directly
based on how the generated Makefile was doing it.

8 years agopcap-file: minor cleanup
Victor Julien [Wed, 23 Nov 2016 09:35:42 +0000 (10:35 +0100)] 
pcap-file: minor cleanup

8 years agochangelog: update for 3.2RC1 release suricata-3.2RC1
Victor Julien [Tue, 1 Nov 2016 12:11:18 +0000 (13:11 +0100)] 
changelog: update for 3.2RC1 release

8 years agoyaml: group ICS protocols together 2393/head
Victor Julien [Mon, 31 Oct 2016 13:11:57 +0000 (14:11 +0100)] 
yaml: group ICS protocols together

8 years agoENIP: add default ports to yaml
Victor Julien [Mon, 31 Oct 2016 13:10:53 +0000 (14:10 +0100)] 
ENIP: add default ports to yaml

8 years agoENIP: disable parser if no config found
Victor Julien [Mon, 31 Oct 2016 12:41:46 +0000 (13:41 +0100)] 
ENIP: disable parser if no config found

8 years agoDNP3: disable in case of no dnp3 config
Victor Julien [Mon, 31 Oct 2016 12:40:19 +0000 (13:40 +0100)] 
DNP3: disable in case of no dnp3 config

8 years agoreadme: Fix markdown header levels
Priit Laes [Thu, 27 Oct 2016 11:41:00 +0000 (14:41 +0300)] 
readme: Fix markdown header levels

8 years agoreadme: reformat some key points about possible security issues
Priit Laes [Thu, 27 Oct 2016 11:38:28 +0000 (14:38 +0300)] 
readme: reformat some key points about possible security issues

8 years agoreadme: Add link to up-to-date user guide and mark wiki as deprecated.
Priit Laes [Thu, 27 Oct 2016 11:37:56 +0000 (14:37 +0300)] 
readme: Add link to up-to-date user guide and mark wiki as deprecated.

8 years agodnp3: fix coverity checks; return value not checked
Jason Ish [Thu, 27 Oct 2016 17:19:05 +0000 (11:19 -0600)] 
dnp3: fix coverity checks; return value not checked

8 years agodetect: add missing break (CID 1374301)
Victor Julien [Mon, 31 Oct 2016 10:30:26 +0000 (11:30 +0100)] 
detect: add missing break (CID 1374301)

8 years agoeve: make payload printing in alerts more robust
Victor Julien [Mon, 31 Oct 2016 10:14:41 +0000 (11:14 +0100)] 
eve: make payload printing in alerts more robust

8 years agoflowint: allow / in name
Victor Julien [Fri, 28 Oct 2016 10:23:23 +0000 (12:23 +0200)] 
flowint: allow / in name

8 years agohostbits: test fixes
Victor Julien [Tue, 25 Oct 2016 19:15:44 +0000 (21:15 +0200)] 
hostbits: test fixes

8 years agopkt-var: const name
Victor Julien [Thu, 27 Oct 2016 12:56:21 +0000 (14:56 +0200)] 
pkt-var: const name

8 years agoDNP3: minor cleanup 2391/head
Victor Julien [Thu, 27 Oct 2016 09:55:28 +0000 (11:55 +0200)] 
DNP3: minor cleanup

8 years agoDNP3: don't leak memory on dnp3_obj parsing
Victor Julien [Thu, 27 Oct 2016 09:55:17 +0000 (11:55 +0200)] 
DNP3: don't leak memory on dnp3_obj parsing

8 years agoDNP3: Use directional logging.
Jason Ish [Wed, 13 Jul 2016 15:04:15 +0000 (09:04 -0600)] 
DNP3: Use directional logging.

Instead of waiting for a transaction complete, log the
request as soon as it is completes which will give it a
more accurate timestamp.

8 years agoDNP3: --afl-dnp3 entry point
Jason Ish [Fri, 15 Apr 2016 22:49:28 +0000 (16:49 -0600)] 
DNP3: --afl-dnp3 entry point

8 years agoDNP3: Lua detect support.
Jason Ish [Thu, 10 Dec 2015 17:59:48 +0000 (11:59 -0600)] 
DNP3: Lua detect support.

Adds support for access the DNP3 transaction in Lua rules.

8 years agoDNP3: Log DNP3 info with DNP3 alert.
Jason Ish [Mon, 28 Sep 2015 22:33:48 +0000 (16:33 -0600)] 
DNP3: Log DNP3 info with DNP3 alert.

8 years agoDNP3: Log DNP3 transactions.
Jason Ish [Thu, 7 May 2015 17:53:39 +0000 (11:53 -0600)] 
DNP3: Log DNP3 transactions.

8 years agoDNP3: dnp3_data, dnp3_func, dnp3_ind, dnp3_obj rule keywords
Jason Ish [Fri, 10 Apr 2015 16:22:25 +0000 (10:22 -0600)] 
DNP3: dnp3_data, dnp3_func, dnp3_ind, dnp3_obj rule keywords