# CVE-2017-11671: Weak cryptography in n/a

> GCC compiler flaw causes RDRAND/RDSEED intrinsics to fail silently, potentially resulting in weak random number generation for compiled applications.

- **Severity:** Medium 4.0 (`CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Jul 2017
- **Updated:** 5 Aug 2024
- **Also known as:** CLSA-2023-1677096436, GHSA-9qgp-g97v-qq69, RHSA-2018:0849, SUSE-SU-2017:2380-1, SUSE-SU-2017:2526-1, UBUNTU-CVE-2017-11671, USN-5770-1

## What is CVE-2017-11671?

CVE-2017-11671 is a medium-severity vulnerability in n/a, published on 26 Jul 2017. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Under certain circumstances, the ix86_expand_builtin function in i386.c in GNU Compiler Collection (GCC) version 4.6, 4.7, 4.8, 4.9, 5 before 5.5, and 6 before 6.4 will generate instruction sequences that clobber the status flag of the RDRAND and RDSEED intrinsics before it can be read, potentially causing failures of these instructions to go unreported. This could potentially lead to less randomness in random number generation.

Weakness: CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG))

## Which versions are affected by CVE-2017-11671?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cpp` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc-base-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc-c++` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc-gfortran` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc-gnat` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc-go` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc-objc` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc-objc++` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `gcc-plugin-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libasan` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libasan-static` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libatomic` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libatomic-static` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgcc` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgfortran` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgfortran-static` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgnat` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgnat-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgnat-static` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgo` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgo-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgo-static` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libgomp` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libitm` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libitm-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libitm-static` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libmudflap` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libmudflap-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libmudflap-static` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libobjc` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libquadmath` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libquadmath-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libquadmath-static` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libstdc++` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libstdc++-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libstdc++-docs` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libstdc++-static` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |
| `libtsan` | Red Hat:enterprise_linux:7::client | All versions | 0:4.8.5-28.el7 |

Products: Gnu Gcc.

## How do I fix CVE-2017-11671?

Upgrade to a fixed version.

## Is CVE-2017-11671 being exploited?

There is no known exploitation of CVE-2017-11671 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2018-12886](https://insights.sbomify.com/CVE-2018-12886/): Security feature bypass in n/a (high 8.1)
- [CVE-2002-2439](https://insights.sbomify.com/CVE-2002-2439/): Integer overflow in the new[] operator in gcc before 4.8.0 allows attackers to have unspecified impacts. (high 7.8)
- [CVE-2019-15847](https://insights.sbomify.com/CVE-2019-15847/): Weak cryptography in n/a (high 7.5)
- [CVE-2008-1367](https://insights.sbomify.com/CVE-2008-1367/): Memory corruption in n/a (high 7.5)
- [CVE-2008-1685](https://insights.sbomify.com/CVE-2008-1685/): Integer overflow in n/a (medium 6.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-11671 and fix it if it is affected.

What it is: CVE-2017-11671 is a medium-severity vulnerability in n/a, published on 26 Jul 2017. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2017-11671 in the wild and no public exploit code.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2017-11671/ (Markdown: https://insights.sbomify.com/CVE-2017-11671/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2017-11671
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2017-11671
- OSV: https://osv.dev/vulnerability/CVE-2017-11671

---
From sbomify Insights: https://insights.sbomify.com/CVE-2017-11671/
Summaries are generated and may contain mistakes; the official description above is the record.
