detect/proto: check ipproto enabled setting first#14715
detect/proto: check ipproto enabled setting first#14715
Conversation
So far, suricata.yaml was probed by default for `app-layer.protocols.PROTOCOL.enabled`. If this was not found, then, an attempt was made to look for `app-layer.protocols.PROTOCOL.IPPROTO.enabled`. This is not ideal behavior and restricts user to explicitly disable a carrier proto specific protocol. By default, check for carrier proto specific setting. If it is not found, then fall back to the generic setting. Bug 8205
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14715 +/- ##
=======================================
Coverage 82.14% 82.15%
=======================================
Files 1007 1007
Lines 263194 263194
=======================================
+ Hits 216210 216228 +18
+ Misses 46984 46966 -18
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Information: QA ran without warnings. Pipeline = 29335 |
If this is correct, why do we see the SV tests fail w/o this PR? |
Great question. I should have clarified that s-v tests specifically use different combinations to show behaviors when we have inconsistent settings. Such settings are not shipped by us in suricata.yaml by default. dns:
tcp:
enabled: yes
detection-ports:
dp: 53
udp:
enabled: yes
detection-ports:
dp: 53but the tests go on to show the bug as defined in the ticket and commit message in case a global So, in conclusion, maybe my claim is wrong. It is based on the assumption that one would only use protocol enabling setting as shipped with default |
|
Right, so I would classify this as a behavior change, even if it is one at a low risk of affecting many users. Still I would say it requires at least an upgrade note. |
|
Are we warning on settings that are internally inconsistent? |
No. Maybe I misunderstood and thought that we decided to:
I can do warnings as well. That'll require reading all settings irrespective of a need for fallback. Coming up in the next rev. Thank you! 🙇🏽♀️ |
|
I think for example global enabled but then all ipprotos disabled should warn. Same for reverse. |
catenacyber
left a comment
There was a problem hiding this comment.
See inline like
Still I would say it requires at least an upgrade note.
These generic fn calls are per ipproto supported by the respective applayer parser so, going with:
|
Previous PR: #14713
Link to ticket: https://redmine.openinfosecfoundation.org/issues/8205
Changes since v3:
SV_BRANCH=OISF/suricata-verify#2893
Note: This should NOT affect any existing setups and configs. If you see that happening, it should be reported as a bug.