exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

graphviz-overflow.txt

graphviz-overflow.txt
Posted Oct 9, 2008
Authored by Roee Hay

A vulnerability exists in Graphviz's parsing engine which makes it possible to overflow a globally allocated array and corrupt memory by doing so. Version 2.20.2 is affected.

tags | advisory, overflow
SHA-256 | 74aec18b63e6c203563c8dffc4f13d382b97e59657719590779916c19ea1a725

graphviz-overflow.txt

Change Mirror Download
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-execution.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!).
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    0 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close