Vulnerabilities > CVE-2005-2978 - Buffer Overflow vulnerability in NetPBM PNMToPNG

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
netpbm
nessus

Summary

pnmtopng in netpbm before 10.25, when using the -trans option, uses uninitialized size and index variables when converting Portable Anymap (PNM) images to Portable Network Graphics (PNG), which might allow attackers to execute arbitrary code by modifying the stack.

Nessus

  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-200510-18.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-200510-18 (Netpbm: Buffer overflow in pnmtopng) RedHat reported that pnmtopng is vulnerable to a buffer overflow. Impact : An attacker could craft a malicious PNM file and entice a user to run pnmtopng on it, potentially resulting in the execution of arbitrary code with the permissions of the user running pnmtopng. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id20080
    published2005-10-24
    reporterThis script is Copyright (C) 2005-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/20080
    titleGLSA-200510-18 : Netpbm: Buffer overflow in pnmtopng
    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 200510-18.
    #
    # 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(20080);
      script_version("1.16");
      script_cvs_date("Date: 2019/08/02 13:32:42");
    
      script_cve_id("CVE-2005-2978");
      script_bugtraq_id(15128);
      script_xref(name:"GLSA", value:"200510-18");
    
      script_name(english:"GLSA-200510-18 : Netpbm: Buffer overflow in pnmtopng");
      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-200510-18
    (Netpbm: Buffer overflow in pnmtopng)
    
        RedHat reported that pnmtopng is vulnerable to a buffer overflow.
      
    Impact :
    
        An attacker could craft a malicious PNM file and entice a user to run
        pnmtopng on it, potentially resulting in the execution of arbitrary
        code with the permissions of the user running pnmtopng.
      
    Workaround :
    
        There is no known workaround at this time."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://security.gentoo.org/glsa/200510-18"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "All Netpbm users should upgrade to the latest version:
        # emerge --sync
        # emerge --ask --oneshot --verbose media-libs/netpbm"
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"false");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:gentoo:linux:netpbm");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:gentoo:linux");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2005/10/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2005/10/24");
      script_set_attribute(attribute:"vuln_publication_date", value:"2005/09/14");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-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:"media-libs/netpbm", unaffected:make_list("ge 10.29", "rge 10.26.32", "rge 10.26.33", "rge 10.26.42", "rge 10.26.43", "rge 10.26.44", "rge 10.26.48", "rge 10.26.49", "rge 10.26.52", "rge 10.26.53", "rge 10.26.59", "rge 10.26.61"), vulnerable:make_list("lt 10.29"))) 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, "Netpbm");
    }
    
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2005-793.NASL
    descriptionUpdated netpbm packages that fix a security issue are now available. This update has been rated as having moderate security impact by the Red Hat Security Response Team. The netpbm package contains a library of functions that support programs for handling various graphics file formats, including .pbm (portable bitmaps), .pgm (portable graymaps), .pnm (portable anymaps), .ppm (portable pixmaps) and others. A bug was found in the way netpbm converts Portable Anymap (PNM) files into Portable Network Graphics (PNG). The usage of uninitialised variables in the pnmtopng code allows an attacker to change stack contents when converting to PNG files with pnmtopng using the
    last seen2020-06-01
    modified2020-06-02
    plugin id20058
    published2005-10-19
    reporterThis script is Copyright (C) 2005-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/20058
    titleRHEL 4 : netpbm (RHSA-2005:793)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_AE9FB0D7C4DC11DAB2FB000E0C2E438A.NASL
    descriptionUbuntu reports : A buffer overflow was found in the
    last seen2020-06-01
    modified2020-06-02
    plugin id21493
    published2006-05-13
    reporterThis script is Copyright (C) 2006-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/21493
    titleFreeBSD : netpbm -- buffer overflow in pnmtopng (ae9fb0d7-c4dc-11da-b2fb-000e0c2e438a)
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-210-1.NASL
    descriptionA buffer overflow was found in the
    last seen2020-06-01
    modified2020-06-02
    plugin id20628
    published2006-01-15
    reporterUbuntu Security Notice (C) 2005-2019 Canonical, Inc. / NASL script (C) 2006-2016 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/20628
    titleUbuntu 4.10 / 5.04 / 5.10 : netpbm-free vulnerability (USN-210-1)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-878.NASL
    descriptionA buffer overflow has been identified in the pnmtopng component of the netpbm package, a set of graphics conversion tools. This vulnerability could allow an attacker to execute arbitrary code as a local user by providing a specially crafted PNM file. The old stable distribution (woody) it not vulnerable to this problem.
    last seen2020-06-01
    modified2020-06-02
    plugin id22744
    published2006-10-14
    reporterThis script is Copyright (C) 2006-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/22744
    titleDebian DSA-878-1 : netpbm-free - buffer overflow
  • NASL familyMandriva Local Security Checks
    NASL idMANDRAKE_MDKSA-2005-199.NASL
    descriptionPnmtopng in netpbm 10.2X, when using the -trans option, uses uninitialized size and index variables when converting Portable Anymap (PNM) images to Portable Network Graphics (PNG), which might allow attackers to execute arbitrary code by modifying the stack. Netpbm 9.2X is not affected by this vulnerability. The updated packages have been patched to correct this problem.
    last seen2020-06-01
    modified2020-06-02
    plugin id20437
    published2006-01-15
    reporterThis script is Copyright (C) 2006-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/20437
    titleMandrake Linux Security Advisory : netpbm (MDKSA-2005:199)
  • NASL familyCentOS Local Security Checks
    NASL idCENTOS_RHSA-2005-793.NASL
    descriptionUpdated netpbm packages that fix a security issue are now available. This update has been rated as having moderate security impact by the Red Hat Security Response Team. The netpbm package contains a library of functions that support programs for handling various graphics file formats, including .pbm (portable bitmaps), .pgm (portable graymaps), .pnm (portable anymaps), .ppm (portable pixmaps) and others. A bug was found in the way netpbm converts Portable Anymap (PNM) files into Portable Network Graphics (PNG). The usage of uninitialised variables in the pnmtopng code allows an attacker to change stack contents when converting to PNG files with pnmtopng using the
    last seen2020-06-01
    modified2020-06-02
    plugin id21965
    published2006-07-05
    reporterThis script is Copyright (C) 2006-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/21965
    titleCentOS 4 : netpbm (CESA-2005:793)

Oval

accepted2013-04-29T04:02:06.560-04:00
classvulnerability
contributors
  • nameAharon Chernin
    organizationSCAP.com, LLC
  • nameDragos Prisaca
    organizationG2, Inc.
definition_extensions
  • commentThe operating system installed on the system is Red Hat Enterprise Linux 4
    ovaloval:org.mitre.oval:def:11831
  • commentCentOS Linux 4.x
    ovaloval:org.mitre.oval:def:16636
  • commentOracle Linux 4.x
    ovaloval:org.mitre.oval:def:15990
descriptionpnmtopng in netpbm before 10.25, when using the -trans option, uses uninitialized size and index variables when converting Portable Anymap (PNM) images to Portable Network Graphics (PNG), which might allow attackers to execute arbitrary code by modifying the stack.
familyunix
idoval:org.mitre.oval:def:10135
statusaccepted
submitted2010-07-09T03:56:16-04:00
titlepnmtopng in netpbm before 10.25, when using the -trans option, uses uninitialized size and index variables when converting Portable Anymap (PNM) images to Portable Network Graphics (PNG), which might allow attackers to execute arbitrary code by modifying the stack.
version26

Redhat

advisories
rhsa
idRHSA-2005:793
rpms
  • netpbm-0:10.25-2.EL4.2
  • netpbm-debuginfo-0:10.25-2.EL4.2
  • netpbm-devel-0:10.25-2.EL4.2
  • netpbm-progs-0:10.25-2.EL4.2