]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
5 years agohttp: fixes stream flags for http tests 4149/head
Philippe Antoine [Mon, 2 Sep 2019 07:17:19 +0000 (09:17 +0200)] 
http: fixes stream flags for http tests

5 years agohttp: wait for response line for filename
Philippe Antoine [Tue, 2 Apr 2019 14:32:43 +0000 (16:32 +0200)] 
http: wait for response line for filename

See http evader case 481

5 years agodetect: fix FP on ICMP unreachable errors 4119/head
Victor Julien [Thu, 22 Aug 2019 09:28:36 +0000 (11:28 +0200)] 
detect: fix FP on ICMP unreachable errors

ICMP unreachable errors are linked to the flow they send an error for.
This would lead to the detection engine calling the TX inspection
engines on them.

The stream inspect engine would default to a match for non-UDP
and non-TCP as for ICMP we're not expected to use a TX inspect engine
for stream data.

This all would lead to a false positive match.

This patch fixes this by making sure the TX engines are not called if
the packet protocol and flow protocol are not the same.

Bug #2841.

5 years agopcap: fix breakloop error handling
Victor Julien [Wed, 5 Jun 2019 20:06:08 +0000 (22:06 +0200)] 
pcap: fix breakloop error handling

Ticket #3004

5 years agocapture: check for flow packets on capture timeout
Victor Julien [Mon, 27 May 2019 13:46:18 +0000 (15:46 +0200)] 
capture: check for flow packets on capture timeout

The capture threads can receive packets from the flow manager in their
Threadvars::stream_pq packet queue. This mechanism makes sure the packets
the flow manager injects into the engine are processed by the correct
worker thread.

If the capture thread(s) would not receive packets for a long time, the
Threadvars::stream_pq would not be checked and processed. This could
lead to packet pool depletion in the flow manager. It would also lead
to flows not being timed out/logged until either packets started flowing
again or until the engine was shut down.

The scenario is more likely to happen in a test (e.g. replay) but could
also delay logging on low traffic sensors.

5 years agorust: Fix deprecation warnings
Shivani Bhardwaj [Fri, 26 Jul 2019 17:52:34 +0000 (23:22 +0530)] 
rust: Fix deprecation warnings

Fix the following warnings by compiler,
(1) warning: use of deprecated item 'take_until_s': Please use `take_until` instead
(2) warning: `...` range patterns are deprecated

For the second warning, the builtin lint
"ellipsis_inclusive_range_pattern" has been added which causes the
following warning to show up with rustc 1.24.

warning: unknown lint: `ellipsis_inclusive_range_patterns`
  --> /home/travis/build/OISF/suricata/suricata-5.0.0-dev/rust/src/lib.rs:18:10
   |
18 | #![allow(ellipsis_inclusive_range_patterns)]
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(unknown_lints)] on by default

Since there is no other way to fix this, the above warning shall stay.
We need to take care of modifying this if and when the support for 1.24
as MSRV is dropped.

5 years agowarnings: fixes integer sizes in format strings
Philippe Antoine [Tue, 4 Jun 2019 09:27:04 +0000 (11:27 +0200)] 
warnings: fixes integer sizes in format strings

Fixes #3009

5 years agoaf-packet: fix build on recent Linux kernels
Eric Leblond [Wed, 17 Jul 2019 10:35:12 +0000 (12:35 +0200)] 
af-packet: fix build on recent Linux kernels

6 years agodecoder/vxlan: disable by default 4018/head 4026/head
Shivani Bhardwaj [Fri, 5 Jul 2019 12:12:44 +0000 (17:42 +0530)] 
decoder/vxlan: disable by default

6 years agodecoder/vxlan: improvements and cleanups
Victor Julien [Wed, 26 Jun 2019 10:22:33 +0000 (12:22 +0200)] 
decoder/vxlan: improvements and cleanups

Implement port config handling. Also check both src port and dest
port for tunnels that only set the destination port to the VXLAN
port. At the point of the check we don't know the packet direction
yet.

Implement as Suricata tunnel similar to Teredo.

Cleanups.

6 years agodecoder/vxlan: initial implementation of decoder
Henrik Lund Kramshoej [Tue, 17 Jul 2018 05:37:12 +0000 (07:37 +0200)] 
decoder/vxlan: initial implementation of decoder

6 years agoappveyor: Remove enable-geoip from build script 4013/head
Shivani Bhardwaj [Thu, 4 Jul 2019 08:57:27 +0000 (14:27 +0530)] 
appveyor: Remove enable-geoip from build script

There is no GeoIP2 package for cygwin and the legacy format GeoIP has
been discontinued. This patch prevents appveyor to fail because of
unavailability of libmaxminddb GeoIP2 library.
References:
- https://support.maxmind.com/geolite-legacy-discontinuation-notice/
- https://cygwin.com/cgi-bin2/package-grep.cgi?grep=geoip&arch=x86_64

6 years agogeoip: fix unittests w/o db present
Victor Julien [Fri, 21 Jun 2019 19:40:20 +0000 (21:40 +0200)] 
geoip: fix unittests w/o db present

6 years agomem: avoid potential shadow vars with 'len' name
Victor Julien [Fri, 21 Jun 2019 13:50:36 +0000 (15:50 +0200)] 
mem: avoid potential shadow vars with 'len' name

6 years agomem: add SCStrndup() function to wrap strndup().
Bill Meeks [Fri, 21 Jun 2019 13:27:48 +0000 (09:27 -0400)] 
mem: add SCStrndup() function to wrap strndup().

6 years agodetect/geoip: migrate to GeoIP2 database format
Bill Meeks [Fri, 21 Jun 2019 13:26:01 +0000 (09:26 -0400)] 
detect/geoip: migrate to GeoIP2 database format

Issue #2765

6 years agorust: fix warnings about wrong type of comments
Victor Julien [Mon, 3 Jun 2019 07:47:23 +0000 (09:47 +0200)] 
rust: fix warnings about wrong type of comments

"rustdoc does not generate documentation for macro expansions"

6 years agorust: fix libc deprecation warnings for int types
Victor Julien [Mon, 3 Jun 2019 07:40:57 +0000 (09:40 +0200)] 
rust: fix libc deprecation warnings for int types

6 years agoikev2: clean up c glue code
Victor Julien [Fri, 31 May 2019 12:10:46 +0000 (14:10 +0200)] 
ikev2: clean up c glue code

6 years agotftp: c glue code cleanup
Victor Julien [Thu, 30 May 2019 19:54:28 +0000 (21:54 +0200)] 
tftp: c glue code cleanup

6 years agoikev2: remove excess new lines
Victor Julien [Thu, 30 May 2019 18:21:01 +0000 (20:21 +0200)] 
ikev2: remove excess new lines

6 years agotftp: properly implement tx handling
Victor Julien [Thu, 30 May 2019 18:20:33 +0000 (20:20 +0200)] 
tftp: properly implement tx handling

6 years agodetect/ssh: fix ssh.protoversion memory leak 3845/head
Victor Julien [Thu, 9 May 2019 10:11:29 +0000 (12:11 +0200)] 
detect/ssh: fix ssh.protoversion memory leak

6 years agodetect/ssh: mark old ssh keywords as deprecated
Victor Julien [Thu, 9 May 2019 10:06:50 +0000 (12:06 +0200)] 
detect/ssh: mark old ssh keywords as deprecated

Suggest alternative.

6 years agodetect/parse: add flag to indicate keyword is deprecated
Victor Julien [Thu, 9 May 2019 10:06:08 +0000 (12:06 +0200)] 
detect/parse: add flag to indicate keyword is deprecated

Issue warning when it is still used.

6 years agodetect: add verbosity of --list-keywords
Victor Julien [Tue, 27 Nov 2018 09:49:37 +0000 (10:49 +0100)] 
detect: add verbosity of --list-keywords

Add indicators of content modifier or sticky buffer, and also
allow registering an alternative to a keyword.

6 years agodetect: switch keyword flags u16
Victor Julien [Tue, 27 Nov 2018 09:03:48 +0000 (10:03 +0100)] 
detect: switch keyword flags u16

6 years agovalgrind: support hyperscan warning 3838/head
Victor Julien [Fri, 3 May 2019 05:13:00 +0000 (07:13 +0200)] 
valgrind: support hyperscan warning

Issue on Ubuntu 19.04.

==18655== Conditional jump or move depends on uninitialised value(s)
==18655==    at 0x5454603: hs_alloc_scratch (in /usr/lib/x86_64-linux-gnu/libhs.so.5.1.0)
==18655==    by 0x3D5C9A: SCHSPreparePatterns (util-mpm-hs.c:707)
==18655==    by 0x215FEC: DetectMpmPrepareBuiltinMpms (detect-engine-mpm.c:364)
==18655==    by 0x20813A: SigGroupBuild (detect-engine-build.c:1932)
==18655==    by 0x21287B: SigLoadSignatures (detect-engine-loader.c:366)
==18655==    by 0x35A702: LoadSignatures (suricata.c:2419)
==18655==    by 0x35B0DD: PostConfLoadedDetectSetup (suricata.c:2574)
==18655==    by 0x35C827: main (suricata.c:2986)

https://github.com/intel/hyperscan/issues/148

6 years agofilestore: fix dropping of unwanted files (Issue #2853)
magenbluten [Wed, 27 Feb 2019 09:14:17 +0000 (09:14 +0000)] 
filestore: fix dropping of unwanted files (Issue #2853)

6 years agofiles: open files with track id only
Victor Julien [Fri, 3 May 2019 10:10:14 +0000 (12:10 +0200)] 
files: open files with track id only

6 years agochangelog: update for 4.1.4 suricata-4.1.4
Victor Julien [Mon, 29 Apr 2019 14:29:29 +0000 (16:29 +0200)] 
changelog: update for 4.1.4

6 years agosmb/c: fix undefined behavior
Victor Julien [Tue, 2 Apr 2019 14:14:48 +0000 (16:14 +0200)] 
smb/c: fix undefined behavior

Reported-by: Sirko Höer -- Code Intelligence for DCSO.
6 years agonfs: fix integer underflow
Victor Julien [Tue, 2 Apr 2019 13:32:33 +0000 (15:32 +0200)] 
nfs: fix integer underflow

Fix int underflow that leads to Rust panic in NFS3 readdirplus
parsing.

Reported-by: Sirko Höer -- Code Intelligence for DCSO.
6 years agorunmodes: for test runmodes, clean up properly
Victor Julien [Mon, 29 Apr 2019 08:47:50 +0000 (10:47 +0200)] 
runmodes: for test runmodes, clean up properly

For conf test and engine analysis, clean up memory correctly.

This helps valgrind tests for leaks.

6 years agossl : SSLProbingParser overflow fix
Philippe Antoine [Wed, 27 Mar 2019 21:56:15 +0000 (22:56 +0100)] 
ssl : SSLProbingParser overflow fix

Found by fuzzing
Fixes ssl detection evasion by packet splitting

6 years agoparse/ip: fix potential oob write in ipv4 validation
Victor Julien [Mon, 15 Apr 2019 12:52:38 +0000 (14:52 +0200)] 
parse/ip: fix potential oob write in ipv4 validation

Found using AFL.

6 years agodhcp: verify client id len before parsing data
Jason Ish [Tue, 26 Mar 2019 22:46:27 +0000 (16:46 -0600)] 
dhcp: verify client id len before parsing data

Verify that the client id length is at least 2 per the DHCP
protocol rfc before parsing the data.

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

6 years agorust/ftp: validate port components in passive reponse
Jason Ish [Tue, 26 Mar 2019 22:24:34 +0000 (16:24 -0600)] 
rust/ftp: validate port components in passive reponse

Make sure they are valid 8 bit integers before combining the
two parts into a u16 to prevent an overflow of the u16
return value.

Add unit tests to check parsing of invalid ports.

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

6 years agompls: fix misaligned read
Jason Ish [Tue, 26 Mar 2019 22:28:17 +0000 (16:28 -0600)] 
mpls: fix misaligned read

Instead of casting the packet buffer to a uint32, memcpy it to
avoid misaligned read error, as caught by the undefined behavior
detector (ubsan).

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

6 years agorules: add mpls packet too small decoder rule
Jason Ish [Wed, 20 Mar 2019 12:45:49 +0000 (06:45 -0600)] 
rules: add mpls packet too small decoder rule

6 years agompls: check buffer length before peeking at next header
Jason Ish [Fri, 15 Mar 2019 23:13:00 +0000 (17:13 -0600)] 
mpls: check buffer length before peeking at next header

Check that we have enough bytes before peaking into the MPLS
packet payload.

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

6 years agoethernet: fix next packet size on DCE packet
Jason Ish [Mon, 18 Mar 2019 06:47:30 +0000 (00:47 -0600)] 
ethernet: fix next packet size on DCE packet

Missing parans on the DCE length caused the length update
for the next call to DecodeEthernet to be wrong.

Tests added.

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

6 years agossh: fix banner overflow issue
Victor Julien [Fri, 15 Mar 2019 13:01:40 +0000 (14:01 +0100)] 
ssh: fix banner overflow issue

Reported-by: Sirko Höer - Code Intelligence
6 years agosmtp: rset command resets bdat chunks length
Philippe Antoine [Thu, 18 Apr 2019 14:04:50 +0000 (16:04 +0200)] 
smtp: rset command resets bdat chunks length

Fixes #1860

6 years agoalert/unified2: remove useless packed attributes
Victor Julien [Fri, 29 Mar 2019 13:44:36 +0000 (14:44 +0100)] 
alert/unified2: remove useless packed attributes

6 years agodecode: remove useless packed attributes
Victor Julien [Fri, 29 Mar 2019 13:44:15 +0000 (14:44 +0100)] 
decode: remove useless packed attributes

6 years agoopenbsd: fix rust linking
Victor Julien [Sat, 13 Apr 2019 13:34:49 +0000 (15:34 +0200)] 
openbsd: fix rust linking

6 years agodetect/http-client-body: convert to inspect api v2 3757/head
Victor Julien [Thu, 13 Dec 2018 10:29:15 +0000 (11:29 +0100)] 
detect/http-client-body: convert to inspect api v2

6 years agodetect/http-client-body: code cleanups and test cleanups
Victor Julien [Thu, 13 Dec 2018 06:59:20 +0000 (07:59 +0100)] 
detect/http-client-body: code cleanups and test cleanups

6 years agosmb1: fix NT create andx records filename parsing
Victor Julien [Fri, 22 Mar 2019 10:57:52 +0000 (11:57 +0100)] 
smb1: fix NT create andx records filename parsing

Use file name parsing routines that take unicode into account
and consider padding bytes as well.

6 years agosmb: fix NT create filename parsing
Wesley van der Ree [Thu, 21 Mar 2019 13:48:18 +0000 (14:48 +0100)] 
smb: fix NT create filename parsing

parse_smb_create_andx_request_record skipped 1 byte too much before
the filename.

Fixes: #2894
6 years agoapp-layer/pd: set offset and depth in mpm
Victor Julien [Fri, 22 Mar 2019 19:19:31 +0000 (20:19 +0100)] 
app-layer/pd: set offset and depth in mpm

6 years agopcap-log: Don't leak memory in LZ4 error paths
Max Fillinger [Mon, 11 Mar 2019 09:51:00 +0000 (10:51 +0100)] 
pcap-log: Don't leak memory in LZ4 error paths

6 years agoAvoid use-after-free during pid file cleanup.
Alexander Bluhm [Mon, 18 Mar 2019 13:06:39 +0000 (14:06 +0100)] 
Avoid use-after-free during pid file cleanup.

In case the pid file is given in the config file, the file name is
stored in volatile memory.  Removal of the pid file happens after
cleanup of config memory.  Create a copy of the name which will be
freed after the pid file has been removed.

6 years agoapp-layer/pd: free memory
Victor Julien [Thu, 21 Mar 2019 11:06:07 +0000 (12:06 +0100)] 
app-layer/pd: free memory

6 years agodetect: remove BUG_ON from packet path
Victor Julien [Mon, 18 Mar 2019 09:35:45 +0000 (10:35 +0100)] 
detect: remove BUG_ON from packet path

6 years agodetect: fix match array reset
Victor Julien [Mon, 18 Mar 2019 09:34:03 +0000 (10:34 +0100)] 
detect: fix match array reset

Fix match array reset depending on prefilter matches for the
current run. If there were none, the match array of the previous
packet was used. This could lead to inspection of rules from the
wrong rule group.

6 years agoapp-layer/profile: fix udp protocol detection profiling
Victor Julien [Sat, 16 Mar 2019 17:04:16 +0000 (18:04 +0100)] 
app-layer/profile: fix udp protocol detection profiling

6 years agoFix memory leak with TOS handling
Jeff Lucovsky [Sat, 9 Mar 2019 15:28:27 +0000 (07:28 -0800)] 
Fix memory leak with TOS handling

Use `pcre_copy_substring` to avoid memory allocations when parsing
TOS values.

6 years agopfring: update bpf error handling to be consistent
jason taylor [Thu, 14 Mar 2019 00:41:00 +0000 (20:41 -0400)] 
pfring: update bpf error handling to be consistent

* updated bpf error handling to be consistent with af-packet
* minor internal doc updates

Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years agodetect-iprep: fix memory leaks
Giuseppe Longo [Sat, 9 Mar 2019 21:36:03 +0000 (22:36 +0100)] 
detect-iprep: fix memory leaks

Loading rules with iprep keyword cause
memory leaks due to missing frees.

Direct leak of 8 byte(s) in 4 object(s) allocated from:
    #0 0x7f81c862bd28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
    #1 0x7f81c6afea69 in pcre_get_substring (/lib/x86_64-linux-gnu/libpcre.so.3+0x27a69)
    #2 0x43206f7420676e68  (<unknown module>)

SUMMARY: AddressSanitizer: 8 byte(s) leaked in 4 allocation(s).

6 years agoflow-bypass: set thread name to FB
Eric Leblond [Wed, 6 Mar 2019 13:41:47 +0000 (14:41 +0100)] 
flow-bypass: set thread name to FB

6 years agosuricata.yaml: fix name of encryption-handling var
Eric Leblond [Thu, 12 Jul 2018 19:28:20 +0000 (21:28 +0200)] 
suricata.yaml: fix name of encryption-handling var

6 years agodoc: xbits:noalert is not a valid syntax
Eric Leblond [Tue, 19 Feb 2019 08:53:02 +0000 (09:53 +0100)] 
doc: xbits:noalert is not a valid syntax

6 years agodetect-hostbits: error on some invalid config
Eric Leblond [Mon, 18 Feb 2019 22:06:10 +0000 (23:06 +0100)] 
detect-hostbits: error on some invalid config

6 years agodetect-xbits: error on some invalid config
Eric Leblond [Mon, 18 Feb 2019 21:59:01 +0000 (22:59 +0100)] 
detect-xbits: error on some invalid config

6 years agodetect-flowbits: error on some invalid syntax
Eric Leblond [Mon, 18 Feb 2019 21:31:26 +0000 (22:31 +0100)] 
detect-flowbits: error on some invalid syntax

The regular expression was accepting something like
"flowbits:!isset,isma;" without complaining even if it is not
correct and don't have the expected result.

6 years agosuricata: fix list keywords URL in release mode
Eric Leblond [Mon, 18 Feb 2019 13:27:18 +0000 (14:27 +0100)] 
suricata: fix list keywords URL in release mode

The tags are suricata-X.X.X so we need to update the chain to get
URLs right.

6 years agodoc: update install doc for 4.1.3 3732/head suricata-4.1.3
Victor Julien [Thu, 7 Mar 2019 09:29:41 +0000 (10:29 +0100)] 
doc: update install doc for 4.1.3

6 years agochangelog: update for 4.1.3
Victor Julien [Wed, 6 Mar 2019 20:38:28 +0000 (21:38 +0100)] 
changelog: update for 4.1.3

6 years agodecoder: improve stats hash error handling
Victor Julien [Mon, 18 Feb 2019 14:17:36 +0000 (15:17 +0100)] 
decoder: improve stats hash error handling

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