CVE-2017-17121
High · 7.8CVSS
7.8
EPSS
1.8%
Published
Dec 4, 2017
CISA due date
—
Cloudanix analysis
A common library used to read certain program files can crash or be tricked into running attacker code when given a specially made file, which can interrupt software builds and allow harmful activity on development systems.
- 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 permits a COFF binary with a relocation entry referencing an address past the end of its section to trigger an out-of-bounds memory access violation inside the BFD library during relocation processing, resulting in denial of service or potential arbitrary code execution.
Why it matters to the business
Processing of untrusted or attacker-supplied binaries in build, analysis, or packaging pipelines can cause crashes or enable code execution on developer and CI systems, leading to disrupted operations and potential supply-chain compromise.
How an attack unfolds
An attacker creates a specially crafted COFF binary containing an invalid relocation that points beyond the target section, then supplies the file to any application or toolchain linked against the vulnerable libbfd instance; the library performs an invalid memory read or write that can be turned into control-flow hijacking or a crash.
How to fix it
Upgrade affected packages to the versions that contain the fix; for the listed product this means keda-2.13.1-r9 or newer. Rebuild any custom applications that statically link libbfd against a patched Binutils release and remove older vulnerable binaries from build environments.
How to confirm the fix worked
Confirm the installed version of Binutils or libbfd meets or exceeds the fixed release, then run regression tests that feed known-malformed COFF samples to the updated library and verify absence of crashes or memory errors.
Typical attack path
- Craft COFF binary with relocation referencing address after section end
- Deliver the binary to a system running vulnerable Binutils or dependent software
- Invoke a tool or library call that parses the COFF file
- Trigger the invalid relocation processing to achieve memory corruption
How to detect it
Review application and system logs for segmentation faults or memory-access violations occurring inside bfd or objdump processes when handling COFF inputs; correlate such events with file-creation timestamps of COFF artifacts in build directories.
What your security team should do
- Immediately update all instances of the affected package to the stated fixed version
- Inventory build pipelines and CI runners for any direct or transitive dependency on vulnerable Binutils
- Apply least-privilege controls so that untrusted binaries are processed only inside isolated sandboxes
The record
The Binary File Descriptor (BFD) library (aka libbfd), as distributed in GNU Binutils 2.29.1, allows remote attackers to cause a denial of service (memory access violation) or possibly have unspecified other impact via a COFF binary in which a relocation refers to a location after the end of the to-be-relocated section.
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-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-17080 elf.c in the Binary File Descriptor (BFD) library (aka libbfd), as distributed in GNU… Also affects binutils