Skip to content
Heist/ feed
High

Packet CTR reports a full success length after the counter is exhausted

Type: advisorySource: Official CVE List1 source record

In Bouncy Castle for Java LTS before 2.73.13, the native one-shot CTR packet cipher did not check that the requested input length fitted the counter space the IV left. In CTR mode the IV and the block counter share one 16-byte block, so an IV of 13 to 15 bytes leaves a counter of only 1 to 3 bytes, addressing 256, 65536 or 16777216 blocks respectively. Given a longer input the counter wrapped and the keystream repeated from the start of the same packet, and the call then returned the full input length as though every byte had been correctly transformed. Two segments of the message were therefore encrypted under the same keystream, so their plaintexts can be recovered from the ciphertext alone, without the key, while the caller saw neither an exception nor a short length to indicate it. The streaming implementation validates at init and again while processing, and the portable AESCTRPacketCipher rejects such a request with "Counter in CTR/SIC mode out of range.", but the native one-shot path has a single entry point and performed no counter-range validation there. It now preflights the IV-derived counter range and rejects an over-long request before any output is written, so the operation is failure-atomic and never reports success for bytes it did not correctly transform. A counter of four bytes or more cannot be exhausted by a Java int length and is unaffected, as is a full 16-byte IV, where the counter range is the caller's responsibility. Bouncy Castle for Java (bcprov) is

Announced Source revision 1
Original source ↗

CVE-2026-71884

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-71884

BC-LTS-JAVA

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://github.com/bcgit/bc-lts-java",
    "vendor": "Legion of the Bouncy Castle Inc.",
    "modules": [
      "core"
    ],
    "product": "BC-LTS-JAVA",
    "versions": [
      {
        "status": "affected",
        "version": "2.73.4",
        "lessThan": "2.73.13",
        "versionType": "maven"
      }
    ],
    "platforms": [
      "x86",
      "x86-64"
    ],
    "packageURL": "pkg:maven/org.bouncycastle/bcprov-lts8on",
    "packageName": "bcprov-lts8on",
    "programFiles": [
      "ctr_pc.c"
    ],
    "collectionURL": "https://www.bouncycastle.org/download/bouncy-castle-java-lts/",
    "defaultStatus": "unaffected"
  }
]
Related CVEs
CVE-2026-71884

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#29760 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement