Commit Graph

12774 Commits (suricata-6.0.20)
 

Author SHA1 Message Date
Jason Ish 20952ba8e0 http2: convert transaction list to vecdeque
Allows for more efficient removal from front of the list.

Ticket: #5296
(cherry picked from commit 2db84726ad)
2 years ago
Jason Ish 506c45f934 rdp: convert transaction list to vecdeque
Allows for more efficient removal from front of the list.

Ticket: #5295
(cherry picked from commit 4e0ad5e0bd)
2 years ago
Jason Ish 5f728464e4 dns: convert transaction list to vecdeque
Allows for more efficient removal from front of the list.

Ticket: #5277
(cherry picked from commit 3189414788)
2 years ago
Philippe Antoine d362e45d72 smb: convert transaction list to vecdeque
Allows for more efficient removal from front of the list.

Ticket: #5753
(cherry picked from commit 1d9183638f)
2 years ago
Philippe Antoine 401a1b36b1 http2: avoid quadratic complexity in headers
When adding an element to the dynamic headers table, the oldest
ones may get evicted. When multiple elements get evicted, they
should get evicted all at once with drain, instead of one by one
as there will be a massive move each time.

Ticket: #6103
(cherry picked from commit 6350736882)
2 years ago
Jason Ish 2e4aade51d dns: split header and body parsing
As part of extra header validation, split out DNS body parsing to
avoid the overhead of parsing the header twice.

(cherry picked from commit d720ead470)
2 years ago
Jason Ish 0b283ef4a6 dns: validate header on every incoming message
As UDP streams getting probed, a stream that does not appear to be DNS
at first, may have a single packet that does look close enough to DNS
to be picked up as DNS causing every subsequent packet to result in a
parser error.

To mitigate this, probe every incoming DNS message header for validity
before continuing onto the body.  If the header doesn't validate as
DNS, just ignore the packet so no parse error is registered.

(cherry picked from commit 595700ab7e)
2 years ago
Jason Ish dbaf63df5a dns: parse and alert on invalid opcodes
Accept DNS messages with an invalid opcode that are otherwise
valid. Such DNS message will create a parser event.

This is a change of behavior, previously an invalid opcode would cause
the DNS message to not be detected or parsed as DNS.

Issue: #5444
(cherry picked from commit c98c49d4ba)
2 years ago
Jason Ish 66b36f4de1 dns: mark test buffers with rustfmt::skip
(cherry picked from commit 39d2524bf6)
2 years ago
Victor Julien b46d54178a counters: make tcp stats independent of flow, ssn
Counters depended on availability of flow and tcp session, meaning
that 2 memcaps could affect the counters.

Bug: #5017.
(cherry picked from commit 36f6e05155)
2 years ago
Victor Julien e275a1e28e stream: update no-flow checks
(cherry picked from commit 0360cb6542)
2 years ago
Jason Ish 13dbb5d11a windows: add -lntdll to Windows builds
Rust 1.70 has introduced some possible issues between LLVM and gcc
causing link errors that are fixed by explicitly adding -lntdll.

Thanks to https://github.com/extendr/rextendr/pull/285 for the fix.
2 years ago
Shivani Bhardwaj 1b9e4fba06 ftp: don't decrement truncated line len
In case LF was found for a long line way outside of the limit, we should
not need to update the delimiter len and current line len because the
line is capped at 4k and the LF was not within these 4k bytes.
2 years ago
Shivani Bhardwaj 544ac300a9 ftp: separate truncated line markers
So far, we store one variable in state to hold whether we want to
discard a long line till LF irrespective of direction. This means that a
long command to the client followed by a regular command w LF can be
considered as one long line which is incorrect.

Bug 6055
2 years ago
Victor Julien ad041da715 windivert: fix compile warnings
(cherry picked from commit fd93f002a0)
2 years ago
Jason Ish f5f2dc996b rust/doc: wrap some code examples in backticks
(cherry picked from commit 13fe957b7e)
2 years ago
Victor Julien 6767b1ce22 detect: remove flow drop unittest
Test broke after recent changes. Functionality is tested in
suricata-verify, so just remove the test.

(cherry picked from commit 8a535a0b89)
2 years ago
Victor Julien 5c2e6c4b83 detect: add check to validate drops
(cherry picked from commit 95bf7248e8)
2 years ago
Victor Julien 644a231e9a detect: fix stateful drops for rate_filter
(cherry picked from commit 418cc1fe94)
2 years ago
Victor Julien 043bbb9f51 flow/timeout: no pseudo packets for dropped flows
When a flow is in the drop flow state, don't use pseudo packets
when it is timing out. There should be no work left to do at this
point.

(cherry picked from commit 2a95154712)
2 years ago
Victor Julien 4b9cac426a stream: simplify drop handling
Remove logic to apply flow drop, as this is now handled in the
flow engine.

However, keep the logic that frees/cleans the session state.

(cherry picked from commit d91a1e8bc6)
2 years ago
Victor Julien 416cc8455f app-layer: don't update UDP applayer for dropped packets
(cherry picked from commit 77f49661fd)
2 years ago
Victor Julien 66aed4471d detect: update/document drop flow logic
Now that flow drop is applied to packets before other processing,
no drop has to be issued on a packet.

(cherry picked from commit 85ddba63f6)
2 years ago
Victor Julien 49051b637e flow: apply flow to packet on flow lookup
Issue drop to packet as early as possible.

(cherry picked from commit 71a033ac62)
2 years ago
Victor Julien cd1246808d version: start development towards 6.0.13 2 years ago
Shivani Bhardwaj 809aebfee1 release: 6.0.12; update changelog 2 years ago
Victor Julien 145cf4355c github-ci: add windivert build
(cherry picked from commit 74326a43e7)
2 years ago
Jason Ish 57a91d3342 github-ci: add windows build for libpcap
(cherry picked from commit 5037c86b49)
2 years ago
Jason Ish 298f68fd74 configure: fallback to libpcap on Windows
If npcap/wpcap is not found on Windows, try libpcap. This allows
Suricata to build without NPCap on Windows, however live capture won't
be available.

(cherry picked from commit 31ba4fd152)
2 years ago
Victor Julien 18a71913e3 respond/reject: fix IPv6 TCP resets
Fix length and next header field settings.

Bug: #6038.
(cherry picked from commit 235ee36211)
2 years ago
Victor Julien 8acf711667 respond/reject: minor code cleanups
(cherry picked from commit 1f0aed0775)
2 years ago
Victor Julien 2084354426 respond/reject: minor cleanups
(cherry picked from commit adf0bef7f0)
2 years ago
Morris Chan e10cd5618b yaml: grammar fixup
(cherry picked from commit b9aac6dd18)
2 years ago
Victor Julien 017c689078 doc: fix description of iptables rules
(cherry picked from commit a006aef4d0)
2 years ago
Andreas Herz c9bde24756 doc: add note on the hashsize recommendation for datasets
(cherry picked from commit 3045e75ee1)
2 years ago
Victor Julien 653379fb01 doc/install: point to userguide
(cherry picked from commit 4dbdaf8a8e)
2 years ago
Victor Julien b63ea6e584 doc: remove legacy windows install guide
(cherry picked from commit 19cabc9a02)
2 years ago
Victor Julien 8d316f7de5 doc: remove legacy pfring install guide
(cherry picked from commit 01f43604b9)
2 years ago
Victor Julien bf382a6672 prscript: remove as it is obsolete
(cherry picked from commit 9520aac79c)
2 years ago
Wes Hurd e7690edb21 doc: add docutils.conf to disable smart quotes
(cherry picked from commit aee41957e1)
2 years ago
Shivani Bhardwaj e95e9281ca smtp: return on line completion
Problem:
If we receive a long line w/o LF, we cap it to 4k bytes and wait until a
line with LF comes in order to consider the previous line complete. Any
data post the 4k bytes is discarded. Currently, if a line with LF comes
in after a long line, we reset all the parameters used for processing it
like the line.len and line.delim_len but we still make the call to
SMTPProcessRequest fn without even the need to process anything. Since
such a line (with len and delim_len set to 0) should not reach mime
decoder, a debug assertion triggers there in this case.

Fix:
Make sure to return early as the line has to be skipped and not
processed at all.

Bug 6019

(cherry picked from commit c0067a5fff)
2 years ago
tianjinshan 708bdf79fa smb/ntlmssp: fix parsing of negotiate flags
Ticket: #5783
(cherry picked from commit 2c0c6cb0a5)
2 years ago
Jeff Lucovsky cb71800f7b pfring: Packet structure for ts fix
Issue: 5818

This commit addresses the issue with using the address of a packed
member of a structure. The pfring timeval is within a packed structure.

(cherry picked from commit 2d28c09ea1)
2 years ago
Jeff Lucovsky 0730fdcd6b add to doc/pfring: Document additional cluster types
(cherry picked from commit 0ad6d4358f)
2 years ago
Jeff Lucovsky d782647af8 gen: Typo correction
This commit fixes various typos in the pf-ring source modules.

Issue: 5975
(cherry picked from commit e26e7b4f0a)
2 years ago
Jeff Lucovsky 32da57bce3 config/pf-ring: Change default cluster type: cluster_flow
This commit changes the default pf-ring cluster type to cluster-flow.
Round-robin clustering is not recommended for Suricata.

Issue: 5975
(cherry picked from commit 4f7a36ac2e)
2 years ago
Jeff Lucovsky 28026024c3 config/pf-ring: Recognize and set add'l cluster types
This commit extends the pf-ring config parser to recognize the
additional cluster types:
- cluster_inner_flow
- cluster_inner_flow_2_tuple
- cluster_inner_flow_4_tuple
- cluster_inner_flow_5_tuple

Issue: 5975
(cherry picked from commit b21a4ded6e)
2 years ago
Jeff Lucovsky a5752d138e pf-ring: Add add'l cluster types
This commit adds preprocessor values for additional pf-ring
cluster-types:
- CLUSTER_INNER_FLOW
- CLUSTER_INNER_FLOW_2_TUPLE
- CLUSTER_INNER_FLOW_4_TUPLE
- CLUSTER_INNER_FLOW_5_TUPLE

Issue: 5975
(cherry picked from commit 0ac3bee423)
2 years ago
Jeff Lucovsky ae15d3369c config/pfring: Document add'l pf-ring cluster types
This commit adds additional cluster-types for use with the pf-ring
packet source.

Issue: 5975
(cherry picked from commit 62f4049705)
2 years ago
Jeff Lucovsky 581c06bee5 doc/pfring: Document additional cluster types
This commit adds brief discussion for additional cluster types for use
with the pf-ring packet source.

Newly added:
- cluster_inner_flow
- cluster_inner_flow_2_tuple
- cluster_inner_flow_4_tuple
- cluster_inner_flow_5_tuple

Issue: 5975
(cherry picked from commit b1918168f9)
2 years ago