CVE-2015-8984
Medium · 5.9CVSS
5.9
EPSS
2.4%
Published
Mar 20, 2017
CISA due date
—
Cloudanix analysis
A bug in a core system library can let attackers send bad data that crashes programs using file-name matching, causing outages until the library is fixed.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- High
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The fnmatch function performs an out-of-bounds read when processing a malformed glob pattern, resulting in an application crash.
Why it matters to the business
Services and applications that rely on glibc pattern matching can be forced offline, interrupting operations and requiring restarts until the library is updated.
How an attack unfolds
An attacker supplies a crafted pattern string to any code path that invokes fnmatch with attacker-controlled input, triggering the out-of-bounds read and terminating the process.
How to fix it
Upgrade the GNU C Library to version 2.22 or later on all affected systems and rebuild any statically linked applications.
How to confirm the fix worked
Confirm the installed glibc version is 2.22 or newer; test that previously crashing patterns no longer terminate the application.
Typical attack path
- Identify an entry point that passes untrusted data to fnmatch
- Craft a malformed glob pattern that triggers the out-of-bounds read
- Submit the pattern over the network or locally to cause the crash
- Repeat to sustain denial of service
How to detect it
Search application and system logs for segmentation faults or crashes occurring inside fnmatch or glob-related functions around the time of suspected attacks.
What your security team should do
- Inventory all systems using glibc and schedule upgrades to 2.22+
- Apply patches during the next maintenance window given the age of the issue
- Review any custom code that directly calls fnmatch with external input
- Monitor for application crashes that coincide with pattern-matching operations
The record
The fnmatch function in the GNU C Library (aka glibc or libc6) before 2.22 might allow context-dependent attackers to cause a denial of service (application crash) via a malformed pattern, which triggers an out-of-bounds read.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | glibc | 0 | 2.21-1 |
| Debian:12 | glibc | 0 | 2.21-1 |
| Debian:13 | glibc | 0 | 2.21-1 |
| Debian:6.0 | eglibc | 0 | 2.11.3-4+deb6u7 |
| Ubuntu:14.04:LTS | eglibc | 0 | 2.19-0ubuntu6.10 |
| Ubuntu:16.04:LTS | glibc | 0 | 2.23-0ubuntu3 |
| Ubuntu:16.04:LTS | glibc | 0 | 2.23-0ubuntu6 |
Related vulnerabilities
- CVE-2021-35942 The wordexp function in the GNU C Library (aka glibc) through 2.33 may crash or read… Also affects glibc
- CVE-2021-3326 The iconv function in the GNU C Library (aka glibc or libc6) 2.32 and earlier, when… Also affects glibc
- CVE-2020-1752 A use-after-free vulnerability introduced in glibc upstream version 2.14 was found in the… Also affects glibc
- CVE-2020-10029 The GNU C Library (aka glibc or libc6) before 2.32 could overflow an on-stack buffer… Also affects glibc
- CVE-2009-5155 In the GNU C Library (aka glibc or libc6) before 2.28, parse_reg_exp in posix/regcomp.c… Also affects glibc
- CVE-2019-9169 In the GNU C Library (aka glibc or libc6) through 2.29, proceed_next_node in… Also affects glibc
- CVE-2017-16997 elf/dl-load.c in the GNU C Library (aka glibc or libc6) 2.19 through 2.26 mishandles… Also affects glibc
- CVE-2017-15804 The glob function in glob.c in the GNU C Library (aka glibc or libc6) before 2.27… Also affects glibc