CVE-2026-8798

Native entropy source retries the CPU entropy instructions without limit

Published Aug 8, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
In Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 2.1.3, the native entropy source used on Intel platforms retried the CPU entropy instructions without any bound. RDSEED and RDRAND report failure through their carry flag, and the JNI seeding routine spun re-issuing the instruction for as long as that flag stayed clear, so a persistent failure of the on-chip entropy source - whether from a hardware fault, from the underlying DRBG being exhausted by contention across many cores, or from a hypervisor that does not provide the instruction - left the calling thread looping indefinitely inside the JNI call, where it could be neither interrupted nor timed out. Any operation drawing from the native entropy source could therefore hang, denying service to the application. The retry loops are now bounded (200 attempts for RDSEED and 20 for RDRAND, twice the baselines given in Intel's Digital Random Number Generator software implementation guide), pausing between attempts and, on exhaustion, clearing any partially written buffer and throwing rather than continuing to spin. The clear is performed by an un-elidable memzero, which uses a volatile pointer and an assembly memory barrier so that a compiler cannot optimise the erase away as a dead store. Bouncy Castle for Java (bcprov) is not affected, as it has no native entropy source; the 1.0.X and 2.0.X FIPS series are not affected.

Analysis

AI-generated

Technical impact

The vulnerability in Bouncy Castle for Java FIPS (BC-FJA) before version 2.1.3 causes the native entropy source on Intel platforms to retry CPU random number generation instructions indefinitely when the carry flag indicates failure. This loop occurs within a JNI call, preventing interruption or timeout. Consequently, any operation that relies on the native entropy source may hang for an arbitrary duration, effectively denying service to the application. The weakness is a classic uncontrolled resource consumption flaw (CWE‑835).

Affected Systems

Legion of the Bouncy Castle Inc. owns the BC-FJA product. All versions of BC‑FJA prior to bc‑fips 2.1.3 are affected. The 1.0.x and 2.0.x FIPS series of Bouncy Castle for Java (bcprov) are not impacted.

Risk and Exploitability

The CVSS score of 8.7 marks the issue as high severity, and the EPSS score is not available, so exploit likelihood is uncertain but could be significant in environments where RDSEED/RDRAND is unavailable or deliberately disabled. The vulnerability is listed in no KEV catalog. The most likely attack vector is an application that uses BC‑FJA on an Intel platform; an attacker could trigger the denial of service by causing the native entropy source to fail—such as through a hardware fault, exhausting the DRBG across many cores, or operating in a hypervisor that does not expose the instructions. Once triggered, the calling thread spins forever in the JNI routine without a timeout, leading to application hangs.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade BC‑FJA to bc‑fips 2.1.3 or later, which enforces a bounded retry loop for RDSEED and RDRAND and throws an exception on exhaustion.
  • Ensure that the target environment supports RDSEED and RDRAND on the CPUs used by the application, or disable the use of the native entropy source in configuration if possible.
  • Monitor application performance for unexpected hangs and apply the latest patch from Bouncy Castle if any further updates are released.

Generated by OpenCVE AI on August 8, 2026 at 02:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-v6w3-qrh8-qccc Bouncy Castle: the native entropy source used on Intel platforms retried the CPU entropy instructions without any bound
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Legion Of The Bouncy Castle Inc.
Legion Of The Bouncy Castle Inc. bc-fja
Vendors & Products Legion Of The Bouncy Castle Inc.
Legion Of The Bouncy Castle Inc. bc-fja
Type Values Removed Values Added
Description In Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 2.1.3, the native entropy source used on Intel platforms retried the CPU entropy instructions without any bound. RDSEED and RDRAND report failure through their carry flag, and the JNI seeding routine spun re-issuing the instruction for as long as that flag stayed clear, so a persistent failure of the on-chip entropy source - whether from a hardware fault, from the underlying DRBG being exhausted by contention across many cores, or from a hypervisor that does not provide the instruction - left the calling thread looping indefinitely inside the JNI call, where it could be neither interrupted nor timed out. Any operation drawing from the native entropy source could therefore hang, denying service to the application. The retry loops are now bounded (200 attempts for RDSEED and 20 for RDRAND, twice the baselines given in Intel's Digital Random Number Generator software implementation guide), pausing between attempts and, on exhaustion, clearing any partially written buffer and throwing rather than continuing to spin. The clear is performed by an un-elidable memzero, which uses a volatile pointer and an assembly memory barrier so that a compiler cannot optimise the erase away as a dead store. Bouncy Castle for Java (bcprov) is not affected, as it has no native entropy source; the 1.0.X and 2.0.X FIPS series are not affected.
Title Native entropy source retries the CPU entropy instructions without limit
Weaknesses CWE-835
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/U:Amber'}

Weaknesses
  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

Status
PUBLISHED
Assigner
bcorg
Published
Updated
Aug 10, 2026, 6:23 PM
Reserved
May 18, 2026, 1:17 AM
Status
Awaiting Analysis
Published
Aug 8, 2026, 1:16 AM
Modified
Oct 24, 2026, 1:10 PM