summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-08-19 14:30:35 +0200
committerJustus Winter <justus@sequoia-pgp.org>2021-09-08 11:08:19 +0200
commit0c0621ed263657e1d1348a62d7ceb59f2823bf76 (patch)
tree89f51764e2dc8bdca6b671f716108d6fcce37a59 /openpgp/src/parse.rs
parentf6abef476d180fc1f16e95641248eac230f3c10e (diff)
openpgp: Constrain AEAD chunk sizes.
- Make sure that chunk sizes are between 64B and 4MiB. - Fixes a DoS resulting from unconstrained, attacker-controlled heap allocations. - Fixes #738.
Diffstat (limited to 'openpgp/src/parse.rs')
-rw-r--r--openpgp/src/parse.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs
index 7b747180..fbb5cfff 100644
--- a/openpgp/src/parse.rs
+++ b/openpgp/src/parse.rs
@@ -5482,9 +5482,9 @@ mod test {
],
},
DecryptTest {
- filename: "aed/msg-aes128-eax-chunk-size-134217728-password-123.pgp",
+ filename: "aed/msg-aes128-eax-chunk-size-4194304-password-123.pgp",
algo: SymmetricAlgorithm::AES128,
- key_hex: "D7EE3F3B049DE011687EC9E08D6DCBB0",
+ key_hex: "918E6BF5C6CE4320D014735AF27BFA76",
plaintext: Data::File("a-cypherpunks-manifesto.txt"),
paths: &[
(Tag::SKESK, &[ 0 ]),