[UNIX] Clam AntiVirus Multiple DoS
From: SecuriTeam (support_at_securiteam.com)
Date: 11/06/05
- Previous message: SecuriTeam: "[NT] NeroNET Directory Traversal"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
To: list@securiteam.com Date: 6 Nov 2005 14:06:15 +0200
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Clam AntiVirus Multiple DoS
------------------------------------------------------------------------
SUMMARY
" <http://www.clamav.net/> Clam AntiVirus is a GPL anti-virus toolkit for
UNIX."
Exploitation of a design error in Clam AntiVirus ClamAV allows attackers
to cause a denial of service (DoS) condition.
DETAILS
Vulnerable Systems:
* ClamAV version 0.86.1
Immune Systems:
* ClamAV version 0.87.1
Cabinet-file DoS:
The vulnerability specifically exists with the libmspack library, which is
included in ClamAV. The vulnerability can be found in the cabd_find
function within mspack/cabd.c:
for (offset = 0; offset < flen; offset += length) {
length = flen - offset;
[... read length from file ...]
for (p = &buf[0], pend = &buf[length]; p < pend; ) {
switch (state) {
[ ... ]
case 19:
-> header has been completely read, cablen has been read from bytes 8-11
[...]
/* likely cabinet found -- try reading it */
cab = sys->alloc(sys, sizeof(struct mscabd_cabinet_p); => an
mscabd_cabinet_p entry will be allocated each time
/* cabinet read correctly! */
offset = caboff + cablen;
-> if cablen (and caboff) == 0, offset will be equal to 0
[...]
/* restart search */
[...]
length = 0;
p = pend;
state = 0;
-> if offset == 0, we will restart at the beginning of the file =>
(because length == 0, so offset will still be zero in the next iteration)
break;
}
}
}
If this function is called with a length value of zero, an infinite loop
occurs. The comments above explain the scenario.
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 infinite loop will cause the ClamAV software to use all available
processor resources, resulting in a denial of service or severe
degradation of system performance. Ultimately, the OOM handler will
terminate a task in order to alleviate the stress on the system.
tnef_attachment() DoS:
Remote exploitation of a design error in Clam AntiVirus ClamAV allows
attackers to cause a denial of service (DoS) condition.
The vulnerability specifically exists in the tnef_attachment function
within tnef.c. A user controlled value is used to fseek into the file that
is being processed; this allows a user to specify the same block
for scanning repeatedly, thus leading to an infinite loop. The following
one line code snippet from the tnef processor demonstrates the flaw:
fseek(fp, (long)(offset + length), SEEK_SET); /* shouldn't be needed */
When this code is reached, length is supplied by the file being processed.
This makes it possible to seek back to the previous header, causing the
infinite loop to begin. Furthermore, if the block is marked as an
attachment, the data that is repeatedly read will be added to a
dynamically allocated memory buffer, making memory exhaustion trivial.
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 infinite loop will cause the ClamAV software to use all available
processor resources, resulting in a DoS or severe degradation of system
performance. Ultimately, the OOM handler will terminate a task to
alleviate the stress on the system.
Workaround:
Archive file analysis can be disabled (--no-archive) but this can have
severe impacts on the virus detection functionality.
Vendor Response:
The vendor has released clamav 0.87.1 to address this vulnerability. It is
available for download at:
<http://prdownloads.sourceforge.net/clamav/clamav-0.87.1.tar.gz?download>
http://prdownloads.sourceforge.net/clamav/clamav-0.87.1.tar.gz?download
Disclosure Timeline:
10/07/2005 Initial vendor notification
10/12/2005 Initial vendor response
11/04/2005 Coordinated public disclosure
ADDITIONAL INFORMATION
The information has been provided by
<mailto:idlabs-advisories@lists.idefense.com> iDEFENSE Labs .
The original article can be found at:
<http://www.idefense.com/application/poi/display?id=333&type=vulnerabilities> http://www.idefense.com/application/poi/display?id=333&type=vulnerabilities,
<http://www.idefense.com/application/poi/display?id=334&type=vulnerabilities> http://www.idefense.com/application/poi/display?id=334&type=vulnerabilities
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.
- Previous message: SecuriTeam: "[NT] NeroNET Directory Traversal"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
- [NEWS] ClamAV Multiple Vulnerabilities (Temporary Files, UUEncode)
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... ClamAV Multiple Vulnerabilities
... which should be relatively easy to be guessed by the attacker is used, ... Beside
others, UUEncoded files are supported, too. ... (Securiteam) - [NEWS] ClamAV libclamav PE File Integer Overflow Vulnerability
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... ClamAV libclamav PE File
Integer Overflow Vulnerability ... Exploitation of this vulnerability results in the
execution of arbitrary ... (Securiteam) - [NEWS] ClamAV libclamav PeSpin Heap Overflow Vulnerability
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... ClamAV libclamav PeSpin Heap
Overflow Vulnerability ... Exploitation of this vulnerability results in the execution
of arbitrary ... (Securiteam) - [UNIX] Clam AntiVirus ClamAV CAB File Unstore Buffer Overflow Vulnerability
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... Clam AntiVirus ClamAV CAB File
Unstore Buffer Overflow Vulnerability ... Remote exploitation of a buffer overflow
vulnerability in Clam AntiVirus' ... (Securiteam)