Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | [UNIX] Clam AntiVirus Multiple DoS |
|---|---|
| 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.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [NT] NeroNET Directory Traversal, SecuriTeam |
|---|---|
| Next by Date: | [NEWS] OpenVPN foreign_option() Formart String, SecuriTeam |
| Previous by Thread: | [NT] NeroNET Directory Traversal, SecuriTeam |
| Next by Thread: | [NEWS] OpenVPN foreign_option() Formart String, SecuriTeam |
| Indexes: | [Date] [Thread] [Top] [All Lists] |