RSAREF Buffer Overflow Vulnerability
BID:843
Info
RSAREF Buffer Overflow Vulnerability
| Bugtraq ID: | 843 |
| Class: | Boundary Condition Error |
| CVE: | |
| Remote: | Yes |
| Local: | Yes |
| Published: | Dec 01 1999 12:00AM |
| Updated: | Dec 01 1999 12:00AM |
| Credit: | This vulnerability was discovered by Alberto Solino <[email protected]> and Gerardo Richarte <[email protected]> from CORE SDI S.A. |
| Vulnerable: |
Rsa RSAREF 2.0 |
| Not Vulnerable: |
SSLeay SSLeay 0.9.1 OpenSSL Project OpenSSL 0.9.4 OpenBSD OpenSSH 1.2 |
Discussion
RSAREF Buffer Overflow Vulnerability
A buffer overflow vulnerability exists in the RSAREF cryptographic library which may possibly make any software using the library vulnerable.
The vulnerability exists in four functions in the rsa.c source file. The functions are:
int RSAPublicEncrypt()
int RSAPrivateEncrypt()
int RSAPublicDecrypt()
int RSAPrivateDecrypt()
All these function define a local variable called pkcsBlock of 128 byte length which can be overflowed making it possible to execute arbitrary code.
This vulnerability, in conbination with BUGTRAQ ID 797, allows versions of both the SSH client and server linked against the RSAREF2 library to be vulnerable to a remote exploit.
Programs linked against the SSLeay and OpenSSL libraries are not vulnerable as these libraries check the modulus lenght is not longer than what the RSAREF library can handle (MAX_RSA_MODULUS_LEN) in the RSAref_Public_eay2ref() and RSAref_Private_eay2ref() glue functions.
A buffer overflow vulnerability exists in the RSAREF cryptographic library which may possibly make any software using the library vulnerable.
The vulnerability exists in four functions in the rsa.c source file. The functions are:
int RSAPublicEncrypt()
int RSAPrivateEncrypt()
int RSAPublicDecrypt()
int RSAPrivateDecrypt()
All these function define a local variable called pkcsBlock of 128 byte length which can be overflowed making it possible to execute arbitrary code.
This vulnerability, in conbination with BUGTRAQ ID 797, allows versions of both the SSH client and server linked against the RSAREF2 library to be vulnerable to a remote exploit.
Programs linked against the SSLeay and OpenSSL libraries are not vulnerable as these libraries check the modulus lenght is not longer than what the RSAREF library can handle (MAX_RSA_MODULUS_LEN) in the RSAref_Public_eay2ref() and RSAref_Private_eay2ref() glue functions.
Exploit / POC
RSAREF Buffer Overflow Vulnerability
Th exploit is a diff against the ssh client version 1.2.27.
Th exploit is a diff against the ssh client version 1.2.27.
Solution / Fix
RSAREF Buffer Overflow Vulnerability
Solution:
RSA Security is no longer support the RSAREF library.
CORE SDI has developed a fix for RSAREF. You can find it at http://www.securityfocus.com/data/vulnerabilities/patches/rsaref2.patch. Copy this patch to a file named rsaref2.patch in rsaref2/source, and apply with 'patch <rsaref2.patch'
Solution:
RSA Security is no longer support the RSAREF library.
CORE SDI has developed a fix for RSAREF. You can find it at http://www.securityfocus.com/data/vulnerabilities/patches/rsaref2.patch. Copy this patch to a file named rsaref2.patch in rsaref2/source, and apply with 'patch <rsaref2.patch'
References
RSAREF Buffer Overflow Vulnerability
References:
References: