CVE-2005-1923
CVSS2.6
发布时间 :2005-07-05 00:00:00
修订时间 :2008-09-05 16:50:26
NMCOPS    

[原文]The ENSURE_BITS macro in mszipd.c for Clam AntiVirus (ClamAV) 0.83, and other versions vefore 0.86, allows remote attackers to cause a denial of service (CPU consumption by infinite loop) via a cabinet (CAB) file with the cffile_FolderOffset field set to 0xff, which causes a zero-length read.


[CNNVD]开源软件 ClamAV ENSURE_BITS 拒绝服务漏洞(CNNVD-200507-034)

        Clam AntiVirus一款开源的杀毒工具包。
        Clam AntiVirus 0.83及其他0.86前的版本中mszipd.c的ENSURE_BITS宏存在拒绝服务漏洞。
        通过特制的cab文件,将cffile_FolderOffset设置为0xff,将导致长度为0的读取,而ENSURE_BITS宏不能检查0长度读取,攻击者可利用此漏洞引起死循环,导致CPU资源消耗,形成拒绝服务。

- CVSS (基础分值)

CVSS分值: 2.6 [轻微(LOW)]
机密性影响: NONE [对系统的机密性无影响]
完整性影响: NONE [不会对系统完整性产生影响]
可用性影响: PARTIAL [可能会导致性能下降或中断资源访问]
攻击复杂度: HIGH [漏洞利用存在特定的访问条件]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/a:clam_anti-virus:clamav:0.84_rc2
cpe:/a:clam_anti-virus:clamav:0.85
cpe:/a:clam_anti-virus:clamav:0.84_rc1
cpe:/a:clam_anti-virus:clamav:0.85.1
cpe:/a:clam_anti-virus:clamav:0.83

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

未找到相关OVAL定义

- 官方数据库链接

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

- 其它链接及资源

http://www.idefense.com/application/poi/display?id=275&type=vulnerabilities
(VENDOR_ADVISORY)  IDEFENSE  20050629 Clam AntiVirus ClamAV Cabinet File Handling DoS Vulnerability
http://www.debian.org/security/2005/dsa-737
(UNKNOWN)  DEBIAN  DSA-737

- 漏洞信息

开源软件 ClamAV ENSURE_BITS 拒绝服务漏洞
低危 其他
2005-07-05 00:00:00 2005-10-20 00:00:00
远程  
        Clam AntiVirus一款开源的杀毒工具包。
        Clam AntiVirus 0.83及其他0.86前的版本中mszipd.c的ENSURE_BITS宏存在拒绝服务漏洞。
        通过特制的cab文件,将cffile_FolderOffset设置为0xff,将导致长度为0的读取,而ENSURE_BITS宏不能检查0长度读取,攻击者可利用此漏洞引起死循环,导致CPU资源消耗,形成拒绝服务。

- 公告与补丁

        目前厂商已经发布了升级补丁以修复这个安全问题,补丁下载链接:
        http://sourceforge.net/projects/clamav/files/

- 漏洞信息 (F38366)

iDEFENSE Security Advisory 2005-06-29.1 (PacketStormID:F38366)
2005-07-01 00:00:00
iDefense Labs  idefense.com
advisory,remote,denial of service
CVE-2005-1923
[点击下载]

iDEFENSE Security Advisory 06.29.05-1 - Remote exploitation of an input validation error in Clam AntiVirus ClamAV allows attackers to cause a denial of service condition. The cabinet file format is a Microsoft archive format used for distributing Microsoft software. The vulnerability specifically exists due to insufficient validation on cabinet file header data. Versions below 0.86 are vulnerable.

Clam AntiVirus ClamAV Cabinet File Handling DoS Vulnerability

iDEFENSE Security Advisory 06.29.05
www.idefense.com/application/poi/display?id=275&type=vulnerabilities
June 29, 2005

I. BACKGROUND

Clam AntiVirus is a GPL anti-virus toolkit for Unix.

II. DESCRIPTION

Remote exploitation of an input validation error in Clam AntiVirus 
ClamAV allows attackers to cause a denial of service condition. The
cabinet file format  is a Microsoft archive format used for distributing
Microsoft software.

The vulnerability specifically exists due to insufficient validation on
cabinet file header data. The ENSURE_BITS() macro fails to check for 
zero length reads, allowing a carefully constructed cabinet file to 
cause an infinite loop. The ENSURE_BITS() macro is executed indirectly 
through the READ_BITS macro and is called from the mszipd_compress 
function. The vulnerable code from libclamav/mspack/mszipd.c is 
detailed below:

#define ENSURE_BITS(nbits) do {                                        \
  while (bits_left < (nbits)) {                                        \
    if (i_ptr >= i_end) {                                              \
      if (zipd_read_input(zip)) return zip->error;                     \
      i_ptr = zip->i_ptr;                                              \
      i_end = zip->i_end;                                              \
    }                                                                  \
    bit_buffer |= *i_ptr++ << bits_left; bits_left  += 8;              \
  }                                                                    \
} while (0)

#define READ_BITS(val, nbits) do {                                     \
  ENSURE_BITS(nbits); (val) = PEEK_BITS(nbits); REMOVE_BITS(nbits);    \
} while (0)

static int zipd_read_input(struct mszipd_stream *zip) {
  int read = zip->sys->read(zip->input, 
  				&zip->inbuf[0], (int)zip->inbuf_size);
  if (read < 0) return zip->error = MSPACK_ERR_READ;
  zip->i_ptr = &zip->inbuf[0];
  zip->i_end = &zip->inbuf[read];

  return MSPACK_ERR_OK;
}

int mszipd_decompress(...)
{
  [...]
  do {
    READ_BITS(i, 8);
    if (i == 'C') state = 1;
    else if ((state == 1) && (i == 'K')) state = 2;
    else state = 0;
  } while (state != 2);
  [...]
}

Modification of the cffile_FolderOffset to 0xff in a CAB file can cause 
a read of zero, resulting in the infinite loop.

III. ANALYSIS

ClamAV is used in a number of mail gateway products. Successful 
exploitation requires an attacker to send a specially constructed CAB
file  through a mail gateway or personal anti-virus client utilizing the

ClamAV scanning engine. The infinate loop will cause the ClamAV 
software to use all available processor resources, resulting in a 
denial of service or severe degradation to system performance. Remote 
exploitation can be achieved by sending a malicious file in an e-mail 
message or during an HTTP session.

IV. DETECTION

iDEFENSE has confirmed the existence of this vulnerability in ClamAV 
0.83. It is suspected that all versions of ClamAV prior to 0.86 are
vulnerable.

The following vendors distribute susceptible ClamAV packages within 
their respective operating system distributions:

	FreeBSD Project: FreeBSD 5.4 and prior
	Gentoo Foundation Inc.: Gentoo Linux 1.1a, 1.2, 1.4, 2004.0,
2004.1
     and 2004.2
	Mandrakesoft SA: Mandrakelinux 10.1 and Corporate Server 3.0
	Novell Inc.: SuSE Linux 9.1, 9.2 

V. WORKAROUND

As a temporary workaround solution, scanning of archive files can be 
disabled by supplying the --no-archive flag; however, this will 
significantly impact the effectiveness of the AV engine.

VI. VENDOR RESPONSE

This vulnerability has been patched in clamav 0.86 which is available
for download at:

   http://www.clamav.net/stable.php#pagestart

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2005-1923 to this issue. This is a candidate for inclusion in
the CVE list (http://cve.mitre.org), which standardizes names for
security problems.

VIII. DISCLOSURE TIMELINE

06/07/2005  Initial vendor notification
06/08/2005  Initial vendor response
06/29/2005  Public disclosure

IX. CREDIT

The discoverer of this vulnerability wishes to remain anonymous.

Get paid for vulnerability research
http://www.idefense.com/poi/teams/vcp.jsp

Free tools, research and upcoming events
http://labs.idefense.com

X. LEGAL NOTICES

Copyright (c) 2005 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert
electronically. It may not be edited in any way without the express
written consent of iDEFENSE. If you wish to reprint the whole or any
part of this alert in any other medium other than electronically, please
email customerservice@idefense.com for permission.

Disclaimer: The information in the advisory is believed to be accurate
at the time of publishing based on currently available information. Use
of the information constitutes acceptance for use in an AS IS condition.
There are no warranties with regard to this information. Neither the
author nor the publisher accepts any liability for any direct, indirect,
or consequential loss or damage arising from use of, or reliance on,
this information.
    

- 漏洞信息

17645
Clam AntiVirus Zero Length Cabinet File ENSURE_BITS() Macro DoS
Remote / Network Access Denial of Service
Loss of Availability

- 漏洞描述

ClamAV contains a flaw that may allow a remote denial of service. The issue is triggered when the ENSURE_BITS() function in the libclamav/mspack/mszipd.c fails to properly validate user supplied input. A remote attacker could send a specially crafted CAB file with a cffile_FolderOffset set to 0xff to cause the program to enter an infinite loop, resulting in a loss of availability of the anti-virus system.

- 时间线

2005-06-29 2005-06-07
Unknow Unknow

- 解决方案

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

- 相关参考

- 漏洞作者

Unknown or Incomplete

- 漏洞信息

Clam Anti-Virus ClamAV Cabinet File Parsing Remote Denial Of Service Vulnerability
Failure to Handle Exceptional Conditions 14089
Yes No
2005-06-29 12:00:00 2009-07-12 04:06:00
Discovery is credited to an anonymous source.

- 受影响的程序版本

Trustix Secure Linux 2.2
Trustix Secure Linux 2.1
Trustix Secure Linux 1.5
Trustix Secure Enterprise Linux 2.0
S.u.S.E. Linux Personal 9.2
S.u.S.E. Linux Personal 9.1
S.u.S.E. Linux Personal 9.0 x86_64
S.u.S.E. Linux Personal 9.0
S.u.S.E. Linux Personal 8.2
S.u.S.E. Linux 8.1
S.u.S.E. Linux 8.0 i386
S.u.S.E. Linux 8.0
Mandriva Linux Mandrake 10.1 x86_64
Mandriva Linux Mandrake 10.1
MandrakeSoft Corporate Server 3.0 x86_64
MandrakeSoft Corporate Server 3.0
Debian Linux 3.1 sparc
Debian Linux 3.1 s/390
Debian Linux 3.1 ppc
Debian Linux 3.1 mipsel
Debian Linux 3.1 mips
Debian Linux 3.1 m68k
Debian Linux 3.1 ia-64
Debian Linux 3.1 ia-32
Debian Linux 3.1 hppa
Debian Linux 3.1 arm
Debian Linux 3.1 amd64
Debian Linux 3.1 alpha
Debian Linux 3.1
Conectiva Linux 10.0
Conectiva Linux 9.0
Clam Anti-Virus ClamAV 0.85.1
Clam Anti-Virus ClamAV 0.85
Clam Anti-Virus ClamAV 0.84 rc2
Clam Anti-Virus ClamAV 0.84 rc1
Clam Anti-Virus ClamAV 0.84
+ Debian Linux 3.1 sparc
+ Debian Linux 3.1 s/390
+ Debian Linux 3.1 ppc
+ Debian Linux 3.1 mipsel
+ Debian Linux 3.1 mips
+ Debian Linux 3.1 m68k
+ Debian Linux 3.1 ia-64
+ Debian Linux 3.1 ia-32
+ Debian Linux 3.1 hppa
+ Debian Linux 3.1 arm
+ Debian Linux 3.1 alpha
+ Debian Linux 3.1
Clam Anti-Virus ClamAV 0.83
Clam Anti-Virus ClamAV 0.82
Clam Anti-Virus ClamAV 0.81
+ Gentoo Linux
Clam Anti-Virus ClamAV 0.80 rc4
Clam Anti-Virus ClamAV 0.80 rc3
Clam Anti-Virus ClamAV 0.80 rc2
Clam Anti-Virus ClamAV 0.80 rc1
Clam Anti-Virus ClamAV 0.80
Clam Anti-Virus ClamAV 0.70
Clam Anti-Virus ClamAV 0.68 -1
Clam Anti-Virus ClamAV 0.68
Clam Anti-Virus ClamAV 0.67
+ Gentoo Linux 1.4 _rc3
+ Gentoo Linux 1.4 _rc2
+ Gentoo Linux 1.4 _rc1
+ Gentoo Linux 1.4
Clam Anti-Virus ClamAV 0.65
Clam Anti-Virus ClamAV 0.60
Clam Anti-Virus ClamAV 0.54
Clam Anti-Virus ClamAV 0.53
Clam Anti-Virus ClamAV 0.52
Clam Anti-Virus ClamAV 0.51
ALT Linux ALT Linux Junior 2.3
ALT Linux ALT Linux Compact 2.3
Clam Anti-Virus ClamAV 0.86 .1
Clam Anti-Virus ClamAV 0.86
Clam Anti-Virus ClamAV 0.81
+ Gentoo Linux

- 不受影响的程序版本

Clam Anti-Virus ClamAV 0.86 .1
Clam Anti-Virus ClamAV 0.86
Clam Anti-Virus ClamAV 0.81
+ Gentoo Linux

- 漏洞讨论

A remote denial of service vulnerability affects ClamAV. This issue is due to a failure of the application to properly handle malicious Cab file content.

An attacker may leverage this issue to crash the Clam Anti-Virus daemon, potentially leaving an affected computer open to infection by malicious code.

- 漏洞利用

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: vuldb@securityfocus.com &lt;mailto:vuldb@securityfocus.com&gt;.

- 解决方案

The vendor has released an upgrade dealing with this issue.

Debian has released advisory DSA 737-1 to address various issues affecting clamav. Please see the referenced advisory for more information.

Conectiva Linux has released security announcement CLSA-2005:973 addressing this issue. Please see the referenced advisory for details on obtaining abd applying the appropriate updates.

Debian has released security advisory DSA 773-1 addressing several issues for their AMD64 port of the operating system. Please see the referenced advisory for further information.


Clam Anti-Virus ClamAV 0.51

Clam Anti-Virus ClamAV 0.52

Clam Anti-Virus ClamAV 0.53

Clam Anti-Virus ClamAV 0.54

Clam Anti-Virus ClamAV 0.60

Clam Anti-Virus ClamAV 0.65

Clam Anti-Virus ClamAV 0.67

Clam Anti-Virus ClamAV 0.68

Clam Anti-Virus ClamAV 0.68 -1

Clam Anti-Virus ClamAV 0.70

Clam Anti-Virus ClamAV 0.80 rc4

Clam Anti-Virus ClamAV 0.80

Clam Anti-Virus ClamAV 0.80 rc3

Clam Anti-Virus ClamAV 0.80 rc1

Clam Anti-Virus ClamAV 0.80 rc2

Clam Anti-Virus ClamAV 0.81

Clam Anti-Virus ClamAV 0.82

Clam Anti-Virus ClamAV 0.83

Clam Anti-Virus ClamAV 0.84

Clam Anti-Virus ClamAV 0.84 rc1

Clam Anti-Virus ClamAV 0.84 rc2

Clam Anti-Virus ClamAV 0.85

Clam Anti-Virus ClamAV 0.85.1

- 相关参考

 

 

关于SCAP中文社区

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

版权声明

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