Vulnerabilities > CVE-2008-2080 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in Nasa Goddard Space Flight Center Common Data Format

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
nasa-goddard-space-flight-center
CWE-119
nessus

Summary

Stack-based buffer overflow in the Read32s_64 function in src/lib/cdfread64.c in the NASA Goddard Space Flight Center Common Data Format (CDF) library before 3.2.1 allows context-dependent attackers to execute arbitrary code via a .cdf file with crafted length tags.

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 familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200805-14.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200805-14 (Common Data Format library: User-assisted execution of arbitrary code) Alfredo Ortega (Core Security Technologies) reported a boundary error within the Read32s_64() function when processing CDF files. Impact : A remote attacker could entice a user to open a specially crafted CDF file, possibly resulting in the remote execution of arbitrary code with the privileges of the user running the application. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id32351
    published2008-05-16
    reporterThis script is Copyright (C) 2008-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/32351
    titleGLSA-200805-14 : Common Data Format library: User-assisted execution of arbitrary code
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Gentoo Linux Security Advisory GLSA 200805-14.
    #
    # The advisory text is Copyright (C) 2001-2015 Gentoo Foundation, Inc.
    # and licensed under the Creative Commons - Attribution / Share Alike 
    # license. See http://creativecommons.org/licenses/by-sa/3.0/
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(32351);
      script_version("1.14");
      script_cvs_date("Date: 2019/08/02 13:32:45");
    
      script_cve_id("CVE-2008-2080");
      script_xref(name:"GLSA", value:"200805-14");
    
      script_name(english:"GLSA-200805-14 : Common Data Format library: User-assisted execution of arbitrary code");
      script_summary(english:"Checks for updated package(s) in /var/db/pkg");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Gentoo host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "The remote host is affected by the vulnerability described in GLSA-200805-14
    (Common Data Format library: User-assisted execution of arbitrary code)
    
        Alfredo Ortega (Core Security Technologies) reported a boundary error
        within the Read32s_64() function when processing CDF files.
      
    Impact :
    
        A remote attacker could entice a user to open a specially crafted CDF
        file, possibly resulting in the remote execution of arbitrary code with
        the privileges of the user running the application.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200805-14"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All Common Data Format library users should upgrade to the latest
        version:
        # emerge --sync
        # emerge --ask --oneshot --verbose '>=sci-libs/cdf-3.2.1'"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_cwe_id(119);
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:cdf");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2008/05/13");
      script_set_attribute(attribute:"plugin_publication_date", value:"2008/05/16");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2008-2019 Tenable Network Security, Inc.");
      script_family(english:"Gentoo Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Gentoo/release", "Host/Gentoo/qpkg-list");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("qpkg.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Gentoo/release")) audit(AUDIT_OS_NOT, "Gentoo");
    if (!get_kb_item("Host/Gentoo/qpkg-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (qpkg_check(package:"sci-libs/cdf", unaffected:make_list("ge 3.2.1"), vulnerable:make_list("lt 3.2.1"))) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else
    {
      tested = qpkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "Common Data Format library");
    }
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_C4F31E166E3311DD8EB70011098AD87F.NASL
    descriptionNASA Goddard Space Flight Center reports : The libraries for the scientific data file format, Common Data Format (CDF) version 3.2 and earlier, have the potential for a buffer overflow vulnerability when reading specially crafted (invalid) CDF files. If successful, this could trigger execution of arbitrary code within the context of the CDF-reading program that could be exploited to compromise a system, or otherwise crash the program. While it
    last seen2020-06-01
    modified2020-06-02
    plugin id33938
    published2008-08-20
    reporterThis script is Copyright (C) 2008-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/33938
    titleFreeBSD : cdf3 -- Buffer overflow vulnerability (c4f31e16-6e33-11dd-8eb7-0011098ad87f)

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/66014/CORE-2008-0326.txt
idPACKETSTORM:66014
last seen2016-12-05
published2008-05-05
reporterCore Security Technologies
sourcehttps://packetstormsecurity.com/files/66014/Core-Security-Technologies-Advisory-2008.0326.html
titleCore Security Technologies Advisory 2008.0326

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 29045 CVE(CAN) ID: CVE-2008-2080 通用数据格式(CDF)是由NASA戈达德航天飞行中心开发的用于存储和操控标量和多维数据的数据格式。 CDF库在打开无效的CDF输入文件时存在栈溢出漏洞,允许攻击者在使用该库的应用程序环境中执行任意指令或导致整个应用程序崩溃。 漏洞存在于src/lib/cdfread64.c文件的以下代码中。Read32s_64函数将数据从文件读取到缓冲区,temp缓冲区大小为MAX_READ32s,但没有检查count参数,因此大于MAX_READ32s的参数可能会触发栈溢出。 /----------- 57 STATICforIDL Logical Read32s_64 (fp, buffer, count) 58 vFILE *fp; 59 Int32 *buffer; 60 int count; 61 { 62 #if defined(NETWORKbyteORDERcpu) 63 if (count &lt; 1) return TRUE; 64 if (!READv64(buffer,(size_t)4,(size_t)count,fp)) return FALSE; 65 #else 66 #define MAX_READ32s CDF_MAX_DIMS /* This must be the maximum of 67 CDF_MAX_DIMS and MAX_VXR_ENTRIES 68 (and for any other uses of 69 `Read32s'). */ 70 int i; Int32 temp[MAX_READ32s]; 71 if (count &lt; 1) return TRUE; 72 if (!READv64(temp,(size_t)4,(size_t)count,fp)) return FALSE; - -----------/ ReadGDR64还在src/lib/cdfread64.c调用了Read32s_64函数: /----------- 256 #if defined(STDARG) 257 STATICforIDL CDFstatus ReadGDR64 (vFILE *fp, OFF_T offset, ...) 258 #else 259 STATICforIDL CDFstatus ReadGDR64 (va_alist) 260 va_dcl 261 #endif 262 { . . . 301 if (!Read32_64(fp,&amp;(fp-&gt;GDR64-&gt;rNumDims))) return CRE; 302 if (!Read32_64(fp,&amp;(fp-&gt;GDR64-&gt;NzVars))) return CRE; 303 if (!Read64_64(fp,&amp;(fp-&gt;GDR64-&gt;UIRhead))) return CRE; 304 if (!Read32_64(fp,&amp;(fp-&gt;GDR64-&gt;rfuC))) return CRE; 305 if (!Read32_64(fp,&amp;(fp-&gt;GDR64-&gt;rfuD))) return CRE; 306 if (!Read32_64(fp,&amp;(fp-&gt;GDR64-&gt;rfuE))) return CRE; 307 if (!Read32s_64(fp,fp-&gt;GDR64-&gt;rDimSizes, 308 (int)fp-&gt;GDR64-&gt;rNumDims)) return CRE; - -----------/ 在307行使用fp-&gt;GDR64-&gt;rNumDims变量作为count参数调用了有漏洞的函数。由于这个变量是在301行从文件中加载的,因此是可控的。 NASA CDF 3.2 NASA ---- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: <a href=http://cdf.gsfc.nasa.gov/index.html target=_blank>http://cdf.gsfc.nasa.gov/index.html</a>
idSSV:3265
last seen2017-11-19
modified2008-05-07
published2008-05-07
reporterRoot
sourcehttps://www.seebug.org/vuldb/ssvid-3265
titleCDF库src/lib/cdfread64.c文件栈溢出漏洞