CVE-1999-1435
CVSS7.2
发布时间 :1998-07-10 00:00:00
修订时间 :2016-10-17 22:04:30
NMCOS    

[原文]Buffer overflow in libsocks5 library of Socks 5 (socks5) 1.0r5 allows local users to gain privileges via long environmental variables.


[CNNVD]Socks5 1.0r5缓冲区溢出漏洞(CNNVD-199807-010)

        Socks 5 (socks5) 1.0r5的libsocks5图书馆中存在缓冲区溢出漏洞,本地用户借助超长的环境变量获得特权。

- CVSS (基础分值)

CVSS分值: 7.2 [严重(HIGH)]
机密性影响: COMPLETE [完全的信息泄露导致所有系统文件暴露]
完整性影响: COMPLETE [系统完整性可被完全破坏]
可用性影响: COMPLETE [可能导致系统完全宕机]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: LOCAL [漏洞利用需要具有物理访问权限或本地帐户]
身份认证: NONE [漏洞利用无需身份认证]

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

产品及版本信息(CPE)暂不可用

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://marc.info/?l=bugtraq&m=90221104525933&w=2
(UNKNOWN)  BUGTRAQ  19980710 socks5 1.0r5 buffer overflow..
http://www.securityfocus.com/bid/154
(UNKNOWN)  BID  154

- 漏洞信息

Socks5 1.0r5缓冲区溢出漏洞
高危 缓冲区溢出
1998-07-10 00:00:00 2005-10-20 00:00:00
远程※本地  
        Socks 5 (socks5) 1.0r5的libsocks5图书馆中存在缓冲区溢出漏洞,本地用户借助超长的环境变量获得特权。

- 公告与补丁

        Version 1.0r6 fixes this problem by replacing the call to vsprintf() with vsnprintf() and bounding the fill to the size of the fmt_cpy variable it is filling. This version, and subsequent version, are available at
        http://www.socks.nec.com/.
        As a temporary fix, the following patch can be applied:
        diff -r -u socks-dist/lib/log.c socks5-v1.0r5/lib/log.c
        --- socks-dist/lib/log.c Thu Feb 19 10:49:56 1998
        +++ socks5-v1.0r5/lib/log.c Wed Jul 1 16:39:30 1998
        @@ -77,7 +77,8 @@
         }
        void S5LogvUpdate(const void *handle, int level, int msgID, const char *oformat, va_list pvar) {
        - char fmt_cpy[2*1024 + 2*10], format[2*1024 + 2*10];
        +#define FMT_BUFLEN (2*1024 + 2*10)
        + char fmt_cpy[FMT_BUFLEN], format[FMT_BUFLEN];
         S5LogHandle *h = (S5LogHandle *)handle;
         int serrno = GETERRNO();
         static int dontLoop = 0;
        @@ -112,7 +113,9 @@
         strcat(format, " ");
        replacePercentM(oformat, format + strlen(format), sizeof(format) - strlen(format));
        - vsprintf(fmt_cpy, format, pvar);
        + if(vsnprintf(fmt_cpy, FMT_BUFLEN-1,format, pvar)==-1) {
        + fmt_cpy[FMT_BUFLEN-1]='\0';
        + }
        /* Log to the Local log facility, e.g. Stderr on Unix and maybe a window */
         /* or something on NT. Neither system can deal with a NULL format so */

- 漏洞信息

12219
Socks 5 libsocks5 Environment Variables Local Overflow
Input Manipulation
Loss of Integrity

- 漏洞描述

Unknown or Incomplete

- 时间线

1998-07-10 Unknow
Unknow Unknow

- 解决方案

Unknown or Incomplete

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Socks5 1.0r5 Buffer Overflow Vulnerability
Boundary Condition Error 154
Yes Yes
1998-07-10 12:00:00 2009-07-11 12:16:00
This vulnerability was discovered, and reported to the Bugtraq mailing list by Zach Brown <zab@zabbo.net> on July 10, 1998.

- 受影响的程序版本

NEC socks5 1.0 r5

- 漏洞讨论

A buffer overflow exists in certain versions of sock5, which could allow a local user to use any setuid binary compiled against the socks5 library to gain root access. The code in question involves filling a buffer of fixed size via the vsprintf() call. By setting the proper enviroment variables, a user could cause the return address on the stack to be overwritten, and arbitrary code run with root privelege.

- 漏洞利用

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: vuldb@securityfocus.com.

- 解决方案

Version 1.0r6 fixes this problem by replacing the call to vsprintf() with vsnprintf() and bounding the fill to the size of the fmt_cpy variable it is filling. This version, and subsequent version, are available at http://www.socks.nec.com/.

As a temporary fix, the following patch can be applied:

diff -r -u socks-dist/lib/log.c socks5-v1.0r5/lib/log.c
--- socks-dist/lib/log.c Thu Feb 19 10:49:56 1998
+++ socks5-v1.0r5/lib/log.c Wed Jul 1 16:39:30 1998
@@ -77,7 +77,8 @@
}

void S5LogvUpdate(const void *handle, int level, int msgID, const char *oformat, va_list pvar) {
- char fmt_cpy[2*1024 + 2*10], format[2*1024 + 2*10];
+#define FMT_BUFLEN (2*1024 + 2*10)
+ char fmt_cpy[FMT_BUFLEN], format[FMT_BUFLEN];
S5LogHandle *h = (S5LogHandle *)handle;
int serrno = GETERRNO();
static int dontLoop = 0;
@@ -112,7 +113,9 @@
strcat(format, " ");

replacePercentM(oformat, format + strlen(format), sizeof(format) - strlen(format));
- vsprintf(fmt_cpy, format, pvar);
+ if(vsnprintf(fmt_cpy, FMT_BUFLEN-1,format, pvar)==-1) {
+ fmt_cpy[FMT_BUFLEN-1]='\0';
+ }

/* Log to the Local log facility, e.g. Stderr on Unix and maybe a window */
/* or something on NT. Neither system can deal with a NULL format so */

- 相关参考

     

     

    关于SCAP中文社区

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

    版权声明

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