Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips-debug before 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). In the stapled OCSP path, ProvOcspRevocationChecker verifies the response signature and then searches for a SingleResponse matching the certificate's serial and issuer hashes, but returns normally when none matches, so the certificate is treated as unrevoked with no CRL fallback. The network-fetch path enforces this binding; the stapled path does not. A server holding …
Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips-debug before 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). IETFUtils.valueToString() escapes special characters by inserting into the same buffer while iterating it, so each insertion shifts the remaining characters and a value of N escapable bytes costs on the order of N^2/2 moves. A single 60 KB RDN of commas or plus signs in a certificate, CSR, CRL or CMS …
Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips-debug before 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). Definite-length ASN.1 parsing allocated the entire declared object length as soon as the header was read. A few crafted header bytes arriving over a non-rewindable stream, such as a TLS record layer or a socket-backed certificate read, could trigger a near-heap-sized allocation before any content byte was consumed. Definite-length objects are …
Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips-debug before 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). PKCS12KeyStoreSpi and PKCS12PBMAC1KeyStoreSpi derived integrity-MAC and bag-decryption keys using iteration counts taken from the keystore file with no ceiling. A file of a few hundred bytes declaring a count near 2^31 occupies the loading thread in key derivation before any password or integrity check can fail. Counts are now validated and …
Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips-debug before 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). PKIXNameConstraintValidator strips a trailing dot before comparing dNSName values but not rfc822Name or URI values, which are compared with a plain case-insensitive match. A certificate whose email or URI SAN ends in a dot therefore evades an excludedSubtrees entry for the same host and path validation succeeds. An attacker controlling a …
Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips-debug before 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). LazyEncodedSequence.force() parses the deferred SEQUENCE with a fresh nesting-depth counter instead of inheriting the parent's remaining budget, and never decrements it. CRLs loaded through X509CRLHolder or the BC CertificateFactory hold revokedCertificates as an unforced lazy sequence, so a 40-50 KB DER CRL nesting around 10,000 SEQUENCEs recurses one frame per level …
Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips-debug before 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). HSS/LMS parsing reads the level count from an encoded public key with no ceiling, then reads a second level count from the signature, validates it only against the attacker-supplied first value, and allocates an array of that size. RFC 8554 caps HSS depth at 8 but the check is applied only during key generation. …
Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips-debug before 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). CCMBlockCipher.processPacket(), and the equivalent KCCM and KGCM paths, decrypt into the caller's output array and check the authentication tag afterwards, leaving unverified plaintext in the buffer when verification fails. The buffer is never cleared, including by the JCE doFinal wrapper. An attacker who submits forged ciphertexts and can observe that buffer …
Affects Bouncy Castle for Java FIPS (BC-FJA) bc-fips-debug before 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series). BcFKSKeyStoreSpi.engineLoad() takes the KDF algorithm and parameters from the untrusted keystore before running verifyMac(), then feeds the file-supplied PBKDF2 iteration count or scrypt cost directly into derivation with no ceiling. A modified .bcfks file declaring an iteration count near 2^31, or scrypt parameters sized to available RAM, consumes minutes to hours …