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 :

Graphviz Buffer Overflow Code Execution


Arrow  SecurityAlert : 4409
Arrow  CVE : CVE-2008-4555
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 : ibm
Arrow  Published : 16.10.2008

Arrow  Affected Software : graphviz:graphviz:2.20.2 and previous versions



Arrow  Advisory Content :  

The graphviz team has just released a patch to a critical security issue

I reported to them.

The following is the advisory (also available at

http://roeehay.blogspot.com/2008/10/graphviz-buffer-overflow-code-execut
ion.html):

Background

==========

Graphviz is an open-source multi-platform graph visualization software. It

takes a description of graphs in a simple text format (DOT language), and

makes diagrams out of it in several useful formats (including SVG).

Description

===========

A vulnerability exists in Graphviz's parsing engine which makes it possible
to

overflow a globally allocated array and corrupt memory by doing so.

parser.y (Graphviz 2.20.2):

34: static Agraph_t *Gstack[32];

35: static int GSP;

45: static void push_subg(Agraph_t *g)

46: {

47: G = Gstack[GSP++] = g;

48: }

As it can be seen, no bounds check is performed by the push_svg procedure,

allowing one to overflow Gstack by pushing more than 32 (Agraph_t *)

elements.

Impact/Severity

===============

A malicious user can achieve an arbitrary code execution by creating a

specially crafted DOT file and convince the victim to render it using
Graphviz.

Affected versions

=================

Graphviz 2.20.2 is affected by this vulnerability. Older version are
probably

affected as well.

Workaround

===========

Version 2.20.3 has been released in order to address this issue. A bounds
check

has been added in order to avoid an overflow.

parser.y (Graphviz 2.20.3):

34: #define GSTACK_SIZE 64

35: static Agraph_t *Gstack[GSTACK_SIZE];

36: static int GSP;

45:

46: static void push_subg(Agraph_t *g)

47: {

48: if (GSP >= GSTACK_SIZE) {

49: agerr (AGERR, "Gstack overflow in graph parser\n"); exit(1);

50: }

51: G = Gstack[GSP++] = g;

52: }

Acknowledgements

================

I would like to thank the Graphviz team (Stephen C. North, John Ellson,

Emden R. Gansner and others) for their quick responses and fix (it took
them

only a day since my disclosure to release a patch!).



Arrow  References :

http://www.securityfocus.com/bid/31648
http://www.securityfocus.com/archive/1/archive/1/497150/100/0/threaded
http://secunia.com/advisories/32186
http://roeehay.blogspot.com/2008/10/graphviz-buffer-overflow-code-execution.html
http://bugs.gentoo.org/show_bug.cgi?id=240636




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 Multiple
   Vulnerabilities

» PHP 5.2.11 libgd multiple
   vulnerabilities

» PHP 5.2.11 tempnam()
   safe_mode bypass

» PHP 5.3.0 5.2.11
   posix_mkfifo()
   open_basedir bypass

Copyright © SecurityReason.com. All Rights Reserved.