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
+ OpenSSL Project OpenSSL 0.9.4
+ Robert O'Callahan TTSSH 1.5.1
+ Robert O'Callahan TTSSH 1.5
+ Robert O'Callahan TTSSH 1.4
+ Robert O'Callahan TTSSH 1.3
+ Robert O'Callahan TTSSH 1.2
+ Robert O'Callahan TTSSH 1.1
+ SSH Communications Security SSH 1.2.27
+ SSH Communications Security SSH 1.2.26
+ SSH Communications Security SSH 1.2.25
+ SSH Communications Security SSH 1.2.24
+ SSH Communications Security SSH 1.2.23
+ SSH Communications Security SSH 1.2.22
+ SSH Communications Security SSH 1.2.21
+ SSH Communications Security SSH 1.2.20
+ SSH Communications Security SSH 1.2.19
+ SSH Communications Security SSH 1.2.18
+ SSH Communications Security SSH 1.2.17
+ SSH Communications Security SSH 1.2.16
+ SSH Communications Security SSH 1.2.15
+ SSH Communications Security SSH 1.2.14
+ SSH Communications Security SSH 1.2.13
+ SSH Communications Security SSH 1.2.12
+ SSH Communications Security SSH 1.2.11
+ SSH Communications Security SSH 1.2.10
+ SSH Communications Security SSH 1.2.9
+ SSH Communications Security SSH 1.2.8
+ SSH Communications Security SSH 1.2.7
+ SSH Communications Security SSH 1.2.6
+ SSH Communications Security SSH 1.2.5
+ SSH Communications Security SSH 1.2.4
+ SSH Communications Security SSH 1.2.3
+ SSH Communications Security SSH 1.2.2
+ SSH Communications Security SSH 1.2.1
+ SSLeay SSLeay 0.9.1
Not Vulnerable: SSLeay SSLeay 0.9.1
OpenSSL Project OpenSSL 0.9.4
+ Debian Linux 3.0
+ OpenBSD OpenBSD 2.6
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.

Exploit / POC

RSAREF Buffer Overflow Vulnerability

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'

References

RSAREF Buffer Overflow Vulnerability

References:

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report