CVE-2015-5276
NoneCVSS
—
EPSS
2.9%
Published
Nov 17, 2015
CISA due date
—
Cloudanix analysis
Some older versions of a common programming tool can produce less random numbers than expected, making it slightly easier for attackers to guess values used for security features in programs built with those versions.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
The std::random_device implementation in libstdc++ fails to correctly retry or handle partial reads from entropy sources such as /dev/random, allowing an attacker to obtain insufficient or predictable entropy bytes that reduce the unpredictability of generated values.
Why it matters to the business
Applications compiled with affected GCC versions may use insufficiently random numbers for security-sensitive operations such as key generation or session tokens, increasing the chance of cryptographic failures or information exposure with minimal operational disruption.
How an attack unfolds
An attacker identifies an application built against a vulnerable libstdc++ that relies on std::random_device for secrets, then supplies or observes conditions that trigger short reads from the entropy source to obtain partially predictable random sequences and recover the intended values.
How to fix it
Upgrade GCC to version 4.9.4 or later and rebuild affected applications and libraries against the updated libstdc++. Where upgrades are not feasible, replace std::random_device usage with a robust alternative such as a properly seeded cryptographic PRNG.
How to confirm the fix worked
Compile a test program that exercises std::random_device, confirm GCC version is 4.9.4+, and verify that repeated calls produce values with expected entropy distribution under blocking source conditions.
Typical attack path
- Identify target application using std::random_device from affected GCC
- Trigger conditions that cause short reads from blocking entropy source
- Collect partially filled random buffers
- Use statistical analysis or brute-force to predict remaining entropy
- Recover cryptographic material or session identifiers
How to detect it
Review build logs, package manifests, and runtime library dependencies for references to libstdc++ from GCC releases before 4.9.4; no post-exploitation artifacts are known due to the nature of the flaw.
What your security team should do
- Inventory all software built with GCC versions prior to 4.9.4
- Prioritize rebuild of components handling cryptographic material or authentication tokens
- Add static analysis rules to flag direct use of std::random_device in new code
- Monitor EPSS and exploit maturity; current values indicate low urgency
The record
The std::random_device class in libstdc++ in the GNU Compiler Collection (aka GCC) before 4.9.4 does not properly handle short reads from blocking sources, which makes it easier for context-dependent attackers to predict the random values via unspecified vectors.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Mageia:5 | gcc | 0 | 4.9.2-4.1.mga5 |
| SUSE:Linux Enterprise Desktop 11 SP4 | gcc5 | 0 | 5.3.1+r233831-10.1 |
| SUSE:Linux Enterprise Desktop 12 | gcc48 | 0 | 4.8.5-24.1 |
| SUSE:Linux Enterprise Desktop 12 | gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Desktop 12 | libffi-gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Desktop 12 | libgcj48 | 0 | 4.8.5-24.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | libffi-gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Module for Toolchain 12 | gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Module for Toolchain 12 | libffi-gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | MozillaFirefox | 0 | 52.2.0esr-72.5.2 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | MozillaFirefox-branding-SLED | 0 | 52-24.3.44 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | firefox-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | firefox-libffi-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | mozilla-nss | 0 | 3.29.5-47.3.2 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | MozillaFirefox | 0 | 52.2.0esr-72.5.2 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | MozillaFirefox-branding-SLED | 0 | 52-24.3.44 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | firefox-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | firefox-libffi-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | mozilla-nss | 0 | 3.29.5-47.3.2 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | MozillaFirefox | 0 | 52.2.0esr-72.5.2 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | MozillaFirefox-branding-SLED | 0 | 52-24.3.44 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | firefox-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | firefox-libffi-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | mozilla-nss | 0 | 3.29.5-47.3.2 |
| SUSE:Linux Enterprise Server 11 SP4 | MozillaFirefox | 0 | 52.2.0esr-72.5.2 |
| SUSE:Linux Enterprise Server 11 SP4 | MozillaFirefox-branding-SLED | 0 | 52-24.3.44 |
| SUSE:Linux Enterprise Server 11 SP4 | firefox-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Server 11 SP4 | firefox-libffi-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Server 11 SP4 | gcc5 | 0 | 5.3.1+r233831-10.1 |
| SUSE:Linux Enterprise Server 11 SP4 | libffi-gcc5 | 0 | 5.3.1+r233831-10.1 |
| SUSE:Linux Enterprise Server 11 SP4 | mozilla-nss | 0 | 3.29.5-47.3.2 |
| SUSE:Linux Enterprise Server 12 | gcc48 | 0 | 4.8.5-24.1 |
| SUSE:Linux Enterprise Server 12 | gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Server 12 | libffi-gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Server 12 | libffi48 | 0 | 4.8.5-24.1 |
| SUSE:Linux Enterprise Server 12 SP1 | gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Server 12 SP1 | libffi-gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | MozillaFirefox | 0 | 52.2.0esr-72.5.2 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | MozillaFirefox-branding-SLED | 0 | 52-24.3.44 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | firefox-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | firefox-libffi-gcc5 | 0 | 5.3.1+r233831-7.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | gcc5 | 0 | 5.3.1+r233831-10.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | libffi-gcc5 | 0 | 5.3.1+r233831-10.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | mozilla-nss | 0 | 3.29.5-47.3.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | gcc48 | 0 | 4.8.5-24.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | libffi-gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | libffi48 | 0 | 4.8.5-24.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | libffi-gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | MozillaFirefox | 0 | 52.2.0esr-72.5.2 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | gcc48 | 0 | 4.8.5-4.2 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | gcc5 | 0 | 5.3.1+r233831-10.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | libffi-gcc5 | 0 | 5.3.1+r233831-10.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | mozilla-nss | 0 | 3.29.5-47.3.2 |
| SUSE:Linux Enterprise Software Development Kit 12 | gcc48 | 0 | 4.8.5-24.1 |
| SUSE:Linux Enterprise Software Development Kit 12 | libffi48 | 0 | 4.8.5-24.1 |
| SUSE:Linux Enterprise Software Development Kit 12 | libgcj48 | 0 | 4.8.5-24.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | gcc5 | 0 | 5.3.1+r233831-9.1 |
| SUSE:Linux Enterprise Workstation Extension 12 | libgcj48 | 0 | 4.8.5-24.1 |
| Ubuntu:14.04:LTS | gcc-4.7 | 0 | No fix |
| Ubuntu:14.04:LTS | gcc-4.8 | 0 | No fix |
| Ubuntu:14.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.7 | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.7-armel-cross | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.7-armhf-cross | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.8 | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.8-arm64-cross | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.8-armhf-cross | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.8-powerpc-cross | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.8-ppc64el-cross | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-4.9 | 0 | 4.9.3-13ubuntu2 |
| Ubuntu:16.04:LTS | gcc-5 | 0 | 5.3.1-14ubuntu2.1 |
| Ubuntu:16.04:LTS | gcc-arm-linux-androideabi | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-avr | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-i686-linux-android | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-mingw-w64 | 0 | 17 |
| Ubuntu:16.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:16.04:LTS | gcc-snapshot | 0 | 20151011-0ubuntu1 |
| Ubuntu:18.04:LTS | gcc-4.8 | 0 | No fix |
| Ubuntu:18.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:20.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:22.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | gcc-4.7 | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | gcc-4.8 | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | gcc-mingw-w64 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.7 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.7-armel-cross | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.7-armhf-cross | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.8 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.8-arm64-cross | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.8-armhf-cross | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.8-powerpc-cross | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-4.8-ppc64el-cross | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-arm-linux-androideabi | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-arm-none-eabi | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-avr | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-i686-linux-android | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | gcc-4.8 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | gcc-msp430 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | gcc-msp430 | 0 | No fix |
| openSUSE:Tumbleweed | gcc5 | 0 | 5.4.1+r240125-1.5 |
Related vulnerabilities
- CVE-2012-3509 Multiple integer overflows in the (1) _objalloc_alloc function in objalloc.c and (2)… Also affects gcc5
- CVE-2016-5285 A Null pointer dereference vulnerability exists in Mozilla Network Security Services due… Also affects MozillaFirefox
- CVE-2018-6126 A precision error in Skia in Google Chrome prior to 67.0.3396.62 allowed a remote… Also affects MozillaFirefox
- CVE-2018-5188 Memory safety bugs present in Firefox 60, Firefox ESR 60, and Firefox ESR 52.8. Also affects MozillaFirefox
- CVE-2018-12359 A buffer overflow can occur when rendering canvas content while adjusting the height and… Also affects MozillaFirefox
- CVE-2016-8635 It was found that Diffie Hellman Client key exchange handling in NSS 3.21.x was… Also affects MozillaFirefox
- CVE-2016-9574 nss before version 3.30 is vulnerable to a remote denial of service during the session… Also affects MozillaFirefox
- CVE-2018-5158 The PDF viewer does not sufficiently sanitize PostScript calculator functions, allowing… Also affects MozillaFirefox