Commit Graph

10803 Commits (10d9deec9f2293c797df7dbe8bda346d4dc7d600)
 

Author SHA1 Message Date
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.
5 years ago
Jason Ish 2ff963db16 github-ci: do distcheck on fedora 31 build
There were no distchecks being done on builds from git.
5 years ago
Jason Ish 83630015b9 github-ci: make distcheck on centos 7 build
Tests distcheck on a build from a distribution archive.
5 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
5 years ago
jason taylor 1666bc0ad1 doc: minor capitalization fix
Signed-off-by: jason taylor <jtfas90@gmail.com>
5 years ago
jason taylor 4f7dc4f136 doc: add bsize documentation and rule example
Signed-off-by: jason taylor <jtfas90@gmail.com>
5 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
5 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.
5 years ago
Victor Julien 3d9071639b version: starting work on 5.0.2 5 years ago
Victor Julien f9840b513d version: release 5.0.1 5 years ago
Victor Julien 6fa66e3ddb changelog: update for 5.0.1 5 years ago
Victor Julien 627cc23769 detect/asn1: fix offset bounds checking 5 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.
5 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
5 years ago
Victor Julien fa692df37a stream: reject broken ACK packets
Fix evasion posibility by rejecting packets with a broken ACK field.
These packets have a non-0 ACK field, but do not have a ACK flag set.

Bug #3324.

Reported-by: Nicolas Adba
5 years ago
Victor Julien 9f0294fadc stream: fix SYN_SENT RST/FIN injection
RST injection during the SYN_SENT state could trick Suricata into marking
a session as CLOSED. The way this was done is: using invalid TSECR value
in RST+ACK packet. The ACK was needed to force Linux into considering the
TSECR value and compare it to the TSVAL from the SYN packet.

The second works only against Windows. The client would not use a TSVAL
but the RST packet would. Windows will reject this, but Suricata considered
the RST valid and triggered the CLOSED logic.

This patch addresses both. When the SYN packet used timestamp support
the timestamp of incoming packet is validated. Otherwise, packet responding
should not have a timestamp.

Bug #3286

Reported-by: Nicolas Adba
5 years ago
Victor Julien 9bcc1118e1 configure: require libhtp 0.5.32 5 years ago
Victor Julien df74f34a62 decode/tcp: accept TCP fast open cookie request 5 years ago
Jason Ish 3ca7dcd8d8 configure: fix test -f for rust/vendor, should be -e
Introduced with commit: c08ec8d8b2
5 years ago
Jason Ish 69c00a77b5 github-ci: in a dist build, check that --frozen is being used
Verify that ./configure is picking up the vendored Rust sources
when building from a dist archive.
5 years ago
Victor Julien 040aff5197 htp: close request only from request side
This allows the response side to keep going for just
a bit longer.
5 years ago
Victor Julien 77539e08fc stream: in IDS mode, call app-layer at EOF
On stream end call app-layer with empty message in IDS mode.
5 years ago
Victor Julien eceb7dcba4 eve: support pcap_filename for unix socket mode
Bug #3390.
5 years ago
Daisu fccdb1c642 doc/commandline: -i option is useable several times 5 years ago
Steven Hostetler 4ac5ab00b7 doc/install: fix geoip typo 5 years ago
Victor Julien 411dd69e92 doc/eve: layout and formatting fixes 5 years ago
Jason Williams 55a36c79ff doc: update http keywords documentation 5 years ago
Philippe Antoine 4a2918e6b5 yaml: clarify comment about dump-all-headers
Logs a warning if the value is unknown
Fixes #2810
5 years ago
Jason Ish f2117774f5 configure: assume cargo vendor if cargo >= 1.37
Rust/Cargo 1.37 and greater has vendor support built-in.
5 years ago
Victor Julien 007a461d69 detect/parse: track negation during address parsing
Fix address negation detection not resolving variables when
looking for the negation.

This patch makes use of the actual parsing routines to relay this
information to the signature parser.

Bug #3389.

Fixes: 92f08d85aa ("detect/iponly: improve negation handling in parsing")
5 years ago
Victor Julien 34b7035a0d detect/iponly: debug output improvements 5 years ago
Victor Julien 618ad0d92f app-layer: optimize inspection id tracking
Increase the inspect id for a completely inspected tx in any case.
This avoids re-evaluating transactions.

Reported-by: Ilya Bakhtin
5 years ago
Victor Julien f5b33a070a smb1: allow empty trans records 5 years ago
Victor Julien 40fe29de96 smb1: fix 'event' txs not getting closed
If the only reason we created a request side TX was to set an event,
we would not close it.

This patch always looks up the TX from the response side.
5 years ago
Victor Julien 129cd28058 smb/dcerpc: close request tx sooner 5 years ago
Victor Julien 44ac3e30dd smb: post-GAP handling update
Close all prior transactions in the direction of the GAP, except the
file xfers. Those use their own logic.
5 years ago
Victor Julien a7ee2ffbde smb: winreg is a DCERPC facility 5 years ago
Victor Julien f302f3543f files: add call for setting inspect sizes
The inspect sizes are currently only used during file prune
house keeping for SMTP.
5 years ago
Victor Julien f9f958d66e smtp: fix and clean up new file handling
Set tx id on files that were just opened.

Move logic to a small util func.
5 years ago
Victor Julien 683b22d114 smtp: use FILE_USE_DETECT for raw-extract 5 years ago
Victor Julien 21760bfc76 files: change pruning behavior
If file prune is called inspect has already run. So if file is closed
we can just prune. No need to consider a window anymore.

When still in progress, fix the left_edge calculation.
5 years ago
Victor Julien 682014619f files: fix FILE_USE_DETECT with --disable-detection
Don't set FILE_USE_DETECT flag if detect is disabled.
5 years ago
Victor Julien 4ac9cd2c70 files: move smtp prune logic to main
Now that we call the file prune loop very regularly, we can move the
SMTP specific inspection pruning logic into this loop. Helps with
cases there we don't (often) update a files inspection trackers.
5 years ago
Victor Julien 4b7599af90 http/file: modernize unittests
Part of ticket #2975.
5 years ago
Victor Julien 1cdb2182e4 fastlog: apply icmp type logic to icmpv6 too 5 years ago
Victor Julien 5ef05ffad1 http/multipart: small cleanup 5 years ago
Victor Julien aae00df4df http/multipart: use wider type for boundary lengths
Use uint32_t for a local type instead of uint8_t to avoid casts.

Length should always stay under this regardless.
5 years ago
Victor Julien 4d0db9cb4a http/multipart: optimize form end search
If we already know that the boundary exists, we can start looking
there. Otherwise, we can skip trying as the boundary is a subset
of the form end marker.
5 years ago
Victor Julien 54d93e1eb9 http/multipart: process incomplete file data
Start processing multipart data as soon as it is available to
allow inspection sooner.
5 years ago
Jeff Lucovsky fcfb679893 detect/analyzer: Suppress direction warnings
This commit ensures direction warnings for ICMP v4 and v6
are suppressed and corrects check so that both protocols
are checked (instead of the same protocol being checked twice).
5 years ago