Commit Graph

10589 Commits (fd3c7d5ce8e554602f3c3b9572db051d877a274d)
 

Author SHA1 Message Date
Victor Julien fd3c7d5ce8 version: release 5.0.2 6 years ago
Victor Julien 8ad874e369 changelog: update for 5.0.2 6 years ago
vanlink 61e938f4b7 stream/reassembly: fix data overlap check
Fix function CheckOverlap bug.

(cherry picked from commit 2456f27d08)
6 years ago
Victor Julien 908ba0f8b4 nfs: implement post-GAP transaction cleanup
Close all prior transactions in the direction of the GAP, except the
file xfers. Those use their own logic described below.

After a GAP all normal transactions are closed. File transactions
are left open as they can handle GAPs in principle. However, the
GAP might have contained the closing of a file and therefore it
may remain active until the end of the flow.

This patch introduces a time based heuristic for these transactions.
After the GAP all file transactions are stamped with the current
timestamp. If 60 seconds later a file has seen no update, its marked
as closed.

This is meant to fix resource starvation issues observed in long
running SMB sessions where packet loss was causing GAPs. Due to the
similarity of the NFS and SMB parsers, this issue is fixed for NFS
as well in this patch.

Bug #3424.
Bug #3425.

(cherry picked from commit f68c255f09)
6 years ago
Victor Julien ac800d0ddf tls: fix missing extern logic for cert_id tracking 6 years ago
Victor Julien 9985cc275c stats: fix missing extern keyword 6 years ago
Victor Julien 471bb2d14a defrag: fix use of globals 6 years ago
Victor Julien 15ad0d551f threading: fix queue handlers globals use 6 years ago
Victor Julien 89757fe300 htp: fix globals use for flags 6 years ago
Victor Julien 11a97da38b proto: fix globals use 6 years ago
Victor Julien e8573f4d00 flow: fix global variable use 6 years ago
Victor Julien 67d53f9139 stream: fix global declaration of the config 6 years ago
Victor Julien d635eabfb6 threading/modules: fix global declarations 6 years ago
Victor Julien 3ee1f571f4 ippair: fix global declarations 6 years ago
Victor Julien 0fce01762a host: fix global declarations 6 years ago
Victor Julien 966df16825 mpm: fix global declarations 6 years ago
Victor Julien ff1076efdd detect: fix global declaration of sigmatch_table 6 years ago
Victor Julien 50673572a1 spm: fix global declaration of spm_table 6 years ago
Victor Julien 04d546d3cd threading: fix global declaration of threading_set_cpu_affinity 6 years ago
Victor Julien bd3fac73b1 threading: fix global declaration of trans_q 6 years ago
Victor Julien 6865043431 unix-socket: avoid using global variable w/o extern 6 years ago
Victor Julien 72858acf08 decode: fix default-packet-size global variable 6 years ago
Timo Sigurdsson e1b363b416 init: Fix dropping privileges in nflog runmode
Using the run-as configuration option with the nflog capture method
results in the following error during the startup of suricata:
[ERRCODE: SC_ERR_NFLOG_BIND(248)] - nflog_bind_pf() for AF_INET failed

This is because SCDropMainThreadCaps does not have any capabilities
defined for the nflog runmode (unlike other runmodes). Therefore, apply
the same capabilities to the nflog runmode that are already defined for
the nfqueue runmode. This has been confirmed to allow suricata start
and drop its privileges in the nflog runmode.

Fixes redmine issue #3265.

Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
(cherry picked from commit 1262ecbde0)
6 years ago
Victor Julien 43ee9d8b9b afl: fix compilation
(cherry picked from commit f05c12b70f)
6 years ago
Jason Ish 8a6d4baf04 defrag: set livedev on the reassembled packet (issue-3380)
Set the livedev on reassembled packets to that of the parent
packet. Fixes issues with multidetect, specifically a segfault
as reported in issue 3380.

Bug #3380.

(cherry picked from commit d1eab5aa46)
6 years ago
Victor Julien 36902bab31 rust/rpc: add partial data test 6 years ago
Victor Julien 060781cef8 smb: handle file transactions post-GAP
After a GAP all normal transactions are closed. File transactions
are left open as they can handle GAPs in principle. However, the
GAP might have contained the closing of a file and therefore it
may remain active until the end of the flow.

This patch introduces a time based heuristic for these transactions.
After the GAP all file transactions are stamped with the current
timestamp. If 60 seconds later a file has seen no update, its marked
as closed.

This is meant to fix resource starvation issues observed in long
running SMB sessions where packet loss was causing GAPs.
6 years ago
Jason Ish 95a408f77d flow: expose last time as a function
This function returns the individual components
of the timeval in output pointers making it suitable
for use over Rust FFI.
6 years ago
Victor Julien 2c050187a3 streaming/api: fix overlap check
In some cases a SBB could be seen as overlapping with the requested
offset, when it was in fact precisely before it. In some special cases
this could lead to the stream engine not progressing the 'raw' progress.
6 years ago
Victor Julien 0f41cf3d74 debug/validation: check tcp/app-layer data lengths 6 years ago
Victor Julien a742c86741 stream: improve app-layer data retrieval with GAPs
Don't assume that the next block after the sbb head is after the
requested offset.

If the next block was before the offset, the returned data_len
would underflow and return a nonsense value to the app-layer.

Bug #2993.
6 years ago
Jeff Lucovsky ed2f6ac64b modbus: Correct typo 6 years ago
Jeff Lucovsky d4428d94de modbus: Update correct TX flags 6 years ago
Jeff Lucovsky 6c2cdbb5f0 analysis: exit if table entries are stale
This commit causes Suricata to exit when a buffer from the analyzer
table is not recognized.

Since the table must match what's registered, exiting will bring noticed
to the condition.
6 years ago
Victor Julien ce0ae81d95 rust: fix vendor use on MinGW 6 years ago
Jason Ish 57b683233d rust: Don't use --frozen during build.
If sources are vendored, we get the same effect of using frozen
with a lock file, and the Cargo.lock is generated based
on the vendored sources.

This also removes the need to ship a Cargo.lock.

Fixed out of source builds with vendored sources.
6 years ago
Jason Ish c6f168eb98 rust/Makefile: Don't include Cargo.toml
There is no need to include Cargo.toml in the distribution,
it is always generated from Cargo.toml.in during
./configure.
6 years ago
Jason Ish 2ff963db16 github-ci: do distcheck on fedora 31 build
There were no distchecks being done on builds from git.
6 years ago
Jason Ish 83630015b9 github-ci: make distcheck on centos 7 build
Tests distcheck on a build from a distribution archive.
6 years ago
Shivani Bhardwaj 700eebaecc doc/conf: Update copyright and regex for version
Make the new regex in compliance with the modern autoconf syntax.
Closes redmine ticket #3423
6 years ago
jason taylor 1666bc0ad1 doc: minor capitalization fix
Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years ago
jason taylor 4f7dc4f136 doc: add bsize documentation and rule example
Signed-off-by: jason taylor <jtfas90@gmail.com>
6 years ago
Jason Ish 5ee8323028 rust: remove unnecessary parentheses (Rust 1.40 fixup)
Rust 1.40 in strict mode will now fail the build on the
presence of unnecessary parentheses.

warning: unnecessary parentheses around type
  --> src/smb/smb2_ioctl.rs:41:12
   |
41 |         -> (&mut SMBTransaction)
   |            ^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
   |
   = note: `#[warn(unused_parens)]` on by default
6 years ago
Jason Ish b9515671be github-ci: use container for 18.04 build
As the action runs natively on 18.04 we were not explicitly
setting a container, but this means we're using what GitHub
provides us as a default state which might be broken. Instead
use the standard Ubuntu 18.04 container.
6 years ago
Victor Julien 3d9071639b version: starting work on 5.0.2 6 years ago
Victor Julien f9840b513d version: release 5.0.1 6 years ago
Victor Julien 6fa66e3ddb changelog: update for 5.0.1 6 years ago
Victor Julien 627cc23769 detect/asn1: fix offset bounds checking 6 years ago
Jason Ish 8609939e60 ipv4: continue parsing options after invalid option
As long as an option has a valid length, we can continue
parsing the options after an invalid one.
6 years ago
Jason Ish df8db1ddb0 ipv4: fail packet decoding on bad ipv4 option length
Currently all failures in IPv4 option decode are ignore with
respect to continuing to handle the packet.

Change this to fail, and abort handling the packet if the
option length is invalid.

Ticket 3328:
https://redmine.openinfosecfoundation.org/issues/3328
6 years ago