CVE-2009-5155
High · 7.5CVSS
7.5
EPSS
3.9%
Published
Feb 26, 2019
CISA due date
—
Cloudanix analysis
A bug in a core system library can make programs that handle text patterns crash or give wrong answers when they receive unusual input.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Misparsing of regex alternatives in parse_reg_exp causes assertion failures leading to application crashes or produces incorrect match results on crafted input.
Why it matters to the business
Services relying on glibc regex processing can experience unexpected crashes or silent incorrect behavior, disrupting operations and potentially requiring restarts or manual intervention across many systems.
How an attack unfolds
An attacker supplies a specially crafted regular expression to any application linked against vulnerable glibc; the misparsed alternatives trigger an assertion or yield wrong results without authentication or user interaction.
How to fix it
Upgrade glibc to version 2.28 or later on all affected systems; rebuild and redeploy any statically linked applications; apply vendor patches for NetApp products once available.
How to confirm the fix worked
Run 'ldd --version' or 'rpm -q glibc' to confirm version >= 2.28; execute regression tests with known problematic regex patterns to verify correct parsing and no assertion failures.
Typical attack path
- Identify a network-facing or local service that accepts untrusted regex patterns and links to glibc < 2.28
- Craft a regex containing misparsed alternatives that triggers the assertion or incorrect result
- Submit the pattern via the service's input channel
- Observe denial of service through crash or accept incorrect match outcome for further abuse
How to detect it
Search application and system logs for glibc assertion failures mentioning regcomp or posix/regcomp.c; correlate process crashes with receipt of regex-containing requests; review audit logs for unusual regex patterns submitted to services.
What your security team should do
- Prioritize patching glibc on internet-facing systems within the next maintenance window
- Inventory all applications that call regcomp or similar POSIX regex functions
- Monitor for application crashes correlated with regex processing
- Consider temporary input sanitization or regex length limits where upgrades are delayed
The record
In the GNU C Library (aka glibc or libc6) before 2.28, parse_reg_exp in posix/regcomp.c misparses alternatives, which allows attackers to cause a denial of service (assertion failure and application exit) or trigger an incorrect result by attempting a regular-expression match.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | glibc | 0 | 2.28-1 |
| Debian:11 | gnulib | 0 | 20140202+stable-3.2 |
| Debian:12 | glibc | 0 | 2.28-1 |
| Debian:12 | gnulib | 0 | 20140202+stable-3.2 |
| Debian:13 | glibc | 0 | 2.28-1 |
| Debian:13 | gnulib | 0 | 20140202+stable-3.2 |
| SUSE:Enterprise Storage 4 | glibc | 0 | 2.22-62.22.5 |
| SUSE:Enterprise Storage 5 | glibc | 0 | 2.22-62.22.5 |
| SUSE:HPE Helion OpenStack 8 | glibc | 0 | 2.22-62.22.5 |
| SUSE:Linux Enterprise Desktop 12 SP4 | glibc | 0 | 2.22-100.8.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 | glibc | 0 | 2.26-13.24.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP1 | glibc | 0 | 2.26-13.24.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 | glibc | 0 | 2.26-13.24.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP1 | glibc | 0 | 2.26-13.24.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | glibc | 0 | 2.22-62.22.5 |
| SUSE:Linux Enterprise Server 12 SP2-LTSS | glibc | 0 | 2.22-62.22.5 |
| SUSE:Linux Enterprise Server 12 SP3-BCL | glibc | 0 | 2.22-62.22.5 |
| SUSE:Linux Enterprise Server 12 SP3-LTSS | glibc | 0 | 2.22-62.22.5 |
| SUSE:Linux Enterprise Server 12 SP4 | glibc | 0 | 2.22-100.8.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | glibc | 0 | 2.22-62.22.5 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | glibc | 0 | 2.22-62.22.5 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP4 | glibc | 0 | 2.22-100.8.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP4 | glibc | 0 | 2.22-100.8.1 |
| SUSE:OpenStack Cloud 7 | glibc | 0 | 2.22-62.22.5 |
| SUSE:OpenStack Cloud 8 | glibc | 0 | 2.22-62.22.5 |
| SUSE:OpenStack Cloud Crowbar 8 | glibc | 0 | 2.22-62.22.5 |
| Ubuntu:16.04:LTS | glibc | 0 | 2.23-0ubuntu11.3 |
| Ubuntu:16.04:LTS | gnulib | 0 | No fix |
| Ubuntu:18.04:LTS | gnulib | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | eglibc | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gnulib | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | glibc | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | gnulib | 0 | No fix |
| openSUSE:Tumbleweed | glibc | 0 | 2.34-1.2 |
Related vulnerabilities
- CVE-2021-3326 The iconv function in the GNU C Library (aka glibc or libc6) 2.32 and earlier, when… Also affects glibc
- CVE-2017-12133 Use-after-free vulnerability in the clntudp_call function in sunrpc/clnt_udp.c in the GNU… Also affects glibc
- CVE-2015-5180 res_query in libresolv in glibc before 2.25 allows remote attackers to cause a denial of… Also affects glibc
- CVE-2017-1000366 glibc contains a vulnerability that allows specially crafted LD_LIBRARY_PATH values to… Also affects glibc
- CVE-2014-9984 nscd in the GNU C Library (aka glibc or libc6) before version 2.20 does not correctly… Also affects glibc
- CVE-2016-10228 The iconv program in the GNU C Library (aka glibc or libc6) 2.31 and earlier, when… Also affects glibc
- CVE-2016-4429 Stack-based buffer overflow in the clntudp_call function in sunrpc/clnt_udp.c in the GNU… Also affects glibc
- CVE-2015-7547 Multiple stack-based buffer overflows in the (1) send_dg and (2) send_vc functions in the… Also affects glibc