CVE-2017-9147 : Detail

CVE-2017-9147

6.5
/
Medium
Overflow
6.29%V3
Network
2017-05-22
16h00 +00:00
2018-03-27
07h57 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

LibTIFF 4.0.7 has an invalid read in the _TIFFVGetField function in tif_dir.c, which might allow remote attackers to cause a denial of service (crash) via a crafted TIFF file.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-125 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.

Metrics

Metrics Score Severity CVSS Vector Source
V3.0 6.5 MEDIUM CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Base: Exploitabilty Metrics

The Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.

Attack Vector

This metric reflects the context by which vulnerability exploitation is possible.

Network

A vulnerability exploitable with network access means the vulnerable component is bound to the network stack and the attacker's path is through OSI layer 3 (the network layer). Such a vulnerability is often termed 'remotely exploitable' and can be thought of as an attack being exploitable one or more network hops away (e.g. across layer 3 boundaries from routers).

Attack Complexity

This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success against the vulnerable component.

Privileges Required

This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.

None

The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files to carry out an attack.

User Interaction

This metric captures the requirement for a user, other than the attacker, to participate in the successful compromise of the vulnerable component.

Required

Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited. For example, a successful exploit may only be possible during the installation of an application by a system administrator.

Base: Scope Metrics

An important property captured by CVSS v3.0 is the ability for a vulnerability in one software component to impact resources beyond its means, or privileges.

Scope

Formally, Scope refers to the collection of privileges defined by a computing authority (e.g. an application, an operating system, or a sandbox environment) when granting access to computing resources (e.g. files, CPU, memory, etc). These privileges are assigned based on some method of identification and authorization. In some cases, the authorization may be simple or loosely controlled based upon predefined rules or standards. For example, in the case of Ethernet traffic sent to a network switch, the switch accepts traffic that arrives on its ports and is an authority that controls the traffic flow to other switch ports.

Unchanged

An exploited vulnerability can only affect resources managed by the same authority. In this case the vulnerable component and the impacted component are the same.

Base: Impact Metrics

The Impact metrics refer to the properties of the impacted component.

Confidentiality Impact

This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.

None

There is no loss of confidentiality within the impacted component.

Integrity Impact

This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information.

None

There is no loss of integrity within the impacted component.

Availability Impact

This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.

High

There is total loss of availability, resulting in the attacker being able to fully deny access to resources in the impacted component; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the impacted component (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).

Temporal Metrics

The Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence that one has in the description of a vulnerability.

Environmental Metrics

[email protected]
V2 4.3 AV:N/AC:M/Au:N/C:N/I:N/A:P [email protected]

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 42301

Publication date : 2017-07-05 22h00 +00:00
Author : zhangtan
EDB Verified : Yes

Source: http://bugzilla.maptools.org/show_bug.cgi?id=2693 On 4.0.7: # tiffsplit $FILE ==2007== Invalid read of size 4 ==2007== at 0x40CD1A: _TIFFVGetField (tif_dir.c:1072) ==2007== by 0x41B2C5: TIFFVGetField (tif_dir.c:1198) ==2007== by 0x41B2C5: TIFFGetField (tif_dir.c:1182) ==2007== by 0x404CCF: tiffcp (tiffsplit.c:220) ==2007== by 0x404CCF: main (tiffsplit.c:89) ==2007== Address 0x0 is not stack'd, malloc'd or (recently) free'd ------- Comment #1 From zhangtan 2017-05-15 01:20:26 ------- The place of Out of bound read: ret_val = 0; for (i = 0; i < td->td_customValueCount; i++) { TIFFTagValue *tv = td->td_customValues + i; if (tv->info->field_tag != tag) continue; ------- Comment #2 From zhangtan 2017-05-15 01:29:10 ------- The place of Out of bound read: The 1072 line of tif_dir.c 1068 ret_val = 0; 1069 for (i = 0; i < td->td_customValueCount; i++) { 1070 TIFFTagValue *tv = td->td_customValues + i; 1071 1072 if (tv->info->field_tag != tag) 1073 continue; As tv increased in 1070, Out of bound read happened in 1072 when the pointer tv was referenced. ------- Comment #3 From zhangtan 2017-05-15 01:46:33 ------- PoC: Detailed information of the bug can be reproduced using the valgrind tool: # valgrind tiffsplit $File(the testcase in the attachment) Error Message: ==23520== Invalid read of size 4 ==23520== at 0x40CD1A: _TIFFVGetField (tif_dir.c:1072) ==23520== by 0x41B2C5: TIFFVGetField (tif_dir.c:1198) ==23520== by 0x41B2C5: TIFFGetField (tif_dir.c:1182) ==23520== by 0x404CCF: tiffcp (tiffsplit.c:220) ==23520== by 0x404CCF: main (tiffsplit.c:89) ==23520== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==23520== ==23520== ==23520== Process terminating with default action of signal 11 (SIGSEGV) ==23520== Access not within mapped region at address 0x0 ==23520== at 0x40CD1A: _TIFFVGetField (tif_dir.c:1072) ==23520== by 0x41B2C5: TIFFVGetField (tif_dir.c:1198) ==23520== by 0x41B2C5: TIFFGetField (tif_dir.c:1182) ==23520== by 0x404CCF: tiffcp (tiffsplit.c:220) ==23520== by 0x404CCF: main (tiffsplit.c:89) ==23520== If you believe this happened as a result of a stack ==23520== overflow in your program's main thread (unlikely but ==23520== possible), you can try to increase the size of the ==23520== main thread stack using the --main-stacksize= flag. ==23520== The main thread stack size used in this run was 8388608. ==23520== ==23520== HEAP SUMMARY: ==23520== in use at exit: 17,821 bytes in 42 blocks ==23520== total heap usage: 96 allocs, 54 frees, 59,223 bytes allocated ==23520== ==23520== LEAK SUMMARY: ==23520== definitely lost: 0 bytes in 0 blocks ==23520== indirectly lost: 0 bytes in 0 blocks ==23520== possibly lost: 0 bytes in 0 blocks ==23520== still reachable: 17,821 bytes in 42 blocks ==23520== suppressed: 0 bytes in 0 blocks ==23520== Rerun with --leak-check=full to see details of leaked memory ==23520== ==23520== For counts of detected and suppressed errors, rerun with: -v ==23520== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Segmentation fault Proof of Concept: https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/42301.zip

Products Mentioned

Configuraton 0

Libtiff>>Libtiff >> Version 4.0.7

References

https://usn.ubuntu.com/3606-1/
Tags : vendor-advisory, x_refsource_UBUNTU
https://www.exploit-db.com/exploits/42301/
Tags : exploit, x_refsource_EXPLOIT-DB
http://www.securityfocus.com/bid/98594
Tags : vdb-entry, x_refsource_BID
http://www.debian.org/security/2017/dsa-3903
Tags : vendor-advisory, x_refsource_DEBIAN