ports/security/p5-Crypt-OpenPGP/files/patch-lib_Crypt_OpenPGP_Ciphertext.pm
Dag-Erling Smørgrav 220f318b00 Regenerate with 'make makepatch' and add a comment. Note that I am
unsure if the patch is still required, or even if it is correct.
2018-09-10 13:19:46 +00:00

17 lines
730 B
Perl

Patch for CVE-2005-0366: plaintext recovery using checksum failure oracle.
https://nvd.nist.gov/vuln/detail/CVE-2005-0366
--- lib/Crypt/OpenPGP/Ciphertext.pm.orig 2009-12-11 00:05:35 UTC
+++ lib/Crypt/OpenPGP/Ciphertext.pm
@@ -85,8 +85,8 @@ sub decrypt {
my $padlen = $cipher->blocksize + 2;
my $pt = $enc->{prefix} =
$cipher->decrypt(substr $enc->{ciphertext}, 0, $padlen);
- return $enc->error("Bad checksum")
- unless substr($pt, -4, 2) eq substr($pt, -2, 2);
+ # return $enc->error("Bad checksum")
+ # unless substr($pt, -4, 2) eq substr($pt, -2, 2);
$cipher->sync unless $enc->{is_mdc};
$pt = $cipher->decrypt(substr $enc->{ciphertext}, $padlen);
if ($enc->{is_mdc}) {