-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
YARA reports incorrect errors in rules when a single rule is badly formatted #1294
Comments
I think you have missed the "and" in the bad_condition rule. |
Yes, that is deliberate to illustrate the issue. YARA 4.0 reports a bug in the second (non bugged) rule, when the first rule contains a bug. YARA 3.11 did not do this. |
Ah, just checked. nice catch! |
We ran into this at work, I’m hoping to debug it this week. |
Fixed in 02e7c97 |
Thank you for the fix @plusvic - I woke up this morning expecting to dig into this and am happy I don't have to. :) |
Hi,
I've noticed that in YARA 4.0 an error early on in a rules file means erroneous errors are reported later in the rules file.
Here's an example rules file to illustrate the issue:
Running this with YARA 4.0 yields:
Running with 3.11 yields the correct error message:
In large rules files this problem is exacerbated.
Hope this is enough information to triage.
Cheers,
Tom
The text was updated successfully, but these errors were encountered: