SecurityReason.com - Our Reason is

Security

Register | Forget Password | Login
SecurityReason
WLB
Services
RSS
Corporate
Note

If you have found a vulnerability, please send to our SecurityAlert Database :
secalert()securityreason()com

Also if you have new ( 0-day ) exploit, please send to our ExploitAlert Archive :
exploit()securityreason()com

Home arrow SecurityAlert Database

Arrow  Topic :

ClamAV get_unicode_name() off-by-one buffer overflow


Arrow  SecurityAlert : 4579
Arrow  CVE : CVE-2008-5050
Arrow  CWE : CWE-119
Arrow  SecurityRisk : High  Security Risk High  (About)
Arrow  Remote Exploit : No
Arrow  Local Exploit : Yes
Arrow  Victim interaction required : No
Arrow  Exploit Available : No
Arrow  Credit : Moritz Jodeit
Arrow  Published : 14.11.2008

Arrow  Affected Software : 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.86.2
clam_anti-virus:clamav:0.86.1
clam_anti-virus:clamav:0.86_rc1
clam_anti-virus:clamav:0.86
clam_anti-virus:clamav:0.81
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.84
clam_anti-virus:clamav:0.83
clam_anti-virus:clamav:0.82
clam_anti-virus:clamav:0.81_rc1
clam_anti-virus:clamav:0.73
clam_anti-virus:clamav:0.74
clam_anti-virus:clamav:0.71
clam_anti-virus:clamav:0.72
clam_anti-virus:clamav:0.80
clam_anti-virus:clamav:0.80_rc1
clam_anti-virus:clamav:0.75
clam_anti-virus:clamav:0.75.1
clam_anti-virus:clamav:0.60p
clam_anti-virus:clamav:0.65
clam_anti-virus:clamav:0.54
clam_anti-virus:clamav:0.60
clam_anti-virus:clamav:0.68.1
clam_anti-virus:clamav:0.70
clam_anti-virus:clamav:0.67
clam_anti-virus:clamav:0.68
clam_anti-virus:clamav:0.88.7
clam_anti-virus:clamav:0.90
clam_anti-virus:clamav:0.90_rc1.1
clam_anti-virus:clamav:0.90_rc2
clam_anti-virus:clamav:0.90_rc3
clam_anti-virus:clamav:0.90.1
clam_anti-virus:clamav:0.90.2
clam_anti-virus:clamav:0.87
clam_anti-virus:clamav:0.87.1
clam_anti-virus:clamav:0.88
clam_anti-virus:clamav:0.88.1
clam_anti-virus:clamav:0.88.3
clam_anti-virus:clamav:0.91.2
clam_anti-virus:clamav:0.88.4
clam_anti-virus:clamav:0.88.5
clam_anti-virus:clamav:0.88.6
clam_anti-virus:clamav:0.91rc2
clam_anti-virus:clamav:0.91
clam_anti-virus:clamav:0.90rc1
clam_anti-virus:clamav:0.91rc1
clam_anti-virus:clamav:0.93
clam_anti-virus:clamav:0.93.2
clam_anti-virus:clamav:0.88.2
clam_anti-virus:clamav:0.90.3
clam_anti-virus:clamav:0.91.2:p0
clam_anti-virus:clamav:0.92:p0
clam_anti-virus:clamav:0.90.3:p0
clam_anti-virus:clamav:0.90.3:p1
clam_anti-virus:clamav:0.90.1:p0
clam_anti-virus:clamav:0.90.2:p0
clam_anti-virus:clamav:0.88.7:p0
clam_anti-virus:clamav:0.88.7:p1
clam_anti-virus:clamav:0.02
clam_anti-virus:clamav:0.92
clam_anti-virus:clamav:0.03
clam_anti-virus:clamav:0.04
clam_anti-virus:clamav:0.05
clam_anti-virus:clamav:0.80:rc2
clam_anti-virus:clamav:0.80:rc3
clam_anti-virus:clamav:0.80:rc4
clam_anti-virus:clamav:0.01
clam_anti-virus:clamav:0.84:rc1
clam_anti-virus:clamav:0.84:rc2
clam_anti-virus:clamav:0.91.1
clam_anti-virus:clamav:0.81:rc1
clam_anti-virus:clamav:0.80:rc
clam_anti-virus:clamav:0.86:rc1
clam_anti-virus:clamav:0.14
clam_anti-virus:clamav:0.13
clam_anti-virus:clamav:0.14:pre
clam_anti-virus:clamav:0.10
clam_anti-virus:clamav:0.06
clam_anti-virus:clamav:0.92.1
clam_anti-virus:clamav:0.12
clam_anti-virus:clamav:0.11
clam_anti-virus:clamav:0.15
clam_anti-virus:clamav:0.24
clam_anti-virus:clamav:0.51
clam_anti-virus:clamav:0.52
clam_anti-virus:clamav:0.53
clam_anti-virus:clamav:0.20
clam_anti-virus:clamav:0.21
clam_anti-virus:clamav:0.22
clam_anti-virus:clamav:0.23
clam_anti-virus:clamav:0.93.1
clam_anti-virus:clamav:0.93.3
clam_anti-virus:clamav:0.94 and previous versions



Arrow  Advisory Content :  

-----------------------------------------------------------------
ClamAV get_unicode_name() off-by-one buffer overflow

Copyright (c) 2008 Moritz Jodeit <moritz (at) jodeit (dot) org [email
concealed]> (2008/11/08)
-----------------------------------------------------------------

Application details:

From http://www.clamav.net/:

"Clam AntiVirus is an open source (GPL) anti-virus toolkit for UNIX,
designed especially for e-mail scanning on mail gateways. It provides
a number of utilities including a flexible and scalable multi-threaded
daemon, a command line scanner and advanced tool for automatic
database updates. The core of the package is an anti-virus engine
available in a form of shared library."

Vulnerability description:

ClamAV contains an off-by-one heap overflow vulnerability in the
code responsible for parsing VBA project files. Successful
exploitation could allow an attacker to execute arbitrary code with
the privileges of the `clamd' process by sending an email with a
prepared attachment.

The vulnerability occurs inside the get_unicode_name() function
in libclamav/vba_extract.c when a specific `name' buffer is passed
to it.

101 static char *
102 get_unicode_name(const char *name, int size, int big_endian)
103 {
104 int i, increment;
105 char *newname, *ret;
106
107 if((name == NULL) || (*name == '\0') || (size <= 0))
108 return NULL;
109
110 newname = (char *)cli_malloc(size * 7);

First the `size' of the `name' buffer multiplied by 7 is used to
allocate the destination buffer `newname'. When the `name' buffer
only consists of characters matching some specific criteria [1]
and `big_endian' is set, the following loop can write exactly 7
characters into the allocated destination buffer `newname' per
character found in source buffer `name'.

This effectively fills up the destination buffer completely. After
the loop in line 143, the terminating NUL byte is written and
overflows the allocated buffer on the heap.

143 *ret = '\0';
144
145 /* Saves a lot of memory */
146 ret = cli_realloc(newname, (ret - newname) + 1);
147 return ret ? ret : newname;
148 }

[1] Every character matching the following condition results in
7 characters written to the destination buffer:

(c & 0x80 || !isprint(c)) && (c >= 10 || c < 0)

A VBA project file embedded inside an OLE2 office document send
as an attachment can trigger the off-by-one.

Vendor response:

2008/10/16 Initial report to vendor
2008/10/16 Vulnerability acknowledged by acab (at) clamav (dot) net [email
concealed]
2008/11/03 Release of version 0.94.1

Vulnerable packages:

All versions up to 0.94 are vulnerable.
Version 0.94.1 fixes the problem.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (OpenBSD)

iEYEARECAAYFAkkVfqIACgkQVmsppI8oVCPjPACdGEznyRtPWDjj72oZJMVDT+Lz
u4oAn1FLUN6hCx6nxH3D8aZJpVkFlUvB
=ZGyW
-----END PGP SIGNATURE-----



Arrow  References :

http://www.securityfocus.com/bid/32207
http://xforce.iss.net/xforce/xfdb/46462
http://www.securityfocus.com/archive/1/archive/1/498169/100/0/threaded
http://www.frsirt.com/english/advisories/2008/3085
http://sourceforge.net/project/shownotes.php?release_id=637952&amp;group_id=86638
http://secunia.com/advisories/32663
http://lists.grok.org.uk/pipermail/full-disclosure/2008-November/065530.html




Arrow  Feedback :

If you have additional information or notice any errors regarding this security advisory, please use contact form or email us at info()securityreason()com.
Alert

libc:fts_*() Multiple Denial of Service

Security Risk Medium- 2009-10-02

The fts functions are provided for traversing UNIX file hierarchies...

Apache RSS Apache Alert

» Apache 1.3.41 mod_proxy
   Integer overflow (code
   execution)

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion in work
   directory

» Apache Tomcat 6.0.20 and
   5.5.28 insecure partial
   deploy after failed
   undeploy

» Apache Tomcat 6.0.20 and
   5.5.28 unexpected file
   deletion and/or
   alteration

PHP RSS PHP Alert

» PHP 5.2.12/5.3.1
   session.save_path
   safe_mode and
   open_basedir bypass

» PHP 5.2.12/5.3.1 Multiple
   Vulnerabilities

» PHP 5.2.11 libgd multiple
   vulnerabilities

» PHP 5.2.11 tempnam()
   safe_mode bypass

Copyright © SecurityReason.com. All Rights Reserved.