Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next/20180129/v13 #3202

Merged
merged 52 commits into from Jan 30, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
4a89d93
.gitignore: only ignore *.yaml in root directory
jasonish Jan 25, 2018
288ddc9
rust/core: comment cleanup
victorjulien Jan 25, 2018
45c5030
rust/file: change return type for FileOpenFileWithId
victorjulien Jan 25, 2018
3a2e461
rust/file: handle file open errors
victorjulien Jan 25, 2018
ce08a43
file: use enum for state
victorjulien Jan 25, 2018
d75d9d0
file: minor cleanups
victorjulien Jan 25, 2018
d27ed59
rust/nfs: fix read reply handling
victorjulien Jan 25, 2018
2c3c8f8
rust/filetracker: if file API return error, trunc file
victorjulien Jan 25, 2018
e893933
rust/nfs: explicitly handle GAPs from C
victorjulien Jan 25, 2018
0ff60f6
doc: update filestore for file hash extraction
macpas Jan 26, 2018
b9cf49e
rust/tftp: add tftp parsing and logging
Oct 20, 2017
80f2fba
rust/tftp: eve logging with rust
macpas Jan 23, 2018
251156e
pcre: don't leak memory in data extraction
victorjulien Jan 29, 2018
89dc05d
stream/app-layer: fix GAP handling issue
victorjulien Nov 10, 2017
700781c
enip: support gaps
victorjulien Nov 21, 2017
e1ef57c
stream: still inspect packets dropped by stream
victorjulien Jan 24, 2018
d1adf5f
stream: handle data on incomplete 3whs
victorjulien Jan 24, 2018
ca67408
stream: set event for suspected data injection during 3whs
victorjulien Jan 24, 2018
4992702
http: add tests for malformed response lines
victorjulien Nov 12, 2017
e649411
htp: allow HTTP pickup of response data
victorjulien Nov 12, 2017
c0d26de
stream: improve overlap detection
victorjulien Jan 26, 2018
daeba48
htp: remove usused flags
victorjulien Jan 26, 2018
9ca71be
htp: remove usused file flags
victorjulien Jan 26, 2018
07cbbfb
htp: code cleanups
victorjulien Jan 26, 2018
c63b1ce
htp: remove used body operation field
victorjulien Jan 26, 2018
e86be22
htp: remove unused field from tx state
victorjulien Jan 26, 2018
6f339ab
htp: minor debug addition
victorjulien Jan 29, 2018
5138f99
eve: top level metadata object
jasonish Dec 11, 2017
dd988d9
eve: metadata setting to enable/disable metadata
jasonish Dec 11, 2017
88ac0f2
eve: tls: respect global metadata config
jasonish Dec 11, 2017
32da579
eve: ssh: respect global metadata config
jasonish Dec 11, 2017
7f5439a
eve: dnp3: respect global metadata config
jasonish Dec 11, 2017
b577f4a
eve: smtp: respect global metadata config
jasonish Dec 11, 2017
885452f
eve: nfs: respect global metadata config
jasonish Dec 11, 2017
2247b9a
eve: email: respect global metadata config
jasonish Dec 11, 2017
5da5fc1
eve: drop: global metadata config
jasonish Dec 11, 2017
4a05160
eve: alert: global metadata config
jasonish Dec 11, 2017
23bbbc5
eve: dns: global metadata config
jasonish Dec 11, 2017
790ce37
eve: flow: global metadata config
jasonish Dec 11, 2017
3eaca7c
eve: http: global metadata config
jasonish Dec 11, 2017
a23d54c
eve: netflow: global metadata config
jasonish Dec 11, 2017
34811cf
json-vars: rename to metadata and use new metadata format
jasonish Jan 24, 2018
572a62f
output-json-vars: rename to metadata
jasonish Jan 24, 2018
0e02684
doc: update eve-log section for metadata
jasonish Jan 25, 2018
1f47f77
eve/metadata: special handling for traffic-id labels
jasonish Jan 25, 2018
b659222
eve/metadata: log flowvars as a list of k/v pairs
jasonish Jan 25, 2018
93b056d
eve/alert: log metadata be default
jasonish Jan 25, 2018
ab939f4
doc: breakout eve-log section to a partial file
jasonish Jan 25, 2018
dfae329
rust: don't gen C headers if Rust isn't enabled
victorjulien Jan 29, 2018
6e82df2
rust: update dependencies
victorjulien Jan 29, 2018
6f7e24d
autogen/rust: remove Cargo.lock
victorjulien Jan 30, 2018
d0ea147
travis/rust: update rust minimum to 1.21
victorjulien Jan 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
stream: still inspect packets dropped by stream
The detect engine would bypass packets that are set as dropped. This
seems sane, as these packets are going to be dropped anyway.

However, it lead to the following corner case: stream events that
triggered the drop could not be matched on the rules. The packet
with the event wouldn't make it to the detect engine due to the bypass.

This patch changes the logic to not bypass DROP packets anymore.
Packets that are dropped by the stream engine will set the no payload
inspection flag, so avoid needless cost.
  • Loading branch information
victorjulien committed Jan 30, 2018
commit e1ef57c848bbe4e567d5d4b66d346a742e3f77a1
7 changes: 3 additions & 4 deletions src/detect.c
Expand Up @@ -1610,10 +1610,7 @@ static void DetectFlow(ThreadVars *tv,
DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
Packet *p)
{
/* No need to perform any detection on this packet, if the the given flag is set.*/
if ((p->flags & PKT_NOPACKET_INSPECTION) ||
(PACKET_TEST_ACTION(p, ACTION_DROP)))
{
if (p->flags & PKT_NOPACKET_INSPECTION) {
/* hack: if we are in pass the entire flow mode, we need to still
* update the inspect_id forward. So test for the condition here,
* and call the update code if necessary. */
Expand All @@ -1629,6 +1626,8 @@ static void DetectFlow(ThreadVars *tv,
flags = FlowGetDisruptionFlags(p->flow, flags);
DeStateUpdateInspectTransactionId(p->flow, flags, true);
}
SCLogDebug("p->pcap %"PRIu64": no detection on packet, "
"PKT_NOPACKET_INSPECTION is set", p->pcap_cnt);
return;
}

Expand Down
4 changes: 4 additions & 0 deletions src/stream-tcp.c
Expand Up @@ -4739,6 +4739,10 @@ int StreamTcpPacket (ThreadVars *tv, Packet *p, StreamTcpThread *stt,
}

if (StreamTcpInlineDropInvalid()) {
/* disable payload inspection as we're dropping this packet
* anyway. Doesn't disable all detection, so we can still
* match on the stream event that was set. */
DecodeSetNoPayloadInspectionFlag(p);
PACKET_DROP(p);
}
SCReturnInt(-1);
Expand Down