-
Notifications
You must be signed in to change notification settings - Fork 86
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
Bug: Multiple instances of rule options fields clobber eachother #71
Comments
I dont get the use case in which this could be misleading or considered as a bug. Could you please explain this? |
In the example above the signature has multiple content fields;
But the parsed rule object only presents the last one; |
IMO its some kind of unwanted bug caused by this line of code:
If you better inspect the parsed rule you can also note these other values which do not make sense in that place:
If you need to check for A fix can be done easily by removing that line of code. Maybe @jasonish this could be pointed out also in |
Yes, the fix will be to remove the field from the decode rules and loop through the options. This stuff has been removed from suricata-update already as its not relevant to that app. |
As per snort docs:
Example ET Rule with multiple contents:
rule.parse
output (with highlighting)While the correct
content
data is extractable from theoptions
object, this may be misleading, particularly in bulk-rule-processing (as I was doing).Suggested fixes
Either:
Make
content
a list to reflect the specification and add a specificelif name = 'content'
options->rule loop inparse
Or:
Prevent clobbering in the same loop by doing a generic
name
existence check and listifying+appending if thename
already exists in therule
The text was updated successfully, but these errors were encountered: