diff options
author | cpiazza <cpiazza@FreeBSD.org> | 1999-12-02 15:49:03 +0800 |
---|---|---|
committer | cpiazza <cpiazza@FreeBSD.org> | 1999-12-02 15:49:03 +0800 |
commit | 059c1941e62e318552e1937f810102dd3e3dac6b (patch) | |
tree | e93e749fdc3154ebc75c984ebc87273bc1ef60c7 /security/rsaref | |
parent | b94a6d3ce3e43047e30575e9aebbf2cf283d24b7 (diff) | |
download | freebsd-ports-graphics-059c1941e62e318552e1937f810102dd3e3dac6b.tar.gz freebsd-ports-graphics-059c1941e62e318552e1937f810102dd3e3dac6b.tar.zst freebsd-ports-graphics-059c1941e62e318552e1937f810102dd3e3dac6b.zip |
fix buffer overflow in RSA{Public,Private}Decrypt. from CORE SDI.
Diffstat (limited to 'security/rsaref')
-rw-r--r-- | security/rsaref/files/patch-ac | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/security/rsaref/files/patch-ac b/security/rsaref/files/patch-ac new file mode 100644 index 00000000000..3f442a44ab9 --- /dev/null +++ b/security/rsaref/files/patch-ac @@ -0,0 +1,42 @@ +--- rsa.c.orig Fri Mar 25 14:01:48 1994 ++++ rsa.c Wed Dec 1 23:01:22 1999 +@@ -33,6 +33,9 @@ + unsigned char byte, pkcsBlock[MAX_RSA_MODULUS_LEN]; + unsigned int i, modulusLen; + ++ if (inputLen + 3 > MAX_RSA_MODULUS_LEN) ++ return (RE_LEN); ++ + modulusLen = (publicKey->bits + 7) / 8; + if (inputLen + 11 > modulusLen) + return (RE_LEN); +@@ -78,6 +81,9 @@ + unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN]; + unsigned int i, modulusLen, pkcsBlockLen; + ++ if (inputLen > MAX_RSA_MODULUS_LEN) ++ return (RE_LEN); ++ + modulusLen = (publicKey->bits + 7) / 8; + if (inputLen > modulusLen) + return (RE_LEN); +@@ -129,6 +135,9 @@ + unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN]; + unsigned int i, modulusLen; + ++ if (inputLen + 3 > MAX_RSA_MODULUS_LEN) ++ return (RE_LEN); ++ + modulusLen = (privateKey->bits + 7) / 8; + if (inputLen + 11 > modulusLen) + return (RE_LEN); +@@ -168,6 +177,9 @@ + unsigned char pkcsBlock[MAX_RSA_MODULUS_LEN]; + unsigned int i, modulusLen, pkcsBlockLen; + ++ if (inputLen > MAX_RSA_MODULUS_LEN) ++ return (RE_LEN); ++ + modulusLen = (privateKey->bits + 7) / 8; + if (inputLen > modulusLen) + return (RE_LEN); |