Description
In the macho_parse_file functionality in macho/macho.c of YARA 3.11.0, command_size may be inconsistent with the real size. A specially crafted MachO file can cause an out-of-bounds memory access, resulting in Denial of Service (application crash) or potential code execution.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | yara | No fix yet | — |
| Debian 13 | yara | No fix yet | — |
| Debian 12 | yara | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | yara | 3.9.0-1ubuntu0.1~esm1 | — |
References
- https://github.com/VirusTotal/yara/issues/1178
- FEDORA-2021-f41d5fc954 vendor-advisory
- FEDORA-2021-dd62918333 vendor-advisory