CVE-2017-13716
Medium · 5.5CVSS
5.5
EPSS
1.4%
Published
Aug 28, 2017
CISA due date
—
Cloudanix analysis
A flaw in a common library used to read program files can make certain analysis tools run out of memory and stop working when they encounter a specially prepared file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The C++ symbol demangler in libiberty (cplus-dem.c) performs unbounded memory allocation when processing a specially crafted input file, resulting in excessive heap growth and eventual process termination via the BFD library.
Why it matters to the business
Processing untrusted binaries or object files with affected tools can trigger application crashes and service interruption; the issue appears in downstream packages such as slsa-verifier, potentially affecting software supply-chain verification workflows that rely on these libraries.
How an attack unfolds
An attacker creates a malicious ELF or object file containing a malformed C++ symbol string, then causes a victim tool linked against libbfd to invoke the demangler (for example during symbol resolution or file inspection); the resulting memory exhaustion crashes the process.
How to fix it
Upgrade affected packages to the versions that contain the corrected libiberty: slsa-verifier (Chainguard) to 2.5.1-r4 or later and slsa-verifier (Wolfi) to 2.5.1-r4 or later; rebuild any local software that statically links the vulnerable libiberty library.
How to confirm the fix worked
Confirm installed package versions match or exceed the fixed releases listed above; run regression tests with known-malformed symbol inputs to verify the demangler no longer exhibits unbounded allocation; monitor process memory usage during file parsing.
Typical attack path
- Craft a binary file with an oversized or malformed C++ mangled name in its symbol table
- Deliver the file to a target system or process that uses GNU Binutils libbfd for parsing
- Trigger symbol demangling through normal file inspection, linking, or analysis operations
- Observe denial of service from memory exhaustion and process crash
How to detect it
Review system and application logs for unexpected crashes or out-of-memory events in binutils-linked processes; correlate file-processing activity with sudden memory spikes; examine any core dumps or crash reports that reference cplus-dem.c or the BFD demangler.
What your security team should do
- Apply the listed package upgrades immediately on all build, CI, and analysis systems that consume binaries
- Scan container images and build pipelines for older binutils or libiberty dependencies
- Add memory-usage and crash monitoring for any tools that parse untrusted object files
- Review and restrict use of legacy binutils versions in production environments
The record
The C++ symbol demangler routine in cplus-dem.c in libiberty, as distributed in GNU Binutils 2.29, allows remote attackers to cause a denial of service (excessive memory allocation and application crash) via a crafted file, as demonstrated by a call from the Binary File Descriptor (BFD) library (aka libbfd).
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | binutils | 0 | No fix |
| Debian:11 | binutils | 0 | No fix |
| Debian:12 | binutils | 0 | No fix |
| Debian:13 | binutils | 0 | No fix |
| Mageia:6 | binutils | 0 | 2.32-1.1.mga6 |
| Ubuntu:16.04:LTS | libiberty | 0 | No fix |
| Ubuntu:18.04:LTS | libiberty | 0 | No fix |
| Ubuntu:20.04:LTS | binutils | 0 | No fix |
| Ubuntu:20.04:LTS | libiberty | 0 | No fix |
| Ubuntu:22.04:LTS | binutils | 0 | No fix |
| Ubuntu:22.04:LTS | libiberty | 0 | No fix |
| Ubuntu:24.04:LTS | binutils | 0 | No fix |
| Ubuntu:24.04:LTS | libiberty | 0 | No fix |
| Ubuntu:24.10 | binutils | 0 | No fix |
| Ubuntu:24.10 | libiberty | 0 | No fix |
| Ubuntu:25.04 | binutils | 0 | No fix |
| Ubuntu:25.04 | libiberty | 0 | No fix |
| Ubuntu:25.10 | binutils | 0 | No fix |
| Ubuntu:25.10 | libiberty | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | binutils | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | binutils | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | libiberty | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | binutils | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | libiberty | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | binutils | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | libiberty | 0 | No fix |
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-17124 The _bfd_coff_read_string_table function in coffgen.c 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