Vulnerabilities > CVE-2009-5022 - Improper Restriction of Operations within the Bounds of a Memory Buffer vulnerability in Libtiff

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN
libtiff
CWE-119
nessus
exploit available

Summary

Heap-based buffer overflow in tif_ojpeg.c in the OJPEG decoder in LibTIFF before 3.9.5 allows remote attackers to execute arbitrary code via a crafted TIFF file.

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.

Exploit-Db

descriptionIrfanView - .TIF Image Decompression Buffer Overflow Vulnerability. CVE-2009-5022. Dos exploit for windows platform
idEDB-ID:22681
last seen2016-02-02
modified2012-11-13
published2012-11-13
reporterFrancis Provencher
sourcehttps://www.exploit-db.com/download/22681/
titleIrfanView - .TIF Image Decompression Buffer Overflow Vulnerability

Nessus

  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_4_LIBTIFF-DEVEL-110415.NASL
    descriptionSpecially crafted tiff files could cause a heap-based buffer overflow in the thunder- and ojpeg-decoders (CVE-2011-1167, CVE-2009-5022). Directories with a large number of files could cause an integer overflow in the tiffdump tool (CVE-2010-4665)
    last seen2020-06-01
    modified2020-06-02
    plugin id75926
    published2014-06-13
    reporterThis script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/75926
    titleopenSUSE Security Update : libtiff-devel (openSUSE-SU-2011:0405-1)
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from openSUSE Security Update libtiff-devel-4396.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(75926);
      script_version("1.6");
      script_cvs_date("Date: 2019/10/25 13:36:42");
    
      script_cve_id("CVE-2009-5022", "CVE-2010-4665", "CVE-2011-1167");
    
      script_name(english:"openSUSE Security Update : libtiff-devel (openSUSE-SU-2011:0405-1)");
      script_summary(english:"Check for the libtiff-devel-4396 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Specially crafted tiff files could cause a heap-based buffer overflow
    in the thunder- and ojpeg-decoders (CVE-2011-1167, CVE-2009-5022).
    
    Directories with a large number of files could cause an integer
    overflow in the tiffdump tool (CVE-2010-4665)"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=599475"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=682871"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=687441"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.novell.com/show_bug.cgi?id=687442"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.opensuse.org/opensuse-updates/2011-04/msg00078.html"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected libtiff-devel packages."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtiff-devel");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtiff-devel-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtiff3");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtiff3-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtiff3-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtiff3-debuginfo-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:tiff");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:tiff-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:tiff-debugsource");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:11.4");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2011/04/15");
      script_set_attribute(attribute:"plugin_publication_date", value:"2014/06/13");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"SuSE Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/SuSE/release", "Host/SuSE/rpm-list", "Host/cpu");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("global_settings.inc");
    include("rpm.inc");
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/SuSE/release");
    if (isnull(release) || release =~ "^(SLED|SLES)") audit(AUDIT_OS_NOT, "openSUSE");
    if (release !~ "^(SUSE11\.4)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "11.4", release);
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    ourarch = get_kb_item("Host/cpu");
    if (!ourarch) audit(AUDIT_UNKNOWN_ARCH);
    if (ourarch !~ "^(i586|i686|x86_64)$") audit(AUDIT_ARCH_NOT, "i586 / i686 / x86_64", ourarch);
    
    flag = 0;
    
    if ( rpm_check(release:"SUSE11.4", reference:"libtiff-devel-3.9.4-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE11.4", reference:"libtiff3-3.9.4-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE11.4", reference:"libtiff3-debuginfo-3.9.4-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE11.4", reference:"tiff-3.9.4-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE11.4", reference:"tiff-debuginfo-3.9.4-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE11.4", reference:"tiff-debugsource-3.9.4-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE11.4", cpu:"x86_64", reference:"libtiff-devel-32bit-3.9.4-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE11.4", cpu:"x86_64", reference:"libtiff3-32bit-3.9.4-3.7.1") ) flag++;
    if ( rpm_check(release:"SUSE11.4", cpu:"x86_64", reference:"libtiff3-debuginfo-32bit-3.9.4-3.7.1") ) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());
      else security_warning(0);
      exit(0);
    }
    else
    {
      tested = pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "libtiff-devel / libtiff-devel-32bit / libtiff3 / libtiff3-32bit / etc");
    }
    
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2011-5304.NASL
    descriptionUpdate to libtiff 3.9.5, incorporating all our previous patches plus other fixes, notably the fix for CVE-2009-5022 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora 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 id53498
    published2011-04-20
    reporterThis script is Copyright (C) 2011-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/53498
    titleFedora 14 : libtiff-3.9.5-1.fc14 (2011-5304)
  • NASL familyWindows
    NASL idIRFANVIEW_435.NASL
    descriptionThe remote Windows host contains a version of IrfanView prior to version 4.35. It is, therefore, reportedly affected by the following vulnerabilities : - An error exists related to
    last seen2020-06-01
    modified2020-06-02
    plugin id63059
    published2012-11-27
    reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/63059
    titleIrfanView < 4.35 Multiple Heap-Based Buffer Overflows
  • NASL familyScientific Linux Local Security Checks
    NASL idSL_20110418_LIBTIFF_ON_SL6_X.NASL
    descriptionA heap-based buffer overflow flaw was found in the way libtiff processed certain TIFF image files that were compressed with the JPEG compression algorithm. An attacker could use this flaw to create a specially crafted TIFF file that, when opened, would cause an application linked against libtiff to crash or, possibly, execute arbitrary code. (CVE-2009-5022) All running applications linked against libtiff must be restarted for this update to take effect.
    last seen2020-06-01
    modified2020-06-02
    plugin id61020
    published2012-08-01
    reporterThis script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/61020
    titleScientific Linux Security Update : libtiff on SL6.x i386/x86_64
  • NASL familyRed Hat Local Security Checks
    NASL idREDHAT-RHSA-2011-0452.NASL
    descriptionUpdated libtiff packages that fix one security issue are now available for Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this update as having important security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. The libtiff packages contain a library of functions for manipulating Tagged Image File Format (TIFF) files. A heap-based buffer overflow flaw was found in the way libtiff processed certain TIFF image files that were compressed with the JPEG compression algorithm. An attacker could use this flaw to create a specially crafted TIFF file that, when opened, would cause an application linked against libtiff to crash or, possibly, execute arbitrary code. (CVE-2009-5022) All libtiff users should upgrade to these updated packages, which contain a backported patch to resolve this issue. All running applications linked against libtiff must be restarted for this update to take effect.
    last seen2020-06-01
    modified2020-06-02
    plugin id53483
    published2011-04-19
    reporterThis script is Copyright (C) 2011-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/53483
    titleRHEL 6 : libtiff (RHSA-2011:0452)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2011-5336.NASL
    descriptionUpdate to libtiff 3.9.5, incorporating all our previous patches plus other fixes, notably the fix for CVE-2009-5022 Fix incorrect fix for CVE-2011-0192 Add fix for CVE-2011-1167 Fix buffer overrun in fax decoding (CVE-2011-0192) as well as a non-security-critical crash in gif2tiff. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora 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 id53560
    published2011-04-27
    reporterThis script is Copyright (C) 2011-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/53560
    titleFedora 15 : libtiff-3.9.5-1.fc15 (2011-5336)
  • NASL familySuSE Local Security Checks
    NASL idSUSE_11_3_LIBTIFF-DEVEL-110415.NASL
    descriptionSpecially crafted tiff files could cause a heap-based buffer overflow in the thunder- and ojpeg-decoders (CVE-2011-1167, CVE-2009-5022). Directories with a large number of files could cause an integer overflow in the tiffdump tool (CVE-2010-4665)
    last seen2020-06-01
    modified2020-06-02
    plugin id75621
    published2014-06-13
    reporterThis script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/75621
    titleopenSUSE Security Update : libtiff-devel (openSUSE-SU-2011:0405-1)
  • NASL familyMandriva Local Security Checks
    NASL idMANDRIVA_MDVSA-2011-078.NASL
    descriptionA vulnerability has been found and corrected in libtiff : The libtiff OJPEG decoder contains a heap buffer overflow when decoding certain malformed data (CVE-2009-5022). The updated packages have been patched to correct this issue.
    last seen2020-06-01
    modified2020-06-02
    plugin id53542
    published2011-04-25
    reporterThis script is Copyright (C) 2011-2019 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/53542
    titleMandriva Linux Security Advisory : libtiff (MDVSA-2011:078)
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-1120-1.NASL
    descriptionIt was discovered that the TIFF library incorrectly handled certain JPEG data. If a user or automated system were tricked into opening a specially crafted TIFF image, a remote attacker could execute arbitrary code with user privileges, or crash the application, leading to a denial of service. 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 id55078
    published2011-06-13
    reporterUbuntu Security Notice (C) 2011-2019 Canonical, Inc. / NASL script (C) 2011-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/55078
    titleUbuntu 10.04 LTS / 10.10 : tiff vulnerability (USN-1120-1)
  • NASL familyOracle Linux Local Security Checks
    NASL idORACLELINUX_ELSA-2011-0452.NASL
    descriptionFrom Red Hat Security Advisory 2011:0452 : Updated libtiff packages that fix one security issue are now available for Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this update as having important security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. The libtiff packages contain a library of functions for manipulating Tagged Image File Format (TIFF) files. A heap-based buffer overflow flaw was found in the way libtiff processed certain TIFF image files that were compressed with the JPEG compression algorithm. An attacker could use this flaw to create a specially crafted TIFF file that, when opened, would cause an application linked against libtiff to crash or, possibly, execute arbitrary code. (CVE-2009-5022) All libtiff users should upgrade to these updated packages, which contain a backported patch to resolve this issue. All running applications linked against libtiff must be restarted for this update to take effect.
    last seen2020-06-01
    modified2020-06-02
    plugin id68257
    published2013-07-12
    reporterThis script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/68257
    titleOracle Linux 6 : libtiff (ELSA-2011-0452)
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-2256.NASL
    descriptionTavis Ormandy discovered that the Tag Image File Format (TIFF) library is vulnerable to a buffer overflow triggered by a crafted OJPEG file which allows for a crash and potentially execution of arbitrary code. The oldstable distribution (lenny) is not affected by this problem.
    last seen2020-03-17
    modified2011-06-10
    plugin id55044
    published2011-06-10
    reporterThis script is Copyright (C) 2011-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/55044
    titleDebian DSA-2256-1 : tiff - buffer overflow
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201209-02.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201209-02 (libTIFF: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in libTIFF. Please review the CVE identifiers referenced below for details. Impact : A remote attacker could entice a user to open a specially crafted TIFF file with an application making use of libTIFF, possibly resulting in execution of arbitrary code with the privileges of the user running the application or a Denial of Service condition. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id62235
    published2012-09-24
    reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/62235
    titleGLSA-201209-02 : libTIFF: Multiple vulnerabilities

Redhat

advisories
bugzilla
id695885
titleCVE-2009-5022 libtiff ojpeg buffer overflow
oval
OR
  • commentRed Hat Enterprise Linux must be installed
    ovaloval:com.redhat.rhba:tst:20070304026
  • AND
    • commentRed Hat Enterprise Linux 6 is installed
      ovaloval:com.redhat.rhba:tst:20111656003
    • OR
      • AND
        • commentlibtiff-devel is earlier than 0:3.9.4-1.el6_0.3
          ovaloval:com.redhat.rhsa:tst:20110452001
        • commentlibtiff-devel is signed with Red Hat redhatrelease2 key
          ovaloval:com.redhat.rhsa:tst:20110318014
      • AND
        • commentlibtiff-static is earlier than 0:3.9.4-1.el6_0.3
          ovaloval:com.redhat.rhsa:tst:20110452003
        • commentlibtiff-static is signed with Red Hat redhatrelease2 key
          ovaloval:com.redhat.rhsa:tst:20110318012
      • AND
        • commentlibtiff is earlier than 0:3.9.4-1.el6_0.3
          ovaloval:com.redhat.rhsa:tst:20110452005
        • commentlibtiff is signed with Red Hat redhatrelease2 key
          ovaloval:com.redhat.rhsa:tst:20110318016
rhsa
idRHSA-2011:0452
released2011-04-18
severityImportant
titleRHSA-2011:0452: libtiff security update (Important)
rpms
  • libtiff-0:3.9.4-1.el6_0.3
  • libtiff-debuginfo-0:3.9.4-1.el6_0.3
  • libtiff-devel-0:3.9.4-1.el6_0.3
  • libtiff-static-0:3.9.4-1.el6_0.3