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/733/20250219/v1 #12625

Merged
merged 19 commits into from
Feb 19, 2025
Merged

Conversation

jufajardini and others added 19 commits February 19, 2025 09:21
For setting s->init_data for flowbit rules impacted by `set`, we can
first check whether this will be needed, and *then* walk over the
flowbits array.
Flowbits can make a rule such as a packet rule be treated as a stateful
rule, without actually changing the rule type.

Add a flag to allow reporting such cases via engine analysis.

Task OISF#7456
Ticket: 7560

When passing INT32_MIN aka 0x80000000, we cannot compute -vali
as it does not fit into a i32
for flow.pkts and flow.bytes keywords

Ticket: 7562

Avoid null deref when parsing flow.bytes:toserver;
Remove comparisons with true or false with C bools.
Some backend messages can be the shortest pgsql length possible,
4 bytes, but the parser expectd all messages to be longer than that.

Related to
Bug OISF#5524
The initial parsing for message type checking was more complex than
needed be.

Related to
Bug OISF#5524
Building on top of work done by Jason Ish.

Related to
Bug OISF#5524
Some inner parsers were using it, some weren't. Better to standardize
this. Also take the time to avoid magic numbers for representing the
expected lengths for pgsql PDUs.
Also throwing PgsqlParseError and allowing for incomplete results.

Related to
Task OISF#5566
Bug OISF#5524
Even if unknown, if the message is properly parsed, allow the parser to
proceed.

Related to
Bug OISF#5524
This allows the app-proto to continue onto parsing next PDUs, if
possible.

Bug OISF#5524
Events for:
- parsing error when parsing pgsql packet length
- parsing error for pgsql requests (post length parsing)
- parsing error for pgsql responses (post length parsing)
- too many transactions

Include `pgsql-events.rules` file, and PGSQL events SID range definition

Task OISF#5566
No state change, but since we added Unknown responses, we should handle
that case -- should we have a specific state for such cases?

Related to
Bug OISF#5524
Task OISF#5566
This may happen in some situations if the app-layer parser only sees
unknown messages and sets an event: there will be an empty transaction,
but nothing to log.

Related to
Task OISF#5566
Use the expanded form of localstatedir in autoconf.h instead of the
unexpanded one, the difference being:

    #define LOCAL_STATE_DIR "${prefix}/var"

and

    #define LOCAL_STATE_DIR "/usr/local/var"

assuming default ./configure arguments.

Fixes commit b6a610d.
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 89.26014% with 45 lines in your changes missing coverage. Please review.

Project coverage is 80.77%. Comparing base (10ede91) to head (6fc617c).
Report is 19 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12625      +/-   ##
==========================================
+ Coverage   80.74%   80.77%   +0.03%     
==========================================
  Files         931      932       +1     
  Lines      259144   259286     +142     
==========================================
+ Hits       209242   209437     +195     
+ Misses      49902    49849      -53     
Flag Coverage Δ
fuzzcorpus 57.01% <61.21%> (+0.04%) ⬆️
livemode 19.37% <7.38%> (-0.02%) ⬇️
pcap 44.15% <16.62%> (-0.01%) ⬇️
suricata-verify 63.48% <85.86%> (+0.04%) ⬆️
unittests 58.34% <41.05%> (+<0.01%) ⬆️

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

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is green
Consistent with approved PRs
SV PR matches all the needed individual SV PRs

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 24784

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