Yara Object Lookup Denial of Service Vulnerability
A crafted Dex binary can make Yara read a negative index value that satisfies an assertion check, causing the program to abort. An attacker could use this to crash Yara during scanning, so other samples in a scanned directory go unexamined.
Originally disclosed on Cisco Talos
An exploitable Denial of Service vulnerability exists in the object lookup functionality of Yara 3.8.1. A specially crafted binary file can cause a negative value to be read to satisfy an assert, resulting in Denial of Service.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the object lookup uses a sentinel value of -1 to mean 'no index was supplied', but a negative index read from the file is indistinguishable from that sentinel, so the assertion fires.
Impact
Scanning a directory that contains the malicious binary would stop the scan, so other samples could be overlooked.
What the attacker needed
Ability to supply a crafted Dex file to Yara; victim scans the crafted file
The fix
The vendor patched the issue.
How it was found
- Craft a Dex binary whose encoded field causes a negative value to be read as the field index.
- Scan the crafted binary with Yara so the Dex module parses it.
- The object lookup receives the negative index and the assertion fails, aborting the program.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Yara is a tool that scans files for known patterns, often used to spot malware. A specially built file can make Yara crash instead of finishing its scan. Because the scan stops, other files in the same folder are never checked, which could let malware slip past.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.