Vulnerabilities > CVE-2017-9404 - Missing Release of Resource after Effective Lifetime vulnerability in multiple products

047910
CVSS 6.5 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
HIGH
network
low complexity
libtiff
debian
canonical
CWE-772
nessus

Summary

In LibTIFF 4.0.7, a memory leak vulnerability was found in the function OJPEGReadHeaderInfoSecTablesQTable in tif_ojpeg.c, which allows attackers to cause a denial of service via a crafted file.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • HTTP DoS
    An attacker performs flooding at the HTTP level to bring down only a particular web application rather than anything listening on a TCP/IP connection. This denial of service attack requires substantially fewer packets to be sent which makes DoS harder to detect. This is an equivalent of SYN flood in HTTP. The idea is to keep the HTTP session alive indefinitely and then repeat that hundreds of times. This attack targets resource depletion weaknesses in web server software. The web server will wait to attacker's responses on the initiated HTTP sessions while the connection threads are being exhausted.

Nessus

  • NASL familySuSE Local Security Checks
    NASL idOPENSUSE-2017-1118.NASL
    descriptionThis update for tiff to version 4.0.8 fixes a several bugs and security issues : These security issues were fixed : - CVE-2017-7595: The JPEGSetupEncode function allowed remote attackers to cause a denial of service (divide-by-zero error and application crash) via a crafted image (bsc#1033127). - CVE-2016-10371: The TIFFWriteDirectoryTagCheckedRational function allowed remote attackers to cause a denial of service (assertion failure and application exit) via a crafted TIFF file (bsc#1038438). - CVE-2017-7598: Error in tif_dirread.c allowed remote attackers to cause a denial of service (divide-by-zero error and application crash) via a crafted image (bsc#1033118). - CVE-2017-7596: Undefined behavior because of floats outside their expected value range, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033126). - CVE-2017-7597: Undefined behavior because of floats outside their expected value range, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033120). - CVE-2017-7599: Undefined behavior because of shorts outside their expected value range, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033113). - CVE-2017-7600: Undefined behavior because of chars outside their expected value range, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033112). - CVE-2017-7601: Because of a shift exponent too large for 64-bit type long undefined behavior was caused, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033111). - CVE-2017-7602: Prevent signed integer overflow, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033109). - CVE-2017-7592: The putagreytile function had a left-shift undefined behavior issue, which might allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033131). - CVE-2017-7593: Ensure that tif_rawdata is properly initialized, to prevent remote attackers to obtain sensitive information from process memory via a crafted image (bsc#1033129). - CVE-2017-7594: The OJPEGReadHeaderInfoSecTablesDcTable function allowed remote attackers to cause a denial of service (memory leak) via a crafted image (bsc#1033128). - CVE-2017-9403: Prevent memory leak in function TIFFReadDirEntryLong8Array, which allowed attackers to cause a denial of service via a crafted file (bsc#1042805). - CVE-2017-9404: Fixed memory leak vulnerability in function OJPEGReadHeaderInfoSecTablesQTable, which allowed attackers to cause a denial of service via a crafted file (bsc#1042804). These various other issues were fixed : - Fix uint32 overflow in TIFFReadEncodedStrip() that caused an integer division by zero. Reported by Agostino Sarubbo. - fix heap-based buffer overflow on generation of PixarLog / LUV compressed files, with ColorMap, TransferFunction attached and nasty plays with bitspersample. The fix for LUV has not been tested, but suffers from the same kind of issue of PixarLog. - modify ChopUpSingleUncompressedStrip() to instanciate compute ntrips as TIFFhowmany_32(td->td_imagelength, rowsperstrip), instead of a logic based on the total size of data. Which is faulty is the total size of data is not sufficient to fill the whole image, and thus results in reading outside of the StripByCounts/StripOffsets arrays when using TIFFReadScanline() - make OJPEGDecode() early exit in case of failure in OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. - fix misleading indentation as warned by GCC. - revert change done on 2016-01-09 that made Param member of TIFFFaxTabEnt structure a uint16 to reduce size of the binary. It happens that the Hylafax software uses the tables that follow this typedef (TIFFFaxMainTable, TIFFFaxWhiteTable, TIFFFaxBlackTable), although they are not in a public libtiff header. - add TIFFReadRGBAStripExt() and TIFFReadRGBATileExt() variants of the functions without ext, with an extra argument to control the stop_on_error behaviour. - fix potential memory leaks in error code path of TIFFRGBAImageBegin(). - increase libjpeg max memory usable to 10 MB instead of libjpeg 1MB default. This helps when creating files with
    last seen2020-06-05
    modified2017-10-04
    plugin id103658
    published2017-10-04
    reporterThis script is Copyright (C) 2017-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/103658
    titleopenSUSE Security Update : tiff (openSUSE-2017-1118)
    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 openSUSE-2017-1118.
    #
    # The text description of this plugin is (C) SUSE LLC.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(103658);
      script_version("3.3");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04");
    
      script_cve_id("CVE-2016-10371", "CVE-2017-7592", "CVE-2017-7593", "CVE-2017-7594", "CVE-2017-7595", "CVE-2017-7596", "CVE-2017-7597", "CVE-2017-7598", "CVE-2017-7599", "CVE-2017-7600", "CVE-2017-7601", "CVE-2017-7602", "CVE-2017-9403", "CVE-2017-9404");
    
      script_name(english:"openSUSE Security Update : tiff (openSUSE-2017-1118)");
      script_summary(english:"Check for the openSUSE-2017-1118 patch");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote openSUSE host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "This update for tiff to version 4.0.8 fixes a several bugs and
    security issues :
    
    These security issues were fixed :
    
      - CVE-2017-7595: The JPEGSetupEncode function allowed
        remote attackers to cause a denial of service
        (divide-by-zero error and application crash) via a
        crafted image (bsc#1033127).
    
      - CVE-2016-10371: The TIFFWriteDirectoryTagCheckedRational
        function allowed remote attackers to cause a denial of
        service (assertion failure and application exit) via a
        crafted TIFF file (bsc#1038438).
    
      - CVE-2017-7598: Error in tif_dirread.c allowed remote
        attackers to cause a denial of service (divide-by-zero
        error and application crash) via a crafted image
        (bsc#1033118).
    
      - CVE-2017-7596: Undefined behavior because of floats
        outside their expected value range, which allowed remote
        attackers to cause a denial of service (application
        crash) or possibly have unspecified other impact via a
        crafted image (bsc#1033126).
    
      - CVE-2017-7597: Undefined behavior because of floats
        outside their expected value range, which allowed remote
        attackers to cause a denial of service (application
        crash) or possibly have unspecified other impact via a
        crafted image (bsc#1033120).
    
      - CVE-2017-7599: Undefined behavior because of shorts
        outside their expected value range, which allowed remote
        attackers to cause a denial of service (application
        crash) or possibly have unspecified other impact via a
        crafted image (bsc#1033113).
    
      - CVE-2017-7600: Undefined behavior because of chars
        outside their expected value range, which allowed remote
        attackers to cause a denial of service (application
        crash) or possibly have unspecified other impact via a
        crafted image (bsc#1033112).
    
      - CVE-2017-7601: Because of a shift exponent too large for
        64-bit type long undefined behavior was caused, which
        allowed remote attackers to cause a denial of service
        (application crash) or possibly have unspecified other
        impact via a crafted image (bsc#1033111).
    
      - CVE-2017-7602: Prevent signed integer overflow, which
        allowed remote attackers to cause a denial of service
        (application crash) or possibly have unspecified other
        impact via a crafted image (bsc#1033109).
    
      - CVE-2017-7592: The putagreytile function had a
        left-shift undefined behavior issue, which might allowed
        remote attackers to cause a denial of service
        (application crash) or possibly have unspecified other
        impact via a crafted image (bsc#1033131).
    
      - CVE-2017-7593: Ensure that tif_rawdata is properly
        initialized, to prevent remote attackers to obtain
        sensitive information from process memory via a crafted
        image (bsc#1033129).
    
      - CVE-2017-7594: The OJPEGReadHeaderInfoSecTablesDcTable
        function allowed remote attackers to cause a denial of
        service (memory leak) via a crafted image (bsc#1033128).
    
      - CVE-2017-9403: Prevent memory leak in function
        TIFFReadDirEntryLong8Array, which allowed attackers to
        cause a denial of service via a crafted file
        (bsc#1042805).
    
      - CVE-2017-9404: Fixed memory leak vulnerability in
        function OJPEGReadHeaderInfoSecTablesQTable, which
        allowed attackers to cause a denial of service via a
        crafted file (bsc#1042804).
    
    These various other issues were fixed :
    
      - Fix uint32 overflow in TIFFReadEncodedStrip() that
        caused an integer division by zero. Reported by Agostino
        Sarubbo.
    
      - fix heap-based buffer overflow on generation of PixarLog
        / LUV compressed files, with ColorMap, TransferFunction
        attached and nasty plays with bitspersample. The fix for
        LUV has not been tested, but suffers from the same kind
        of issue of PixarLog.
    
      - modify ChopUpSingleUncompressedStrip() to instanciate
        compute ntrips as TIFFhowmany_32(td->td_imagelength,
        rowsperstrip), instead of a logic based on the total
        size of data. Which is faulty is the total size of data
        is not sufficient to fill the whole image, and thus
        results in reading outside of the
        StripByCounts/StripOffsets arrays when using
        TIFFReadScanline()
    
      - make OJPEGDecode() early exit in case of failure in
        OJPEGPreDecode(). This will avoid a divide by zero, and
        potential other issues.
    
      - fix misleading indentation as warned by GCC.
    
      - revert change done on 2016-01-09 that made Param member
        of TIFFFaxTabEnt structure a uint16 to reduce size of
        the binary. It happens that the Hylafax software uses
        the tables that follow this typedef (TIFFFaxMainTable,
        TIFFFaxWhiteTable, TIFFFaxBlackTable), although they are
        not in a public libtiff header.
    
      - add TIFFReadRGBAStripExt() and TIFFReadRGBATileExt()
        variants of the functions without ext, with an extra
        argument to control the stop_on_error behaviour.
    
      - fix potential memory leaks in error code path of
        TIFFRGBAImageBegin().
    
      - increase libjpeg max memory usable to 10 MB instead of
        libjpeg 1MB default. This helps when creating files with
        'big' tile, without using libjpeg temporary files.
    
      - add _TIFFcalloc()
    
      - return 0 in Encode functions instead of -1 when
        TIFFFlushData1() fails.
    
      - only run JPEGFixupTagsSubsampling() if the
        YCbCrSubsampling tag is not explicitly present. This
        helps a bit to reduce the I/O amount when the tag is
        present (especially on cloud hosted files).
    
      - in LZWPostEncode(), increase, if necessary, the code
        bit-width after flushing the remaining code and before
        emitting the EOI code.
    
      - fix memory leak in error code path of
        PixarLogSetupDecode().
    
      - fix potential memory leak in
        OJPEGReadHeaderInfoSecTablesQTable,
        OJPEGReadHeaderInfoSecTablesDcTable and
        OJPEGReadHeaderInfoSecTablesAcTable
    
      - avoid crash in Fax3Close() on empty file.
    
      - TIFFFillStrip(): add limitation to the number of bytes
        read in case td_stripbytecount[strip] is bigger than
        reasonable, so as to avoid excessive memory allocation.
    
      - fix memory leak when the underlying codec (ZIP,
        PixarLog) succeeds its setupdecode() method, but
        PredictorSetup fails.
    
      - TIFFFillStrip() and TIFFFillTile(): avoid excessive
        memory allocation in case of shorten files. Only
        effective on 64 bit builds and non-mapped cases.
    
      - TIFFFillStripPartial() / TIFFSeek(), avoid potential
        integer overflows with read_ahead in
        CHUNKY_STRIP_READ_SUPPORT mode.
    
      - avoid excessive memory allocation in case of shorten
        files. Only effective on 64 bit builds.
    
      - update tif_rawcc in CHUNKY_STRIP_READ_SUPPORT mode with
        tif_rawdataloaded when calling TIFFStartStrip() or
        TIFFFillStripPartial(). 
    
      - avoid potential int32 overflow in TIFFYCbCrToRGBInit()
        Fixes
    
      - avoid potential int32 overflows in multiply_ms() and
        add_ms().
    
      - fix out-of-buffer read in PackBitsDecode() Fixes
    
      - LogL16InitState(): avoid excessive memory allocation
        when RowsPerStrip tag is missing.
    
      - update dec_bitsleft at beginning of LZWDecode(), and
        update tif_rawcc at end of LZWDecode(). This is needed
        to properly work with the latest chnges in tif_read.c in
        CHUNKY_STRIP_READ_SUPPORT mode.
    
      - PixarLogDecode(): resync tif_rawcp with next_in and
        tif_rawcc with avail_in at beginning and end of
        function, similarly to what is done in LZWDecode().
        Likely needed so that it works properly with latest
        chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode.
    
      - initYCbCrConversion(): add basic validation of luma and
        refBlackWhite coefficients (just check they are not NaN
        for now), to avoid potential float to int overflows.
    
      - _TIFFVSetField(): fix outside range cast of double to
        float.
    
      - initYCbCrConversion(): check luma[1] is not zero to
        avoid division by zero
    
      - _TIFFVSetField(): fix outside range cast of double to
        float.
    
      - initYCbCrConversion(): check luma[1] is not zero to
        avoid division by zero.
    
      - initYCbCrConversion(): stricter validation for
        refBlackWhite coefficients values.
    
      - avoid uint32 underflow in cpDecodedStrips that can cause
        various issues, such as buffer overflows in the library.
    
      - fix readContigStripsIntoBuffer() in -i (ignore) mode so
        that the output buffer is correctly incremented to avoid
        write outside bounds.
    
      - add 3 extra bytes at end of strip buffer in
        readSeparateStripsIntoBuffer() to avoid read outside of
        heap allocated buffer.
    
      - fix integer division by zero when BitsPerSample is
        missing.
    
      - fix NULL pointer dereference in -r mode when the image
        has no StripByteCount tag.
    
      - avoid potential division by zero is BitsPerSamples tag
        is missing.
    
      - when TIFFGetField(, TIFFTAG_NUMBEROFINKS, ) is called,
        limit the return number of inks to SamplesPerPixel, so
        that code that parses ink names doesn't go past the end
        of the buffer.
    
      - avoid potential division by zero is BitsPerSamples tag
        is missing.
    
      - fix uint32 underflow/overflow that can cause heap-based
        buffer overflow.
    
      - replace assert( (bps % 8) == 0 ) by a non assert check.
    
      - fix 2 heap-based buffer overflows (in PSDataBW and
        PSDataColorContig).
    
      - prevent heap-based buffer overflow in -j mode on a
        paletted image.
    
      - fix wrong usage of memcpy() that can trigger unspecified
        behaviour.
    
      - avoid potential invalid memory read in t2p_writeproc.
    
      - avoid potential heap-based overflow in
        t2p_readwrite_pdf_image_tile().
    
      - remove extraneous TIFFClose() in error code path, that
        caused double free.
    
      - error out cleanly in cpContig2SeparateByRow and
        cpSeparate2ContigByRow if BitsPerSample != 8 to avoid
        heap based overflow.
    
      - avoid integer division by zero.
    
      - call TIFFClose() in error code paths.
    
      - emit appropriate message if the input file is empty.
    
      - close TIFF handle in error code path.
    
    This update was imported from the SUSE:SLE-12:Update update project."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033109"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033111"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033112"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033113"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033118"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033120"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033126"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033127"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033128"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033129"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1033131"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1038438"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1042804"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.opensuse.org/show_bug.cgi?id=1042805"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected tiff packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
    
      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:libtiff5");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtiff5-32bit");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtiff5-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:opensuse:libtiff5-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:42.2");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:opensuse:42.3");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2017/10/03");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/10/04");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-2020 Tenable Network Security, Inc.");
      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 !~ "^(SUSE42\.2|SUSE42\.3)$") audit(AUDIT_OS_RELEASE_NOT, "openSUSE", "42.2 / 42.3", 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:"SUSE42.2", reference:"libtiff-devel-4.0.8-17.6.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"libtiff5-4.0.8-17.6.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"libtiff5-debuginfo-4.0.8-17.6.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"tiff-4.0.8-17.6.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"tiff-debuginfo-4.0.8-17.6.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", reference:"tiff-debugsource-4.0.8-17.6.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", cpu:"x86_64", reference:"libtiff-devel-32bit-4.0.8-17.6.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", cpu:"x86_64", reference:"libtiff5-32bit-4.0.8-17.6.1") ) flag++;
    if ( rpm_check(release:"SUSE42.2", cpu:"x86_64", reference:"libtiff5-debuginfo-32bit-4.0.8-17.6.1") ) flag++;
    if ( rpm_check(release:"SUSE42.3", reference:"libtiff-devel-4.0.8-21.1") ) flag++;
    if ( rpm_check(release:"SUSE42.3", reference:"libtiff5-4.0.8-21.1") ) flag++;
    if ( rpm_check(release:"SUSE42.3", reference:"libtiff5-debuginfo-4.0.8-21.1") ) flag++;
    if ( rpm_check(release:"SUSE42.3", reference:"tiff-4.0.8-21.1") ) flag++;
    if ( rpm_check(release:"SUSE42.3", reference:"tiff-debuginfo-4.0.8-21.1") ) flag++;
    if ( rpm_check(release:"SUSE42.3", reference:"tiff-debugsource-4.0.8-21.1") ) flag++;
    if ( rpm_check(release:"SUSE42.3", cpu:"x86_64", reference:"libtiff-devel-32bit-4.0.8-21.1") ) flag++;
    if ( rpm_check(release:"SUSE42.3", cpu:"x86_64", reference:"libtiff5-32bit-4.0.8-21.1") ) flag++;
    if ( rpm_check(release:"SUSE42.3", cpu:"x86_64", reference:"libtiff5-debuginfo-32bit-4.0.8-21.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-32bit / libtiff-devel / libtiff5-32bit / libtiff5 / etc");
    }
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-3903.NASL
    descriptionMultiple vulnerabilities have been discovered in the libtiff library and the included tools, which may result in denial of service or the execution of arbitrary code.
    last seen2020-06-01
    modified2020-06-02
    plugin id101241
    published2017-07-06
    reporterThis script is Copyright (C) 2017-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/101241
    titleDebian DSA-3903-1 : tiff - security update
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-3903. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(101241);
      script_version("3.7");
      script_cvs_date("Date: 2018/11/10 11:49:38");
    
      script_cve_id("CVE-2016-10095", "CVE-2017-10688", "CVE-2017-9147", "CVE-2017-9403", "CVE-2017-9404", "CVE-2017-9936");
      script_xref(name:"DSA", value:"3903");
    
      script_name(english:"Debian DSA-3903-1 : tiff - security update");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "Multiple vulnerabilities have been discovered in the libtiff library
    and the included tools, which may result in denial of service or the
    execution of arbitrary code."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/jessie/tiff"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/stretch/tiff"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2017/dsa-3903"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the tiff packages.
    
    For the oldstable distribution (jessie), these problems have been
    fixed in version 4.0.3-12.3+deb8u4.
    
    For the stable distribution (stretch), these problems have been fixed
    in version 4.0.8-2+deb9u1."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/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:debian:debian_linux:tiff");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:8.0");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:9.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2017/07/05");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/07/06");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"8.0", prefix:"libtiff-doc", reference:"4.0.3-12.3+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"libtiff-opengl", reference:"4.0.3-12.3+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"libtiff-tools", reference:"4.0.3-12.3+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"libtiff5", reference:"4.0.3-12.3+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"libtiff5-dev", reference:"4.0.3-12.3+deb8u4")) flag++;
    if (deb_check(release:"8.0", prefix:"libtiffxx5", reference:"4.0.3-12.3+deb8u4")) flag++;
    if (deb_check(release:"9.0", prefix:"libtiff-doc", reference:"4.0.8-2+deb9u1")) flag++;
    if (deb_check(release:"9.0", prefix:"libtiff-opengl", reference:"4.0.8-2+deb9u1")) flag++;
    if (deb_check(release:"9.0", prefix:"libtiff-tools", reference:"4.0.8-2+deb9u1")) flag++;
    if (deb_check(release:"9.0", prefix:"libtiff5", reference:"4.0.8-2+deb9u1")) flag++;
    if (deb_check(release:"9.0", prefix:"libtiff5-dev", reference:"4.0.8-2+deb9u1")) flag++;
    if (deb_check(release:"9.0", prefix:"libtiffxx5", reference:"4.0.8-2+deb9u1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyUbuntu Local Security Checks
    NASL idUBUNTU_USN-3602-1.NASL
    descriptionIt was discovered that LibTIFF incorrectly handled certain malformed images. If a user or automated system were tricked into opening a specially crafted image, a remote attacker could crash the application, leading to a denial of service, or possibly execute arbitrary code with user privileges. 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 id108513
    published2018-03-21
    reporterUbuntu Security Notice (C) 2018-2019 Canonical, Inc. / NASL script (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/108513
    titleUbuntu 14.04 LTS / 16.04 LTS : tiff vulnerabilities (USN-3602-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Ubuntu Security Notice USN-3602-1. The text 
    # itself is copyright (C) Canonical, Inc. See 
    # <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered 
    # trademark of Canonical, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(108513);
      script_version("1.4");
      script_cvs_date("Date: 2019/09/18 12:31:48");
    
      script_cve_id("CVE-2016-10266", "CVE-2016-10267", "CVE-2016-10268", "CVE-2016-10269", "CVE-2016-10371", "CVE-2017-10688", "CVE-2017-11335", "CVE-2017-12944", "CVE-2017-13726", "CVE-2017-13727", "CVE-2017-18013", "CVE-2017-7592", "CVE-2017-7593", "CVE-2017-7594", "CVE-2017-7595", "CVE-2017-7596", "CVE-2017-7597", "CVE-2017-7598", "CVE-2017-7599", "CVE-2017-7600", "CVE-2017-7601", "CVE-2017-7602", "CVE-2017-9403", "CVE-2017-9404", "CVE-2017-9815", "CVE-2017-9936", "CVE-2018-5784");
      script_xref(name:"USN", value:"3602-1");
    
      script_name(english:"Ubuntu 14.04 LTS / 16.04 LTS : tiff vulnerabilities (USN-3602-1)");
      script_summary(english:"Checks dpkg output for updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:
    "The remote Ubuntu host is missing one or more security-related
    patches."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "It was discovered that LibTIFF incorrectly handled certain malformed
    images. If a user or automated system were tricked into opening a
    specially crafted image, a remote attacker could crash the
    application, leading to a denial of service, or possibly execute
    arbitrary code with user privileges.
    
    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."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://usn.ubuntu.com/3602-1/"
      );
      script_set_attribute(
        attribute:"solution", 
        value:"Update the affected libtiff-tools and / or libtiff5 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_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/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:canonical:ubuntu_linux:libtiff-tools");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:canonical:ubuntu_linux:libtiff5");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:14.04");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:canonical:ubuntu_linux:16.04");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2017/03/24");
      script_set_attribute(attribute:"patch_publication_date", value:"2018/03/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2018/03/21");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"Ubuntu Security Notice (C) 2018-2019 Canonical, Inc. / NASL script (C) 2018-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Ubuntu Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/cpu", "Host/Ubuntu", "Host/Ubuntu/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("ubuntu.inc");
    include("misc_func.inc");
    
    if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    release = get_kb_item("Host/Ubuntu/release");
    if ( isnull(release) ) audit(AUDIT_OS_NOT, "Ubuntu");
    release = chomp(release);
    if (! preg(pattern:"^(14\.04|16\.04)$", string:release)) audit(AUDIT_OS_NOT, "Ubuntu 14.04 / 16.04", "Ubuntu " + release);
    if ( ! get_kb_item("Host/Debian/dpkg-l") ) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Ubuntu", cpu);
    
    flag = 0;
    
    if (ubuntu_check(osver:"14.04", pkgname:"libtiff-tools", pkgver:"4.0.3-7ubuntu0.8")) flag++;
    if (ubuntu_check(osver:"14.04", pkgname:"libtiff5", pkgver:"4.0.3-7ubuntu0.8")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"libtiff-tools", pkgver:"4.0.6-1ubuntu0.3")) flag++;
    if (ubuntu_check(osver:"16.04", pkgname:"libtiff5", pkgver:"4.0.6-1ubuntu0.3")) flag++;
    
    if (flag)
    {
      security_report_v4(
        port       : 0,
        severity   : SECURITY_WARNING,
        extra      : ubuntu_report_get()
      );
      exit(0);
    }
    else
    {
      tested = ubuntu_pkg_tests_get();
      if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
      else audit(AUDIT_PACKAGE_NOT_INSTALLED, "libtiff-tools / libtiff5");
    }
    
  • NASL familySuSE Local Security Checks
    NASL idSUSE_SU-2017-2569-1.NASL
    descriptionThis update for tiff to version 4.0.8 fixes a several bugs and security issues: These security issues were fixed : - CVE-2017-7595: The JPEGSetupEncode function allowed remote attackers to cause a denial of service (divide-by-zero error and application crash) via a crafted image (bsc#1033127). - CVE-2016-10371: The TIFFWriteDirectoryTagCheckedRational function allowed remote attackers to cause a denial of service (assertion failure and application exit) via a crafted TIFF file (bsc#1038438). - CVE-2017-7598: Error in tif_dirread.c allowed remote attackers to cause a denial of service (divide-by-zero error and application crash) via a crafted image (bsc#1033118). - CVE-2017-7596: Undefined behavior because of floats outside their expected value range, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033126). - CVE-2017-7597: Undefined behavior because of floats outside their expected value range, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033120). - CVE-2017-7599: Undefined behavior because of shorts outside their expected value range, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033113). - CVE-2017-7600: Undefined behavior because of chars outside their expected value range, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033112). - CVE-2017-7601: Because of a shift exponent too large for 64-bit type long undefined behavior was caused, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033111). - CVE-2017-7602: Prevent signed integer overflow, which allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033109). - CVE-2017-7592: The putagreytile function had a left-shift undefined behavior issue, which might allowed remote attackers to cause a denial of service (application crash) or possibly have unspecified other impact via a crafted image (bsc#1033131). - CVE-2017-7593: Ensure that tif_rawdata is properly initialized, to prevent remote attackers to obtain sensitive information from process memory via a crafted image (bsc#1033129). - CVE-2017-7594: The OJPEGReadHeaderInfoSecTablesDcTable function allowed remote attackers to cause a denial of service (memory leak) via a crafted image (bsc#1033128). - CVE-2017-9403: Prevent memory leak in function TIFFReadDirEntryLong8Array, which allowed attackers to cause a denial of service via a crafted file (bsc#1042805). - CVE-2017-9404: Fixed memory leak vulnerability in function OJPEGReadHeaderInfoSecTablesQTable, which allowed attackers to cause a denial of service via a crafted file (bsc#1042804). These various other issues were fixed : - Fix uint32 overflow in TIFFReadEncodedStrip() that caused an integer division by zero. Reported by Agostino Sarubbo. - fix heap-based buffer overflow on generation of PixarLog / LUV compressed files, with ColorMap, TransferFunction attached and nasty plays with bitspersample. The fix for LUV has not been tested, but suffers from the same kind of issue of PixarLog. - modify ChopUpSingleUncompressedStrip() to instanciate compute ntrips as TIFFhowmany_32(td->td_imagelength, rowsperstrip), instead of a logic based on the total size of data. Which is faulty is the total size of data is not sufficient to fill the whole image, and thus results in reading outside of the StripByCounts/StripOffsets arrays when using TIFFReadScanline() - make OJPEGDecode() early exit in case of failure in OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. - fix misleading indentation as warned by GCC. - revert change done on 2016-01-09 that made Param member of TIFFFaxTabEnt structure a uint16 to reduce size of the binary. It happens that the Hylafax software uses the tables that follow this typedef (TIFFFaxMainTable, TIFFFaxWhiteTable, TIFFFaxBlackTable), although they are not in a public libtiff header. - add TIFFReadRGBAStripExt() and TIFFReadRGBATileExt() variants of the functions without ext, with an extra argument to control the stop_on_error behaviour. - fix potential memory leaks in error code path of TIFFRGBAImageBegin(). - increase libjpeg max memory usable to 10 MB instead of libjpeg 1MB default. This helps when creating files with
    last seen2020-06-01
    modified2020-06-02
    plugin id103503
    published2017-09-27
    reporterThis script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/103503
    titleSUSE SLED12 / SLES12 Security Update : tiff (SUSE-SU-2017:2569-1)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from SUSE update advisory SUSE-SU-2017:2569-1.
    # The text itself is copyright (C) SUSE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(103503);
      script_version("3.6");
      script_cvs_date("Date: 2019/09/11 11:22:16");
    
      script_cve_id("CVE-2016-10371", "CVE-2017-7592", "CVE-2017-7593", "CVE-2017-7594", "CVE-2017-7595", "CVE-2017-7596", "CVE-2017-7597", "CVE-2017-7598", "CVE-2017-7599", "CVE-2017-7600", "CVE-2017-7601", "CVE-2017-7602", "CVE-2017-9403", "CVE-2017-9404");
    
      script_name(english:"SUSE SLED12 / SLES12 Security Update : tiff (SUSE-SU-2017:2569-1)");
      script_summary(english:"Checks rpm output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote SUSE host is missing one or more security updates."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "This update for tiff to version 4.0.8 fixes a several bugs and
    security issues: These security issues were fixed :
    
      - CVE-2017-7595: The JPEGSetupEncode function allowed
        remote attackers to cause a denial of service
        (divide-by-zero error and application crash) via a
        crafted image (bsc#1033127).
    
      - CVE-2016-10371: The TIFFWriteDirectoryTagCheckedRational
        function allowed remote attackers to cause a denial of
        service (assertion failure and application exit) via a
        crafted TIFF file (bsc#1038438).
    
      - CVE-2017-7598: Error in tif_dirread.c allowed remote
        attackers to cause a denial of service (divide-by-zero
        error and application crash) via a crafted image
        (bsc#1033118).
    
      - CVE-2017-7596: Undefined behavior because of floats
        outside their expected value range, which allowed remote
        attackers to cause a denial of service (application
        crash) or possibly have unspecified other impact via a
        crafted image (bsc#1033126).
    
      - CVE-2017-7597: Undefined behavior because of floats
        outside their expected value range, which allowed remote
        attackers to cause a denial of service (application
        crash) or possibly have unspecified other impact via a
        crafted image (bsc#1033120).
    
      - CVE-2017-7599: Undefined behavior because of shorts
        outside their expected value range, which allowed remote
        attackers to cause a denial of service (application
        crash) or possibly have unspecified other impact via a
        crafted image (bsc#1033113).
    
      - CVE-2017-7600: Undefined behavior because of chars
        outside their expected value range, which allowed remote
        attackers to cause a denial of service (application
        crash) or possibly have unspecified other impact via a
        crafted image (bsc#1033112).
    
      - CVE-2017-7601: Because of a shift exponent too large for
        64-bit type long undefined behavior was caused, which
        allowed remote attackers to cause a denial of service
        (application crash) or possibly have unspecified other
        impact via a crafted image (bsc#1033111).
    
      - CVE-2017-7602: Prevent signed integer overflow, which
        allowed remote attackers to cause a denial of service
        (application crash) or possibly have unspecified other
        impact via a crafted image (bsc#1033109).
    
      - CVE-2017-7592: The putagreytile function had a
        left-shift undefined behavior issue, which might allowed
        remote attackers to cause a denial of service
        (application crash) or possibly have unspecified other
        impact via a crafted image (bsc#1033131).
    
      - CVE-2017-7593: Ensure that tif_rawdata is properly
        initialized, to prevent remote attackers to obtain
        sensitive information from process memory via a crafted
        image (bsc#1033129).
    
      - CVE-2017-7594: The OJPEGReadHeaderInfoSecTablesDcTable
        function allowed remote attackers to cause a denial of
        service (memory leak) via a crafted image (bsc#1033128).
    
      - CVE-2017-9403: Prevent memory leak in function
        TIFFReadDirEntryLong8Array, which allowed attackers to
        cause a denial of service via a crafted file
        (bsc#1042805).
    
      - CVE-2017-9404: Fixed memory leak vulnerability in
        function OJPEGReadHeaderInfoSecTablesQTable, which
        allowed attackers to cause a denial of service via a
        crafted file (bsc#1042804). These various other issues
        were fixed :
    
      - Fix uint32 overflow in TIFFReadEncodedStrip() that
        caused an integer division by zero. Reported by Agostino
        Sarubbo.
    
      - fix heap-based buffer overflow on generation of PixarLog
        / LUV compressed files, with ColorMap, TransferFunction
        attached and nasty plays with bitspersample. The fix for
        LUV has not been tested, but suffers from the same kind
        of issue of PixarLog.
    
      - modify ChopUpSingleUncompressedStrip() to instanciate
        compute ntrips as TIFFhowmany_32(td->td_imagelength,
        rowsperstrip), instead of a logic based on the total
        size of data. Which is faulty is the total size of data
        is not sufficient to fill the whole image, and thus
        results in reading outside of the
        StripByCounts/StripOffsets arrays when using
        TIFFReadScanline()
    
      - make OJPEGDecode() early exit in case of failure in
        OJPEGPreDecode(). This will avoid a divide by zero, and
        potential other issues.
    
      - fix misleading indentation as warned by GCC.
    
      - revert change done on 2016-01-09 that made Param member
        of TIFFFaxTabEnt structure a uint16 to reduce size of
        the binary. It happens that the Hylafax software uses
        the tables that follow this typedef (TIFFFaxMainTable,
        TIFFFaxWhiteTable, TIFFFaxBlackTable), although they are
        not in a public libtiff header.
    
      - add TIFFReadRGBAStripExt() and TIFFReadRGBATileExt()
        variants of the functions without ext, with an extra
        argument to control the stop_on_error behaviour.
    
      - fix potential memory leaks in error code path of
        TIFFRGBAImageBegin().
    
      - increase libjpeg max memory usable to 10 MB instead of
        libjpeg 1MB default. This helps when creating files with
        'big' tile, without using libjpeg temporary files.
    
      - add _TIFFcalloc()
    
      - return 0 in Encode functions instead of -1 when
        TIFFFlushData1() fails.
    
      - only run JPEGFixupTagsSubsampling() if the
        YCbCrSubsampling tag is not explicitly present. This
        helps a bit to reduce the I/O amount when the tag is
        present (especially on cloud hosted files).
    
      - in LZWPostEncode(), increase, if necessary, the code
        bit-width after flushing the remaining code and before
        emitting the EOI code.
    
      - fix memory leak in error code path of
        PixarLogSetupDecode().
    
      - fix potential memory leak in
        OJPEGReadHeaderInfoSecTablesQTable,
        OJPEGReadHeaderInfoSecTablesDcTable and
        OJPEGReadHeaderInfoSecTablesAcTable
    
      - avoid crash in Fax3Close() on empty file.
    
      - TIFFFillStrip(): add limitation to the number of bytes
        read in case td_stripbytecount[strip] is bigger than
        reasonable, so as to avoid excessive memory allocation.
    
      - fix memory leak when the underlying codec (ZIP,
        PixarLog) succeeds its setupdecode() method, but
        PredictorSetup fails.
    
      - TIFFFillStrip() and TIFFFillTile(): avoid excessive
        memory allocation in case of shorten files. Only
        effective on 64 bit builds and non-mapped cases.
    
      - TIFFFillStripPartial() / TIFFSeek(), avoid potential
        integer overflows with read_ahead in
        CHUNKY_STRIP_READ_SUPPORT mode.
    
      - avoid excessive memory allocation in case of shorten
        files. Only effective on 64 bit builds.
    
      - update tif_rawcc in CHUNKY_STRIP_READ_SUPPORT mode with
        tif_rawdataloaded when calling TIFFStartStrip() or
        TIFFFillStripPartial().
    
      - avoid potential int32 overflow in TIFFYCbCrToRGBInit()
        Fixes
    
      - avoid potential int32 overflows in multiply_ms() and
        add_ms().
    
      - fix out-of-buffer read in PackBitsDecode() Fixes
    
      - LogL16InitState(): avoid excessive memory allocation
        when RowsPerStrip tag is missing.
    
      - update dec_bitsleft at beginning of LZWDecode(), and
        update tif_rawcc at end of LZWDecode(). This is needed
        to properly work with the latest chnges in tif_read.c in
        CHUNKY_STRIP_READ_SUPPORT mode.
    
      - PixarLogDecode(): resync tif_rawcp with next_in and
        tif_rawcc with avail_in at beginning and end of
        function, similarly to what is done in LZWDecode().
        Likely needed so that it works properly with latest
        chnges in tif_read.c in CHUNKY_STRIP_READ_SUPPORT mode.
    
      - initYCbCrConversion(): add basic validation of luma and
        refBlackWhite coefficients (just check they are not NaN
        for now), to avoid potential float to int overflows.
    
      - _TIFFVSetField(): fix outside range cast of double to
        float.
    
      - initYCbCrConversion(): check luma[1] is not zero to
        avoid division by zero
    
      - _TIFFVSetField(): fix outside range cast of double to
        float.
    
      - initYCbCrConversion(): check luma[1] is not zero to
        avoid division by zero.
    
      - initYCbCrConversion(): stricter validation for
        refBlackWhite coefficients values.
    
      - avoid uint32 underflow in cpDecodedStrips that can cause
        various issues, such as buffer overflows in the library.
    
      - fix readContigStripsIntoBuffer() in -i (ignore) mode so
        that the output buffer is correctly incremented to avoid
        write outside bounds.
    
      - add 3 extra bytes at end of strip buffer in
        readSeparateStripsIntoBuffer() to avoid read outside of
        heap allocated buffer.
    
      - fix integer division by zero when BitsPerSample is
        missing.
    
      - fix NULL pointer dereference in -r mode when the image
        has no StripByteCount tag.
    
      - avoid potential division by zero is BitsPerSamples tag
        is missing.
    
      - when TIFFGetField(, TIFFTAG_NUMBEROFINKS, ) is called,
        limit the return number of inks to SamplesPerPixel, so
        that code that parses ink names doesn't go past the end
        of the buffer.
    
      - avoid potential division by zero is BitsPerSamples tag
        is missing.
    
      - fix uint32 underflow/overflow that can cause heap-based
        buffer overflow.
    
      - replace assert( (bps % 8) == 0 ) by a non assert check.
    
      - fix 2 heap-based buffer overflows (in PSDataBW and
        PSDataColorContig).
    
      - prevent heap-based buffer overflow in -j mode on a
        paletted image.
    
      - fix wrong usage of memcpy() that can trigger unspecified
        behaviour.
    
      - avoid potential invalid memory read in t2p_writeproc.
    
      - avoid potential heap-based overflow in
        t2p_readwrite_pdf_image_tile().
    
      - remove extraneous TIFFClose() in error code path, that
        caused double free.
    
      - error out cleanly in cpContig2SeparateByRow and
        cpSeparate2ContigByRow if BitsPerSample != 8 to avoid
        heap based overflow.
    
      - avoid integer division by zero.
    
      - call TIFFClose() in error code paths.
    
      - emit appropriate message if the input file is empty.
    
      - close TIFF handle in error code path.
    
    Note that Tenable Network Security has extracted the preceding
    description block directly from the SUSE security advisory. Tenable
    has attempted to automatically clean and format it as much as possible
    without introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033109"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033111"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033112"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033113"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033118"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033120"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033126"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033127"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033128"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033129"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1033131"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1038438"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1042804"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://bugzilla.suse.com/show_bug.cgi?id=1042805"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2016-10371/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7592/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7593/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7594/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7595/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7596/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7597/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7598/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7599/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7600/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7601/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-7602/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-9403/"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.suse.com/security/cve/CVE-2017-9404/"
      );
      # https://www.suse.com/support/update/announcement/2017/suse-su-20172569-1/
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?6dda5e4a"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "To install this SUSE Security Update use YaST online_update.
    Alternatively you can run the command listed for your product :
    
    SUSE Linux Enterprise Software Development Kit 12-SP3:zypper in -t
    patch SUSE-SLE-SDK-12-SP3-2017-1589=1
    
    SUSE Linux Enterprise Software Development Kit 12-SP2:zypper in -t
    patch SUSE-SLE-SDK-12-SP2-2017-1589=1
    
    SUSE Linux Enterprise Server for Raspberry Pi 12-SP2:zypper in -t
    patch SUSE-SLE-RPI-12-SP2-2017-1589=1
    
    SUSE Linux Enterprise Server 12-SP3:zypper in -t patch
    SUSE-SLE-SERVER-12-SP3-2017-1589=1
    
    SUSE Linux Enterprise Server 12-SP2:zypper in -t patch
    SUSE-SLE-SERVER-12-SP2-2017-1589=1
    
    SUSE Linux Enterprise Desktop 12-SP3:zypper in -t patch
    SUSE-SLE-DESKTOP-12-SP3-2017-1589=1
    
    SUSE Linux Enterprise Desktop 12-SP2:zypper in -t patch
    SUSE-SLE-DESKTOP-12-SP2-2017-1589=1
    
    To bring your system up-to-date, use 'zypper patch'."
      );
      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:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/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:novell:suse_linux:libtiff5");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:libtiff5-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:tiff");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:tiff-debuginfo");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:novell:suse_linux:tiff-debugsource");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:novell:suse_linux:12");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2017/04/09");
      script_set_attribute(attribute:"patch_publication_date", value:"2017/09/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/09/27");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-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/cpu", "Host/SuSE/release", "Host/SuSE/rpm-list");
    
      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, "SUSE");
    os_ver = pregmatch(pattern: "^(SLE(S|D)\d+)", string:release);
    if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "SUSE");
    os_ver = os_ver[1];
    if (! preg(pattern:"^(SLED12|SLES12)$", string:os_ver)) audit(AUDIT_OS_NOT, "SUSE SLED12 / SLES12", "SUSE " + os_ver);
    
    if (!get_kb_item("Host/SuSE/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    cpu = get_kb_item("Host/cpu");
    if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
    if (cpu !~ "^i[3-6]86$" && "x86_64" >!< cpu && "s390x" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "SUSE " + os_ver, cpu);
    
    sp = get_kb_item("Host/SuSE/patchlevel");
    if (isnull(sp)) sp = "0";
    if (os_ver == "SLES12" && (! preg(pattern:"^(2|3)$", string:sp))) audit(AUDIT_OS_NOT, "SLES12 SP2/3", os_ver + " SP" + sp);
    if (os_ver == "SLED12" && (! preg(pattern:"^(2|3)$", string:sp))) audit(AUDIT_OS_NOT, "SLED12 SP2/3", os_ver + " SP" + sp);
    
    
    flag = 0;
    if (rpm_check(release:"SLES12", sp:"3", reference:"libtiff5-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"3", reference:"libtiff5-debuginfo-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"3", reference:"tiff-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"3", reference:"tiff-debuginfo-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"3", reference:"tiff-debugsource-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"3", reference:"libtiff5-32bit-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"3", reference:"libtiff5-debuginfo-32bit-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", reference:"libtiff5-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", reference:"libtiff5-debuginfo-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", reference:"tiff-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", reference:"tiff-debuginfo-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", reference:"tiff-debugsource-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", reference:"libtiff5-32bit-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLES12", sp:"2", reference:"libtiff5-debuginfo-32bit-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"3", cpu:"x86_64", reference:"libtiff5-32bit-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"3", cpu:"x86_64", reference:"libtiff5-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"3", cpu:"x86_64", reference:"libtiff5-debuginfo-32bit-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"3", cpu:"x86_64", reference:"libtiff5-debuginfo-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"3", cpu:"x86_64", reference:"tiff-debuginfo-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"3", cpu:"x86_64", reference:"tiff-debugsource-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"2", cpu:"x86_64", reference:"libtiff5-32bit-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"2", cpu:"x86_64", reference:"libtiff5-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"2", cpu:"x86_64", reference:"libtiff5-debuginfo-32bit-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"2", cpu:"x86_64", reference:"libtiff5-debuginfo-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"2", cpu:"x86_64", reference:"tiff-debuginfo-4.0.8-44.3.1")) flag++;
    if (rpm_check(release:"SLED12", sp:"2", cpu:"x86_64", reference:"tiff-debugsource-4.0.8-44.3.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, "tiff");
    }
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-984.NASL
    descriptiontiff was affected by multiple memory leaks (CVE-2017-9403, CVE-2017-9404) that could result in denial of service. Furthermore, while the current version in Debian was already patched for _TIFFVGetField issues (CVE-2016-10095, CVE-2017-9147), we replaced our Debian-specific patches by the upstream provided patches to stay closer to upstream. For Debian 7
    last seen2020-03-17
    modified2017-06-14
    plugin id100772
    published2017-06-14
    reporterThis script is Copyright (C) 2017-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/100772
    titleDebian DLA-984-1 : tiff security update
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Debian Security Advisory DLA-984-1. The text
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(100772);
      script_version("3.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2016-10095", "CVE-2017-9147", "CVE-2017-9403", "CVE-2017-9404");
    
      script_name(english:"Debian DLA-984-1 : tiff security update");
      script_summary(english:"Checks dpkg output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "tiff was affected by multiple memory leaks (CVE-2017-9403,
    CVE-2017-9404) that could result in denial of service. Furthermore,
    while the current version in Debian was already patched for
    _TIFFVGetField issues (CVE-2016-10095, CVE-2017-9147), we replaced our
    Debian-specific patches by the upstream provided patches to stay
    closer to upstream.
    
    For Debian 7 'Wheezy', these problems have been fixed in version
    4.0.2-6+deb7u14.
    
    We recommend that you upgrade your tiff packages.
    
    NOTE: Tenable Network Security has extracted the preceding description
    block directly from the DLA security advisory. Tenable has attempted
    to automatically clean and format it as much as possible without
    introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.debian.org/debian-lts-announce/2017/06/msg00013.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/wheezy/tiff"
      );
      script_set_attribute(attribute:"solution", value:"Upgrade the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/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:debian:debian_linux:libtiff-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libtiff-opengl");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libtiff-tools");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libtiff5");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libtiff5-alt-dev");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libtiff5-dev");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libtiffxx5");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2017/06/13");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/06/14");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-2020 Tenable Network Security, Inc.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"7.0", prefix:"libtiff-doc", reference:"4.0.2-6+deb7u14")) flag++;
    if (deb_check(release:"7.0", prefix:"libtiff-opengl", reference:"4.0.2-6+deb7u14")) flag++;
    if (deb_check(release:"7.0", prefix:"libtiff-tools", reference:"4.0.2-6+deb7u14")) flag++;
    if (deb_check(release:"7.0", prefix:"libtiff5", reference:"4.0.2-6+deb7u14")) flag++;
    if (deb_check(release:"7.0", prefix:"libtiff5-alt-dev", reference:"4.0.2-6+deb7u14")) flag++;
    if (deb_check(release:"7.0", prefix:"libtiff5-dev", reference:"4.0.2-6+deb7u14")) flag++;
    if (deb_check(release:"7.0", prefix:"libtiffxx5", reference:"4.0.2-6+deb7u14")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-983.NASL
    descriptiontiff3 was affected by multiple memory leaks (CVE-2017-9403, CVE-2017-9404) that could result in denial of service. Furthermore, while the current version in Debian was already patched for _TIFFVGetField issues (CVE-2016-10095, CVE-2017-9147), we replaced our Debian-specific patches by the upstream provided patches to stay closer to upstream. For Debian 7
    last seen2020-03-17
    modified2017-06-14
    plugin id100771
    published2017-06-14
    reporterThis script is Copyright (C) 2017-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/100771
    titleDebian DLA-983-1 : tiff3 security update
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Debian Security Advisory DLA-983-1. The text
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(100771);
      script_version("3.5");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2016-10095", "CVE-2017-9147", "CVE-2017-9403", "CVE-2017-9404");
    
      script_name(english:"Debian DLA-983-1 : tiff3 security update");
      script_summary(english:"Checks dpkg output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "tiff3 was affected by multiple memory leaks (CVE-2017-9403,
    CVE-2017-9404) that could result in denial of service. Furthermore,
    while the current version in Debian was already patched for
    _TIFFVGetField issues (CVE-2016-10095, CVE-2017-9147), we replaced our
    Debian-specific patches by the upstream provided patches to stay
    closer to upstream.
    
    For Debian 7 'Wheezy', these problems have been fixed in version
    3.9.6-11+deb7u6.
    
    We recommend that you upgrade your tiff3 packages.
    
    NOTE: Tenable Network Security has extracted the preceding description
    block directly from the DLA security advisory. Tenable has attempted
    to automatically clean and format it as much as possible without
    introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.debian.org/debian-lts-announce/2017/06/msg00012.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/wheezy/tiff3"
      );
      script_set_attribute(attribute:"solution", value:"Upgrade the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/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:debian:debian_linux:libtiff4");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libtiff4-dev");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libtiffxx0c2");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2017/06/13");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/06/14");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-2020 Tenable Network Security, Inc.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"7.0", prefix:"libtiff4", reference:"3.9.6-11+deb7u6")) flag++;
    if (deb_check(release:"7.0", prefix:"libtiff4-dev", reference:"3.9.6-11+deb7u6")) flag++;
    if (deb_check(release:"7.0", prefix:"libtiffxx0c2", reference:"3.9.6-11+deb7u6")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");