what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Rapid7 Security Advisory 25

Rapid7 Security Advisory 25
Posted Oct 17, 2006
Authored by Rapid7 | Site rapid7.com

Rapid7 Advisory R7-0025: Buffer Overflow in NVIDIA Binary Graphics Driver For Linux - The NVIDIA Binary Graphics Driver for Linux is vulnerable to a buffer overflow that allows an attacker to run arbitrary code as root. This bug can be exploited both locally or remotely (via a remote X client or an X client which visits a malicious web page). A working proof-of-concept root exploit is included with this advisory.

tags | advisory, remote, web, overflow, arbitrary, root
systems | linux
SHA-256 | 679bc2010545bee7e81e23feffc3a19cbbc70fb9d92a8e22c1ecee59cc09c4e6

Rapid7 Security Advisory 25

Change Mirror Download
_______________________________________________________________________
Rapid7, LLC Security Advisory
Visit http://www.rapid7.com/ to download NeXpose,
SC Magazine Winner of Best Vulnerability Management product.
_______________________________________________________________________


Rapid7 Advisory R7-0025
Buffer Overflow in NVIDIA Binary Graphics Driver For Linux

Published: Oct 16, 2006
Revision: 1.0
http://www.rapid7.com/advisories/R7-0025.jsp

1. Affected system(s):

KNOWN VULNERABLE:
o NVIDIA Driver For Linux v8774
o NVIDIA Driver For Linux v8762

PROBABLY VULNERABLE:
o NVIDIA Driver for FreeBSD
o NVIDIA Driver for Solaris
o Earlier versions

KNOWN FIXED:
o None

2. Summary

The NVIDIA Binary Graphics Driver for Linux is vulnerable to a
buffer overflow that allows an attacker to run arbitrary code as
root. This bug can be exploited both locally or remotely (via
a remote X client or an X client which visits a malicious web page).
A working proof-of-concept root exploit is included with this
advisory.

The NVIDIA drivers for Solaris and FreeBSD are also likely to be
vulnerable.

3. Vendor status and information

NVIDIA Corporation
http://www.nvidia.com

There have been multiple public reports of this NVIDIA bug on the
NVNews forum [1,2] and elsewhere, dating back to 2004 [3]. NVIDIA's
first public acknowledgement of this bug was on July 7th, 2006. In a
public posting [1] on the NVNews forum, an NVIDIA employee reported
having reproduced the problem, assigned it bug ID 239065, and promised
a fix would be forthcoming.

As of the publication date, the latest NVIDIA binary driver is still
vulnerable. Furthermore, it is our opinion that NVIDIA's binary driver
remains an unacceptable security risk based on the large numbers of
reproducible, unfixed crashes that have been reported in public forums
and bug databases. This number does not include bugs reported directly
to NVIDIA.

1. http://www.nvnews.net/vbulletin/showthread.php?p=931048 (Jul 2006)
2. http://www.nvnews.net/vbulletin/showthread.php?t=76493 (Sep 2006)
3. https://bugs.freedesktop.org/show_bug.cgi?id=2129 (Dec 2004)
4. http://lists.freedesktop.org/archives/xorg/2005-January/005642.html
5. http://forums.gentoo.org/viewtopic.php?t=282107 (Jan 2005)
6. https://bugs.eclipse.org/bugs/show_bug.cgi?id=87299 (Mar 2005)
7. http://www.nvnews.net/vbulletin/showthread.php?t=76206 (Sep 2006)

4. Solution

Disable the binary blob driver and use the open-source "nv" driver
that is included by default with X.

5. Detailed analysis

There are two NVIDIA graphics drivers for Linux: a closed-source
binary blob driver provided by NVIDIA (which provides acceleration)
and an open-source driver (which lacks acceleration). NVIDIA's
binary blob driver contains an error in its accelerated rendering
of glyphs (text character data) that can be exploited to write
arbitrary data to anywhere in memory. The open-source driver is
not vulnerable.

The XRender extension provides a client function named
XRenderCompositeString8 which tells the X server to render glyphs
onto the screen. This request is processed by the server's
ProcRenderCompositeGlpyhs function. This function pulls the glyphs
out of the render request, constructs a glyph list, and then calls
into the graphics driver via a registered callback function.

The NVIDIA binary blob driver registers a function named _nv000373X.
This function calculates a bounding BoxRec of the total area occupied
by the glyph data. It then uses Xalloc to allocate a buffer large
enough to hold the data by multiplying width * height. This buffer
is then passed to another internal function called _nv000053X.

The _nv000053X function iterates over the glyph list and copies
glyph data into the buffer using each glyph's accumulated width,
xOff, height, and yOff values to calculate the destination position
in the buffer. The NVIDIA binary blob driver does not check this
calculation against the size of the allocated buffer. As a result,
a short sequence of user-supplied glyphs can be used to trick the
function into writing to an arbitrary location in memory.

It is important to note that glyph data is supplied to the X server
by the X client. Any remote X client can gain root privileges on
the X server using the proof of concept program attached.

It is also trivial to exploit this vulnerability as a DoS by causing
an existing X client program (such as Firefox) to render a long text
string. It may be possible to use Flash movies, Java applets, or
embedded web fonts to supply the custom glyph data necessary for
reliable remote code execution.

A simple HTML page containing an INPUT field with a long value is
sufficient to demonstrate the DoS.

5. Credit

This vulnerability was discovered by Derek Abdine of Rapid7. Special
thanks to Marc Bevand for his assistance.

6. Contact Information

Rapid7, LLC
Email: advisory@rapid7.com
Web: http://www.rapid7.com
Phone: +1 (310) 316-1235

7. Disclaimer and Copyright

Rapid7, LLC is not responsible for the misuse of the information
provided in our security advisories. These advisories are a service
to the professional security community. There are NO WARRANTIES with
regard to this information. Any application or distribution of this
information constitutes acceptance AS IS, at the user's own risk.
This information is subject to change without notice.

This advisory Copyright (C) 2006 Rapid7, LLC. Permission is hereby
granted to redistribute this advisory, providing that no changes are
made and that the copyright notices and disclaimers remain intact.
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
    42 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