An attacker able to issue certificates with sufficient control over the choice of its serial number can cause the filter creation to enter an infinite loop, thereby preventing the creation of the CRLite filter.
Originally disclosed on Mozilla
- Fixed in 7 months
- Paid in 7 months
- Disclosed after 7 months
The use of Murmurhash3 in the Bloom filter cascade in CRLite introduces the following security vulnerability. An attacker able to issue certificates with sufficient control over the choice of its serial number can cause the filter creation to enter an infinite loop, thereby preventing the creation of the CRLite filter. Without a proper countermeasure in place, this vulnerability could be used to delay the revocation of compromised certificates thereby allowing the adversary more time to exploit the compromised certificates.
Background:
When CRLite was first proposed, its designers indicated Murmurhash3 as a candidate hash function for its realisation. Certificate revocation is a security-critical application and consequently CRLite should guard against malicious inputs. On the other hand, Murmurhash3 is a highly-performant non-cryptographic hash function that is known not to offer any collision-resistance. However, it is not immediately clear whether this constitutes a problem for its security. In a Bloom filter the output of the hash function is necessarily mapped onto a small range of values. As a result, collisions can always be found via a birthday attack, even if a cryptographically-strong hash like SHA-256 is used. This combined with the use of distinct seed/salt values at every layer of the cascade filter may lead one to conclude that Murmurhash3 is an adequate choice of hash function.
The Problem with Murmurhash3:
As we will show Murmurhash3 is not an adequate choice for use in CRLite. In 2012 Aumasson et al. discovered multicollisions against Murmurhash3 and exploited these to realize hash-flooding denial-of-service attacks against hash tables. Our attack will only require finding a single collision rather than multicollisions. Instead, the crucial feature of their attack that enables the attack against CRLite is that it gives rise to collisions that work under any seed. Namely, given any message M1 it is possible to construct a second message M2 (by altering only two consecutive 4-byte blocks of m1) such that for every seed S it holds that Murmurhash3(S, M1) = Murmurhash3(S, M2).
The Impact on CRLite
In Mozilla’s CRLite filter creation, each certificate is checked against the filter cascade and if false positives are found another layer is added to the cascade. This procedure is repeated until all false positives are eliminated from the filter. Each certificate entry in the CRLite is represented by the string SHA-256(issuer_spki) || serial, where issuer_spki and serial denote respectively the certificate’s subject public key information and serial number. Then for any certificate, a rogue CA could potentially create a colliding certificate with a matching issuer_spki but different serial using the above attack on Murmurhash3. Then, if one certificate is revoked while the other remains valid, CRLite will interpret the collision as a false positive causing it to add another layer to the cascade. Since the collision works for any seed, it will propagate to every layer of the cascade forcing the cascade creation algorithm into an infinite loop and no filter will be produced.
Experimental Verification:
We verified this vulnerability experimentally by calculating a collision for the serial number 0x45a1831339d0282f8c9fed2043ae50d4 (the first serial number of the first CA from the data on September 9, 2021) which gave us the colliding serial number 0x9d42a40839d077f38c9fed2043ae50d4.
We inserted these serial numbers into the intermediate data of the filter creation process by adding a file named “-TrM-YTWywZV8UwhobD51F1gyN0R9i8HSXRhwDUA_PQ=” (usually this is the base64 encoding of sha256(issuer_spki), we chose the first CA from the data on September 9, 2021) which contains both serial numbers as a hex value with one value per line into the known folder. We also added a file named “-TrM-YTWywZV8UwhobD51F1gyN0R9i8HSXRhwDUA_PQ=” which only contains the colliding serial number 9d42a40839d077f38c9fed2043ae50d4 into the revoked folder. As expected, the filter creation script create_filter_cascade/certs_to_crlite.py from Mozilla’s CRLite implementation ran in an infinite loop inserting new layers without reducing the number of false positives.
We provide a Dockerfile which contains the exact commands for reproduction. It can be built with "docker build -t crliteinfiniteloop ." and the run with "docker run -it crliteinfiniteloop".
Possible Fixes:
We propose two possible solutions to address this issue. The first to simply switch to a cryptographic hash function like SHA-256 combined with different salt values for each layer. Such a solution seems to be already in place in the CRLite code, but it requires bearing the performance hit of switching to a more heavyweight hash function. The second alternative is to switch to SipHash which is a (keyed) pseudorandom function rather than a collision-resistant hash function. This would require appending the SipHash key to the filter description, and switching to a new key every time that a new filter is produced. Intuitively because an adversary does not know the key that will be used for each filter, it cannot produce a colliding input, and after that point, the key can be made public (by including it in the filter description) without any detriment to security. The advantage here is that SipHash has a performance that is much closer to Murmurhash3 but updates are only possible as separate lists.
Research and Publication:
We are currently working to formally prove the above proposed solutions secure and publish the results at an academic venue. We would be very interested in hearing your comments about the issue and our proposed solution with SipHash. If you would like us to allow for a moratorium period before publishing this research, please let us know within the next two weeks. We look forward to hearing from you.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A low-severity doS bug in Security: PSM. Mozilla made it public on 27 May 2022.
About DoS
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.