Sshd RSAREF Buffer Overflow Vulnerability
BID:797
Info
Sshd RSAREF Buffer Overflow Vulnerability
| Bugtraq ID: | 797 |
| Class: | Boundary Condition Error |
| CVE: | |
| Remote: | Yes |
| Local: | No |
| Published: | Nov 13 1999 12:00AM |
| Updated: | Nov 13 1999 12:00AM |
| Credit: | This was dicussed on Vuln-Dev, which is hosted by Security Focus. This was posted to BugTraq by Blue Boar <[email protected]> on Nov 13, 1999. |
| Vulnerable: |
SSH Communications Security SSH 1.2.27 |
| Not Vulnerable: |
SSH Communications Security SSH2 2.0 |
Discussion
Sshd RSAREF Buffer Overflow Vulnerability
There is a serious remote buffer overflow vulnerability in ssh 1.2.27 and previous versions if it is compiled with RSAREF. The vulnerable buffer is input_data[MAX_RSA_MODULUS_LEN], defined in rsa_private_decrypt() and passed by reference to several different functions along with the length of the buffer. In one function, mp_linearize_msb_first(), the length of the actual buffer is not checked against the length value that it is passed while it is being written to. This allows for injection and possible execution of malicious arbitrary code.
It is not that simple, however.
The data which is written to input_data[] are the limbs of the multiple precision integer that session_key_int (from the client to the server) would normally be. To successfully exploit this, the egg must hidden in a precision integer which will lay out correct shellcode in the buffer when its limbs are extracted.
Though it is a little more complicated to exploit, it is still very serious and the patch posted to BugTraq should be applied immediately.
There is a serious remote buffer overflow vulnerability in ssh 1.2.27 and previous versions if it is compiled with RSAREF. The vulnerable buffer is input_data[MAX_RSA_MODULUS_LEN], defined in rsa_private_decrypt() and passed by reference to several different functions along with the length of the buffer. In one function, mp_linearize_msb_first(), the length of the actual buffer is not checked against the length value that it is passed while it is being written to. This allows for injection and possible execution of malicious arbitrary code.
It is not that simple, however.
The data which is written to input_data[] are the limbs of the multiple precision integer that session_key_int (from the client to the server) would normally be. To successfully exploit this, the egg must hidden in a precision integer which will lay out correct shellcode in the buffer when its limbs are extracted.
Though it is a little more complicated to exploit, it is still very serious and the patch posted to BugTraq should be applied immediately.
Exploit / POC
Sshd RSAREF Buffer Overflow Vulnerability
Currently the SecurityFocus staff are not aware of any exploits for this issue. If you feel we are in error or are aware of more recent information, please mail us at: [email protected].
Currently the SecurityFocus staff are not aware of any exploits for this issue. If you feel we are in error or are aware of more recent information, please mail us at: [email protected].