Memory disclosure or crash via Mach-O parsing
Published May 14, 2021 · Updated Aug 3, 2024
Out-of-bounds reads in VirusTotal YARA 4.0.3 and earlier allow attackers to disclose memory or crash scans via malicious Mach-O files. In libyara/modules/macho/macho.c, a wrapped fat-architecture offset bypasses a size check, while undersized load commands reach fixed-size copies and structure dereferences. Exploitation requires an affected YARA process to scan attacker-controlled Mach-O data; outcomes are limited to memory disclosure or interruption of that process.
Summary
What happened
Out-of-bounds reads in VirusTotal YARA 4.0.3 and earlier allow attackers to disclose memory or crash scans via malicious Mach-O files. In libyara/modules/macho/macho.c, a wrapped fat-architecture offset bypasses a size check, while undersized load commands reach fixed-size copies and structure dereferences. Exploitation requires an affected YARA process to scan attacker-controlled Mach-O data; outcomes are limited to memory disclosure or interruption of that process.
The record
- CVE
- CVE-2021-3402
- Published
- May 14, 2021
- Updated
- Aug 3, 2024
- Vendor
- VirusTotal
- Product
- YARA
- Classifications
- CWE-190, CWE-125
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- May 14, 2021CVE publishedPublication date reported by the CVE source.
- Aug 3, 2024Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=libyara 4.0.4
What conditions does exploitation require?
What is affected?
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
- macho_handle_segment_64 reproducerproof of concept · demonstrated
- macho_handle_segment 32-bit reproducerproof of concept · demonstrated
- macho_parse_file out-of-bounds reproducerproof of concept · demonstrated
- macho_is_32 short-buffer reproducerproof of concept · demonstrated
- macho_parse_fat_file integer-overflow reproducerproof of concept · demonstrated
- macho_handle_unixthread reproducerproof of concept · demonstrated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo