CVE-2017-17124
High · 7.8CVSS
7.8
EPSS
1.8%
Published
Dec 4, 2017
CISA due date
—
Cloudanix analysis
A bug in software that reads certain types of binary files could let attackers crash programs or run harmful code by tricking the system with a specially made file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The flaw in the BFD library fails to validate the size of the external string table in COFF binaries, leading to excessive memory allocation or heap-based buffer overflow, potentially causing crashes or arbitrary code execution.
Why it matters to the business
Attackers could crash applications processing untrusted binaries or potentially execute malicious code, leading to service disruptions or system compromise in environments using the affected exporters.
How an attack unfolds
An attacker crafts a malicious COFF binary with an oversized or malformed string table. When a vulnerable tool using libbfd processes this file, it triggers the buffer overflow or memory exhaustion, allowing denial of service or further exploitation.
How to fix it
Update logstash-exporter (Chainguard) and logstash-exporter (Wolfi) to version 1.6.4-r3 or later.
How to confirm the fix worked
Verify the installed version of logstash-exporter is 1.6.4-r3 or higher and test parsing of known good COFF files without crashes or excessive memory use.
Typical attack path
- Craft a malicious COFF binary exploiting the string table size validation flaw
- Deliver the binary to a system using affected Binutils-dependent tools
- Induce the target application to parse the binary
- Trigger memory corruption for DoS or code execution
How to detect it
Monitor application logs and system events for crashes, excessive memory usage, or segmentation faults during COFF binary parsing; review process dumps for heap overflow indicators in libbfd-related functions.
What your security team should do
- Upgrade affected logstash-exporter packages to the fixed versions immediately
- Scan environments for use of vulnerable Binutils versions in binary processing workflows
- Restrict processing of untrusted binary files until patches are applied
The record
The _bfd_coff_read_string_table function in coffgen.c in the Binary File Descriptor (BFD) library (aka libbfd), as distributed in GNU Binutils 2.29.1, does not properly validate the size of the external string table, which allows remote attackers to cause a denial of service (excessive memory consumption, or heap-based buffer overflow and application crash) or possibly have unspecified other impact via a crafted COFF binary.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | binutils | 0 | 2.29.90.20180122-1 |
| Debian:11 | binutils | 0 | 2.29.90.20180122-1 |
| Debian:12 | binutils | 0 | 2.29.90.20180122-1 |
| Debian:13 | binutils | 0 | 2.29.90.20180122-1 |
| Ubuntu:18.04:LTS | binutils | 0 | 2.30-21ubuntu1~18.04.1 |
| Ubuntu:Pro:14.04:LTS | binutils | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | binutils | 0 | 2.26.1-1ubuntu1~16.04.8+esm1 |
Related vulnerabilities
- CVE-2021-3826 Heap/stack buffer overflow in the dlang_lname function in d-demangle.c in libiberty… Also affects binutils
- CVE-2022-38533 In GNU Binutils before 2.40, there is a heap-buffer-overflow in the error function… Also affects binutils
- CVE-2017-17122 The dump_relocs_in_section function in objdump.c in GNU Binutils 2.29.1 does not check… Also affects binutils
- CVE-2017-17123 The coff_slurp_reloc_table function in coffcode.h in the Binary File Descriptor (BFD)… Also affects binutils
- CVE-2017-17125 nm.c and objdump.c in GNU Binutils 2.29.1 mishandle certain global symbols, which allows… Also affects binutils
- CVE-2017-17126 The load_debug_section function in readelf.c in GNU Binutils 2.29.1 allows remote… Also affects binutils
- CVE-2017-17121 The Binary File Descriptor (BFD) library (aka libbfd), as distributed in GNU Binutils… Also affects binutils
- CVE-2017-17080 elf.c in the Binary File Descriptor (BFD) library (aka libbfd), as distributed in GNU… Also affects binutils