Commit Graph

9817 Commits (suricata-4.1.10)
 

Author SHA1 Message Date
Victor Julien 7405cd1373 release: 4.1.10; update changelog; require htp 0.5.36 5 years ago
Philippe Antoine 5a933f0d34 ssl: upgarde to uint32 for bytes_processed
as it can overflow, and is compared with uint32 such as
message_length and message_start and

(cherry picked from commit 48f0c612e3)
5 years ago
Jason Ish 63db835dec dnp3: regenerate object decoders 5 years ago
Jason Ish 02a98f05e7 script/dnp3-gen: update generator to reflect in tree changes
Some changes were made to the generated files instead of the
generator script. Update the script to generate what is
in the current state of the in-tree generated files.

(cherry picked from commit 4976afd96a)
5 years ago
Philippe Antoine d5efabe63d dnp3: avoids DOS by too long loop over null-sized objects
(cherry picked from commit 15980af7de)
5 years ago
Angelo Mirabella d415c0bb18 unix-socket: fix alert metadata logging
This changeset fixes a bug that was preventing suricata to dump
alert metadata info when running in unix-socket mode.
When running in unix-socket mode, suricata was skipping the
initialization of the output modules and, as a consequence,
the metadata output module was never invoked.

(cherry picked from commit ea15282f47)
5 years ago
Philippe Antoine b74ed0fdea packet: set length of 0 for too big copy
(cherry picked from commit d5ac77ee8b)
5 years ago
Victor Julien e621de5052 decode/null: fix type parsing
(cherry picked from commit 14aacbd067)
5 years ago
Victor Julien bf904c7f37 rust: fix warnings found by nightly compiler 5 years ago
Victor Julien 9a0a5ab1a3 detect/mpm: remove usused cleanup function
(cherry picked from commit e7b5201016)
5 years ago
Victor Julien 97e4d8555b detect: optimize prefilter result handling
(cherry picked from commit e799357d9f)
5 years ago
Victor Julien 6d1cd1d22e detect/prefilter: small cleanup
(cherry picked from commit ffb0945b4c)
5 years ago
Victor Julien 02322676d7 detect: fix inspection order with stateful rules
When stateful detection rules, for which detection has already started
for a previous packet, are added to the candidates array, the array
is sorted to mantain the correct inspection order. However, due to a
trivial error in the sort helper the array was sorted in descending
instead of ascending order.

(cherry picked from commit 4664444067)
5 years ago
Jason Ish 8b0897f3e1 dnp3: set byte order when logging dnp3 src and dst
DNP3 uses little endian on the wire, for the most part this
is handled as the messages are deserialize. However, the link
header is a cast over raw data, so swap these bytes as they
are being logged.

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

(cherry picked from commit 76e011a5ba)
5 years ago
Philippe Antoine 5e88bb9a13 dnp3: fix memory leak with object containing bytearrays
(cherry picked from commit 5749024e3f)
5 years ago
Philippe Antoine a242f1b05a dnp3: fix signed integer overflow
By using unsigned integers everywhere

(cherry picked from commit 001350547a)
5 years ago
Shivani Bhardwaj d663da2fd5 github-ci: remove deprecated add-path 5 years ago
Jeff Lucovsky 102c6ce9b4 decode: Improved handling of ICMPv4 messages
This commit improves handling of ICMPv4 messages, especially those with
variable sized headers.

This commit also adds a header length variable for use by the new
sticky buffer for the header.

(cherry picked from commit 988bb26828)
5 years ago
Victor Julien 25dd3537e9 smb: check post-gap timeouts once a second at most
(cherry picked from commit 25f2efe977)
(cherry picked from commit 83c9b305ac)
5 years ago
Victor Julien dac87c62a4 smb: update ts only if it changed
(cherry picked from commit 8aa380600d)
(cherry picked from commit 264eecbdef)
5 years ago
Victor Julien 185f43f9f0 smb: fix 'dangling' files in lossy sessions
In case of lossy connections the SMB state would properly clean up
transactions, including file transactions. However for files the
state was never set to 'truncated', leading to files to stay 'active'.

This would lead these files staying in the SMB's state. In long running
sessions with lots of files this would lead to performance and memory
use issues.

This patch cleans truncates the file that was being transmitted when
a file transaction is being closed.

(cherry picked from commit 65e9a7c31c)
(cherry picked from commit c8be282533)
5 years ago
Sumera Priyadarsini 65040a29e7 rust: fix build warning for unknown lint
Builds for suricata with rustc 1.24.1 give the warning:
	warning: unknown lint: `ellipsis_inclusive_range_patterns`

The builtin lint had been added to fix a deprecation warning
for the `...` range patterns. Although rustc 1.24.1 is
no longer the MSRV, rendering the lint unnecessary, removing it
results in a strict error for rustc 1.47.x.

Add relevant code to allow unknown lints.
5 years ago
Sumera Priyadarsini 1310217ed9 rust: fix rust build for rustc 1.24.1
Builds for suricata fail with rustc 1.24.1 due to usage of `crate`
to specify the absolute path for the app-layer-parser with the errors:
    error[E0433]: `crate` can only be used in absolute paths
    error: `crate` in paths is experimental

Modify relevant files to use relative paths instead.
Fixes Bug #4064
5 years ago
Victor Julien 5c447fa892 version: update to 4.1.9 5 years ago
Victor Julien 83dc5c6fe8 changelog: update for 4.1.9 5 years ago
Victor Julien 9329314e15 configure: require libhtp 0.5.35 5 years ago
Philippe Antoine 3d0676e09d enip: use status for probing parser
(cherry picked from commit 0da4dc0dea)
5 years ago
Philippe Antoine e2a9536e3a signature: fix linked list for bidirectional signatures
Bidirectional signatures are really two signatures with one id
This needs to be handled with care when changing a linked list

(cherry picked from commit 5ac8e41a13)
5 years ago
Philippe Antoine e7f83eaa0f dcerpc: validate signature with dcerpc keywords
so that they do not use another protocol's keywords

(cherry picked from commit c06d8f2463)
5 years ago
Philippe Antoine dca2f254a0 dnp3: more precise probing for banners
(cherry picked from commit bde0c88984)
5 years ago
Philippe Antoine d93cf8713b dnp3: fix probing test not using final null in string
(cherry picked from commit 12dfc33e05)
5 years ago
Philippe Antoine dfc2bc9aba smb: adds file overlap event against evasions
Evasion scenario is
- a first dummy write of one byte at offset 0 is done
- the second full write of EICAR at offset 0 is then done
and does not trigger detection

The last write had the final value, and as we cannot "cancel"
the previous write, we set an event which is then transformed into
an app-layer decoder alert

(cherry picked from commit caa7946888)
5 years ago
Philippe Antoine ba046a1b89 smb: resistance against padding evasions
Scenario is use of dummy padding in write AndX request
or other similar commands using a data offset.

Parsing skips now these dummy bytes, and generates one event

(cherry picked from commit aaa69fe3c5)
5 years ago
Philippe Antoine 61bb9add3e ssl: adds safety checks
Ensure the client version is valid by checking hello flags

Ensure no integer underflow occurs in SSLv3ParseHandshakeType

(cherry picked from commit 2eacc6a9a8)
5 years ago
Philippe Antoine df1487b1d8 ssl: do not reuse struct session_id_length
As it can be confused between SSLv2 and TLSv13
In SSLv2, this variable is not used after the function scope, so
we can use a temporary variable.

(cherry picked from commit 4706b38866)
5 years ago
Jason Ish 5744956a27 dhcp: set unidirection transaction flag
(cherry picked from commit 0529a00ffd)
5 years ago
Jason Ish 9d698cc7f0 enip: set unidirection transaction flag
(cherry picked from commit 2b215a45e0)
5 years ago
Jason Ish df88e1291b ikev2: set unidirection transaction flag
(cherry picked from commit 3036ec4db0)
5 years ago
Jason Ish f210918523 krb5: set unidirection transaction flag
(cherry picked from commit f7dee602e9)
5 years ago
Jason Ish 3620029b00 ntp: set unidirection transaction flag
(cherry picked from commit 984d3c7f20)
5 years ago
Jason Ish 70e6a1fcaf applayer: add flags to parser registration struct
This will allow Rust parsers to register for gap handing from
Rust (some Rust parsers do handle gaps, but they set the flag
from C).

(cherry picked from commit 53aa967e0b)
5 years ago
Jason Ish 58e0f946d6 app-layer: handle unidirectional transactions
(cherry picked from commit 60ebc27c4e)
5 years ago
Jason Ish 01cffa827c app-layer: backport unidirectional tx option
This is a partial backport of:
ac3cf6ff75

    detect/config: set config for special cases

    Allow app-layer to declare the txs are uni-directional and special
    care is needed for applying config.
5 years ago
Jeff Lucovsky c8931b9337 detect/rules: Fix copy/paste error
This commit corrects a copy/paste error handling the `include-mpm-stats`
configuration setting.

(cherry picked from commit db9776af64)
5 years ago
Jeff Lucovsky c8ce627c43 detect/rules: Increase array size to remove SEGV
This commit changes the size of reporting variables to be dynamic based
on the buffer ids in use instead of a fixed value to address a SEGV when
the fixed value was less than the max buffer/type id in use.

(cherry picked from commit d911fb87b8)
5 years ago
Victor Julien 4ae510205b http: error check htp_list_size
This avoids a potential casting to uint64_t of -1, leading to a very
high upper bound of the tx loop.

(cherry picked from commit e07a4393a9)
5 years ago
Philippe Antoine 1e88627db0 applayer: keep running detection on protocol change
ie do not stop on first try if we do not have enough data

(cherry picked from commit 07cbdb32b3)
5 years ago
Philippe Antoine d2fd61eb45 signature: checks for integer overflow in limits propagation
(cherry picked from commit a99ad4c1e4)
5 years ago
Philippe Antoine 48b1df8b39 detect: checks for overflow when comparing signatures priorities
(cherry picked from commit 1674239442)
5 years ago
Philippe Antoine 670dd2784b signature: checks for integer overflow in limits propagation
(cherry picked from commit 61c327dd80)
5 years ago