Bouncy Castle for Java before 1.73 contains a potential Denial of Service (DoS) issue within the Bouncy Castle org.bouncycastle.openssl.PEMParser class. This class parses OpenSSL PEM encoded streams containing X.509 certificates, PKCS8 encoded keys, and PKCS7 objects. Parsing a file that has crafted ASN.1 data through the PEMParser causes an OutOfMemoryError, which can enable a denial of service attack. (For users of the FIPS Java API: BC-FJA 1.0.2.3 and earlier are affected; BC-FJA 1.0.2.4 is fixed.)
The product does not properly control the allocation and maintenance of a limited resource.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Bouncy_castle_for_java | Bouncycastle | * | 1.73 (excluding) |
Fips_java_api | Bouncycastle | * | 1.0.2.4 (excluding) |
Red Hat AMQ Streams 2.7.0 | RedHat | * | |
Bouncycastle | Ubuntu | bionic | * |
Bouncycastle | Ubuntu | focal | * |
Bouncycastle | Ubuntu | lunar | * |
Bouncycastle | Ubuntu | mantic | * |
Bouncycastle | Ubuntu | oracular | * |
Bouncycastle | Ubuntu | trusty | * |
Bouncycastle | Ubuntu | xenial | * |
Mitigation of resource exhaustion attacks requires that the target system either:
The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.
The second solution is simply difficult to effectively institute – and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.