Adventures in Fuzzing Matrix’s Encryption

# · ✸ 98 · 💬 12 · 2 years ago · matrix.org · Arathorn · 📷
Luckily, after some investigation, these turned out not to be serious bugs in the library but a double-free in the fuzzing harness! The double-free only got triggered when the input was of size 0. Promisingly, two of them received input from other conversation participants, but they either had no way of leaking the information back to the attacker or they hardcoded the number of bytes to be processed, after ensuring the input was of some minimum length. It's a fairly complex function, receives several string inputs from the homeserver and it itself isn't tested by any of the harnesses. As olm pk decrypt receives three base64 inputs from the homeserver: the ciphertext to decrypt, an ephemeral public key and a MAC. All three are eventually passed to olm::decode base64 to be decoded. These should generate believable, valid input for each of the harnesses. Modify the harnesses so that their extra parameters are determined from the fuzzed input. These will allow the fuzzer to take a valid input and easily produce another valid input instead of only corrupting it with a high probability.
Adventures in Fuzzing Matrix’s Encryption



Send Feedback | WebAssembly Version (beta)