Vulnerabilities > CVE-2009-4270 - Buffer Errors vulnerability in Ghostscript 8.64/8.70

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
ghostscript
CWE-119
critical
nessus

Summary

Stack-based buffer overflow in the errprintf function in base/gsmisc.c in ghostscript 8.64 through 8.70 allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via a crafted PDF file, as originally reported for debug logging code in gdevcups.c in the CUPS output driver.

Vulnerable Configurations

Part Description Count
Application
Ghostscript
2

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Nessus

  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-961-1.NASL
    descriptionDavid Srbecky discovered that Ghostscript incorrectly handled debug logging. If a user or automated system were tricked into opening a crafted PDF file, an attacker could cause a denial of service or execute arbitrary code with privileges of the user invoking the program. This issue only affected Ubuntu 9.04 and Ubuntu 9.10. The default compiler options for affected releases should reduce the vulnerability to a denial of service. (CVE-2009-4270) It was discovered that Ghostscript incorrectly handled certain malformed files. If a user or automated system were tricked into opening a crafted Postscript or PDF file, an attacker could cause a denial of service or execute arbitrary code with privileges of the user invoking the program. This issue only affected Ubuntu 8.04 LTS and Ubuntu 9.04. (CVE-2009-4897) Dan Rosenberg discovered that Ghostscript incorrectly handled certain recursive Postscript files. If a user or automated system were tricked into opening a crafted Postscript file, an attacker could cause a denial of service or execute arbitrary code with privileges of the user invoking the program. (CVE-2010-1628) Rodrigo Rubira Branco and Dan Rosenberg discovered that Ghostscript incorrectly handled certain malformed Postscript files. If a user or automated system were tricked into opening a crafted Postscript file, an attacker could cause a denial of service or execute arbitrary code with privileges of the user invoking the program. This issue only affected Ubuntu 8.04 LTS, 9.04 and 9.10. (CVE-2010-1869). Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id47734
    published2010-07-14
    reporterUbuntu Security Notice (C) 2010-2019 Canonical, Inc. / NASL script (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/47734
    titleUbuntu 8.04 LTS / 9.04 / 9.10 / 10.04 LTS : ghostscript vulnerabilities (USN-961-1)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-2080.NASL
    descriptionSeveral security issues have been discovered in Ghostscript, a GPL PostScript/PDF interpreter, which might lead to the execution of arbitrary code if a user processes a malformed PDF or Postscript file.
    last seen2020-06-01
    modified2020-06-02
    plugin id48223
    published2010-08-03
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/48223
    titleDebian DSA-2080-1 : ghostscript - several vulnerabilities
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201412-17.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201412-17 (GPL Ghostscript: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in GPL Ghostscript. Please review the CVE identifiers referenced below for details. Impact : A context-dependent attacker could entice a user to open a specially crafted PostScript file or PDF using GPL Ghostscript, possibly resulting in execution of arbitrary code with the privileges of the process or a Denial of Service condition. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id79970
    published2014-12-15
    reporterThis script is Copyright (C) 2014-2016 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/79970
    titleGLSA-201412-17 : GPL Ghostscript: Multiple vulnerabilities
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_1_GHOSTSCRIPT-DEVEL-100712.NASL
    descriptionSpecially crafted postscript (.ps) files could cause buffer overflows in ghostscript that could potentially be exploited to execute arbitrary code (CVE-2010-1628, CVE-2010-1869, CVE-2009-4270) ghostscript by default read some initialization files from the current working directory. Local attackers could potentially exploit that to have other users execute arbitrary commands by placing such files e.g. in /tmp (CVE-2010-2055).
    last seen2020-06-01
    modified2020-06-02
    plugin id48233
    published2010-08-03
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/48233
    titleopenSUSE Security Update : ghostscript-devel (openSUSE-SU-2010:0425-2)
  • NASL familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2010-134.NASL
    descriptionMultiple vulnerabilities has been found and corrected in ghostscript : Stack-based buffer overflow in the errprintf function in base/gsmisc.c in ghostscript 8.64 through 8.70 allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via a crafted PDF file, as originally reported for debug logging code in gdevcups.c in the CUPS output driver (CVE-2009-4270). Buffer overflow in gs/psi/iscan.c in Ghostscript 8.64 and earlier allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted PDF document containing a long name (CVE-2009-4897). Ghostscript 8.64, 8.70, and possibly other versions allows context-dependent attackers to execute arbitrary code via a PostScript file containing unlimited recursive procedure invocations, which trigger memory corruption in the stack of the interpreter (CVE-2010-1628). As a precaution ghostscript has been rebuilt to link against the system libpng library which was fixed with MDVSA-2010:133 Packages for 2008.0 and 2009.0 are provided as of the Extended Maintenance Program. Please visit this link to learn more: http://store.mandriva.com/product_info.php?cPath=149&products_id=4 90 The updated packages have been patched to correct these issues.
    last seen2020-06-01
    modified2020-06-02
    plugin id48193
    published2010-07-30
    reporterThis script is Copyright (C) 2010-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/48193
    titleMandriva Linux Security Advisory : ghostscript (MDVSA-2010:134)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_0_GHOSTSCRIPT-DEVEL-100712.NASL
    descriptionSpecially crafted postscript (.ps) files could cause buffer overflows in ghostscript that could potentially be exploited to execute arbitrary code (CVE-2010-1628, CVE-2010-1869, CVE-2009-4270) ghostscript by default read some initialization files from the current working directory. Local attackers could potentially exploit that to have other users execute arbitrary commands by placing such files e.g. in /tmp (CVE-2010-2055).
    last seen2020-06-01
    modified2020-06-02
    plugin id47815
    published2010-07-23
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/47815
    titleopenSUSE Security Update : ghostscript-devel (openSUSE-SU-2010:0425-1)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_GHOSTSCRIPT-DEVEL-100712.NASL
    descriptionThis update for ghostscript fixes the following security issues : - Specially crafted postscript (.ps) files can cause buffer overflows in ghostscript that could potentially be exploited to execute arbitrary code. (CVE-2010-1869 / CVE-2010-1628 / CVE-2009-4270) - By default, ghostscript reads certain initialization files from the current working directory. Local attackers could potentially exploit this to have other users execute arbitrary commands by placing such files, e.g. in /tmp. (CVE-2010-2055)
    last seen2020-06-01
    modified2020-06-02
    plugin id50909
    published2010-12-02
    reporterThis script is Copyright (C) 2010-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/50909
    titleSuSE 11 / 11.1 Security Update : ghostscript (SAT Patch Numbers 2708 / 2709)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_2_GHOSTSCRIPT-DEVEL-100712.NASL
    descriptionSpecially crafted postscript (.ps) files could cause buffer overflows in ghostscript that could potentially be exploited to execute arbitrary code (CVE-2010-1628, CVE-2010-1869, CVE-2009-4270) ghostscript by default read some initialization files from the current working directory. Local attackers could potentially exploit that to have other users execute arbitrary commands by placing such files e.g. in /tmp (CVE-2010-2055).
    last seen2020-06-01
    modified2020-06-02
    plugin id48236
    published2010-08-03
    reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/48236
    titleopenSUSE Security Update : ghostscript-devel (openSUSE-SU-2010:0425-2)

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 37410 CVE ID: CVE-2009-4270 Ghostscript是用于显示PostScript文件或向非PostScript打印机打印这些文件的程序。 Ghostscript的base/gsmisc.c文件中的errprintf()函数在通过CUPS打印特制的PDF文件时存在栈溢出漏洞,如果特制的PDF能够导致打印失败,则gs cups驱动的某些调试输出就可以在gs调试处理中触发这个溢出,导致执行任意代码。 Ghostscript Ghostscript 8.70 Ghostscript Ghostscript 8.64 厂商补丁: Ghostscript ----------- 目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本: http://www.ghostscript.com/
idSSV:15125
last seen2017-11-19
modified2009-12-23
published2009-12-23
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-15125
titleGhostscript errprintf()函数PDF文件处理栈溢出漏洞

Statements

contributorTomas Hoger
lastmodified2009-12-22
organizationRed Hat
statementNot vulnerable. This issue did not affect the versions of ghostscript as shipped with Red Hat Enterprise Linux 3, 4, or 5.