Skip to content

Comments

Next/20230531/v11#8945

Merged
victorjulien merged 20 commits intoOISF:masterfrom
victorjulien:next/20230531/v11
May 31, 2023
Merged

Next/20230531/v11#8945
victorjulien merged 20 commits intoOISF:masterfrom
victorjulien:next/20230531/v11

Conversation

@victorjulien
Copy link
Member

victorjulien and others added 20 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
Don't update stat from loop as it's not read until after the loop.
To reduce locking overhead in the spare pool, batch returns per
100 (spare pool block size).
Since the queue isn't fully processed every run, double counting
could happen.

Fix by only counting actually processed flows from the queue.
In case small blocks of flows are returned, try to merge
them with existing small list head. Add full block as second
in the list as with the rest of the code.
@victorjulien victorjulien requested review from a team, jasonish and jufajardini as code owners May 31, 2023 09:25
@victorjulien victorjulien mentioned this pull request May 31, 2023
@codecov
Copy link

codecov bot commented May 31, 2023

Codecov Report

Merging #8945 (5b160d2) into master (afef35b) will increase coverage by 0.04%.
The diff coverage is 82.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8945      +/-   ##
==========================================
+ Coverage   82.34%   82.39%   +0.04%     
==========================================
  Files         969      969              
  Lines      273336   273558     +222     
==========================================
+ Hits       225090   225387     +297     
+ Misses      48246    48171      -75     
Flag Coverage Δ
fuzzcorpus 64.86% <60.82%> (+0.10%) ⬆️
suricata-verify 60.46% <79.56%> (-0.02%) ⬇️
unittests 62.92% <45.96%> (-0.03%) ⬇️

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

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 14151

@catenacyber
Copy link
Contributor

What about #8878 and #8714 which are approved ?

@victorjulien victorjulien merged commit 5b160d2 into OISF:master May 31, 2023
@victorjulien
Copy link
Member Author

What about #8878 and #8714 which are approved ?

See #8951

@victorjulien victorjulien deleted the next/20230531/v11 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.

5 participants