Skip to content

Comments

Next/20230530/v9#8942

Closed
victorjulien wants to merge 16 commits intoOISF:masterfrom
victorjulien:next/20230530/v9
Closed

Next/20230530/v9#8942
victorjulien wants to merge 16 commits intoOISF:masterfrom
victorjulien:next/20230530/v9

Conversation

victorjulien and others added 16 commits May 25, 2023 17:18
Instead of using flags to indicate a rule type, use an explicit `type`
field.

This will make it more clean in code paths what paths a rule is taking,
and will allow easier debugging as well as analyzer output.

Define the following fields:

- SIG_TYPE_IPONLY: sig meets IP-only criteria and is handled by the IP-only
  engine.
- SIG_TYPE_PDONLY: sig inspects protocol detection results only.
- SIG_TYPE_DEONLY: sig inspects decoder events only.
- SIG_TYPE_PKT:    sig is inspected per packet.
- SIG_TYPE_PKT_STREAM: sig is inspected against either packet payload or
  stream payload.
- SIG_TYPE_STREAM: sig is inspected against the reassembled stream
- SIG_TYPE_APPLAYER: sig is inspected against an app-layer property, but not
  against a tx engine.
- SIG_TYPE_APP_TX: sig is inspected the tx aware inspection engine(s).

Ticket: OISF#6085.
Per rule type record properties of the type.

Example output:

    {
        "raw": "alert udp any any -> any any (msg:\"UDP with flow direction\"; flow:to_server; sid:1001;)",
        "id": 1001,
        "gid": 1,
        "rev": 0,
        "msg": "UDP with flow direction",
        "app_proto": "unknown",
        "requirements": [],
        "type": "pkt",
        "flags": [
            "src_any",
            "dst_any",
            "sp_any",
            "dp_any",
            "toserver"
        ],
        "pkt_engines": [],
        "frame_engines": [],
        "lists": {}
    }

Ticket: OISF#6085.
Some very minor changes to formatting.
Use try_reserve before growing the internal buffer, and the internal
state vector. This allows allocation errors to be caught and an error
returned instead of just aborting the process.

Ticket: OISF#6057
For 7.0 multiple includes are allowed, but marked as
deprecated. Update the example to show the new way of pulling in
multiple includes.
Two "Logging changes" sections existed, merge.
Document how to use include files, plus add a deprecation notice on
the use of multiple "include" statements.
Adds PDU, Header and Data frame to the MQTT parser.
Ticket: 5731
get_tx_by_pkt_id loops only over the last transactions
in case there is a transaction flood

Ticket: OISF#6100
@victorjulien victorjulien requested review from a team, jasonish and jufajardini as code owners May 30, 2023 11:43
@victorjulien
Copy link
Member Author

replaces #8941

@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Merging #8942 (98dcf7a) into master (afef35b) will increase coverage by 0.03%.
The diff coverage is 82.97%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8942      +/-   ##
==========================================
+ Coverage   82.34%   82.38%   +0.03%     
==========================================
  Files         969      969              
  Lines      273336   273526     +190     
==========================================
+ Hits       225090   225342     +252     
+ Misses      48246    48184      -62     
Flag Coverage Δ
fuzzcorpus 64.85% <70.05%> (+0.09%) ⬆️
suricata-verify 60.48% <78.57%> (+<0.01%) ⬆️
unittests 62.94% <54.37%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information:

ERROR: QA failed on SURI_TLPW1_files_sha256.

ERROR: QA failed on SURI_TLPR1_alerts_cmp.

field baseline test %
SURI_TLPR1_stats_chk
.uptime 1102 1357 123.14%
.tcp.active_sessions 0 362 -
.flow.active 0 100832 -
.flow.get_used 0 100832 -
.flow.get_used_eval 0 11129216 -
.flow.get_used_eval_reject 0 6435 -
.flow.get_used_eval_busy 0 2463 -
.flow.get_used_failed 0 1534360 -
.flow.emerg_mode_entered 0 2 -
.flow.emerg_mode_over 0 2 -
.flow.memuse 526058088 3242705240 616.42%
.app_layer.error.tls.parser 23942 29751 124.26%

Pipeline 14134

@victorjulien victorjulien mentioned this pull request May 31, 2023
@victorjulien
Copy link
Member Author

Not merging due to the smb related QA issues. Needs investigation.

replaced by #8945

@victorjulien victorjulien deleted the next/20230530/v9 branch June 16, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants