CVE-2004-2003
CVSS7.5
发布时间 :2004-05-06 00:00:00
修订时间 :2016-10-17 23:04:38
NMCOE    

[原文]Buffer overflow in the ssl_prcert function in the SSLway filter (sslway.c) for DeleGate 8.9.2 and earlier allows remote attackers to execute arbitrary code via a certificate with a long (1) subject or (2) issuer name field.


[CNNVD]DeleGate SSLway Filter远程堆栈缓冲区溢出漏洞(CNNVD-200405-047)

        
        DeleGate是一款多功能应用级网关,运行在多个平台上。
        DeleGate SSLway过滤器在处理用户提供的部分证书字段内容时缺少充分边界检查,远程攻击者可以利用这个漏洞对网关程序进行缓冲区溢出攻击,可能以进程权限在系统上执行任意指令。
        当DeleGate SSLway过滤器使用时处理客户或服务端连接时存在漏洞,使用标题或发送者名字字段内容超过256字节的证书,可触发缓冲区溢出:
         static ssl_prcert(ssl,show,outssl,outfd,what)
         SSL *ssl;
         char *what;
         { X509 *peer;
         char subjb[256],*sb,issrb[256],*is;
         char *dp,ident[256];
        
         ident[0] = 0;
         if( peer = SSL_get_peer_certificate(ssl) ){
         sb = X509_NAME_oneline(X509_get_subject_name(peer),subjb,1024);
         is = X509_NAME_oneline(X509_get_issuer_name(peer),issrb,1024);
        X509_NAME_oneline()的第二个参数是要写入的缓冲区,第三个参数是缓冲区大小,上面缓冲区大小定义为1024字节,而缓冲区实际只有256字节,因此过多的数据可覆盖ssl_prcert()的返回地址。
        

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

- CPE (受影响的平台与产品)

cpe:/a:delegate:delegate:8.9.2
cpe:/a:delegate:delegate:8.9.1
cpe:/a:delegate:delegate:7.7.1
cpe:/a:delegate:delegate:7.8.0
cpe:/a:delegate:delegate:7.7.0
cpe:/a:delegate:delegate:8.9
cpe:/a:delegate:delegate:7.8.2
cpe:/a:delegate:delegate:7.8.1
cpe:/a:delegate:delegate:8.4.0
cpe:/a:delegate:delegate:8.5.0
cpe:/a:delegate:delegate:7.9.11
cpe:/a:delegate:delegate:8.3.3
cpe:/a:delegate:delegate:8.3.4

- OVAL (用于检测的技术细节)

未找到相关OVAL定义

- 官方数据库链接

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2004-2003
(官方数据源) MITRE
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2004-2003
(官方数据源) NVD
http://www.cnnvd.org.cn/vulnerability/show/cv_cnnvdid/CNNVD-200405-047
(官方数据源) CNNVD

- 其它链接及资源

http://marc.info/?l=bugtraq&m=108386181021070&w=2
(UNKNOWN)  BUGTRAQ  20040506 [0xbadc0ded #03] DeleGate (SSL-filter) <= 8.9.2
http://www.securityfocus.com/bid/10295
(VENDOR_ADVISORY)  BID  10295
http://xforce.iss.net/xforce/xfdb/16078
(UNKNOWN)  XF  delegate-sslway-bo(16078)

- 漏洞信息

DeleGate SSLway Filter远程堆栈缓冲区溢出漏洞
高危 边界条件错误
2004-05-06 00:00:00 2005-10-20 00:00:00
远程  
        
        DeleGate是一款多功能应用级网关,运行在多个平台上。
        DeleGate SSLway过滤器在处理用户提供的部分证书字段内容时缺少充分边界检查,远程攻击者可以利用这个漏洞对网关程序进行缓冲区溢出攻击,可能以进程权限在系统上执行任意指令。
        当DeleGate SSLway过滤器使用时处理客户或服务端连接时存在漏洞,使用标题或发送者名字字段内容超过256字节的证书,可触发缓冲区溢出:
         static ssl_prcert(ssl,show,outssl,outfd,what)
         SSL *ssl;
         char *what;
         { X509 *peer;
         char subjb[256],*sb,issrb[256],*is;
         char *dp,ident[256];
        
         ident[0] = 0;
         if( peer = SSL_get_peer_certificate(ssl) ){
         sb = X509_NAME_oneline(X509_get_subject_name(peer),subjb,1024);
         is = X509_NAME_oneline(X509_get_issuer_name(peer),issrb,1024);
        X509_NAME_oneline()的第二个参数是要写入的缓冲区,第三个参数是缓冲区大小,上面缓冲区大小定义为1024字节,而缓冲区实际只有256字节,因此过多的数据可覆盖ssl_prcert()的返回地址。
        

- 公告与补丁

        厂商补丁:
        DeleGate
        --------
        目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
        DeleGate Upgrade DeleGate/8.9.3
        ftp://ftp.delegate.org/pub/DeleGate/download.html

- 漏洞信息 (24095)

DeleGate 7.8.x/8.x SSLway Filter Remote Stack Based Buffer Overflow Vulnerability (EDBID:24095)
linux dos
2004-05-06 Verified
0 Joel Eriksson
N/A [点击下载]
source: http://www.securityfocus.com/bid/10295/info

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.

[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'		

- 漏洞信息

5945
DeleGate SSLway ssl_prcert Multiple Field Remote Overflow
Remote / Network Access Input Manipulation
Loss of Integrity
Exploit Public

- 漏洞描述

A remote overflow exists in DeleGate. The proxy server fails to prevent a malicious user from using X509_NAME_oneline() function in sslway.c to overwrite the saved return address in the ssl_prcert stack frame resulting in a buffer overflow. With a specially crafted request, an attacker can execute arbitrary shellcode resulting in a loss of integrity.

- 时间线

2004-05-06 Unknow
2004-05-06 Unknow

- 解决方案

Upgrade to version 8.9.3 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

 

 

关于SCAP中文社区

SCAP中文社区是国内第一个以SCAP为主题的中文开放社区。了解更多信息,请查阅[关于本站]

版权声明

CVE/CWE/OVAL均为MITRE公司的注册商标,它们的官方数据源均保存在MITRE公司的相关网站