Lucene search
K

glibc - 'getaddrinfo' Stack Buffer Overflow (PoC)

🗓️ 16 Feb 2016 00:00:00Reported by Google Security ResearchType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 101 Views

glibc 'getaddrinfo' Stack Buffer Overflow (PoC) affecting ssh, sudo, and cur

Related
Code
ReporterTitlePublishedViews
Family
IBM Security Bulletins
Security Bulletin: glibc getaddrinfo stack-based buffer overflow (CVE-2015-7547)
19 Jul 202000:49
ibm
IBM Security Bulletins
Security Bulletin: GNU C library (glibc) vulnerability affects IBM Workload Deployer. (CVE-2015-7547)
15 Jun 201807:05
ibm
IBM Security Bulletins
Security Bulletin: Vulnerability in GNU C Library(glibc) affects WebSphere DataPower XC10 Appliance(CVE-2015-7547) - Revised fix available
15 Jun 201807:05
ibm
IBM Security Bulletins
Security Bulletin: Vulnerabilities in GNU C library (glibc), OpenSSL and BIND affect IBM Netezza Host Management
18 Oct 201903:10
ibm
IBM Security Bulletins
IBM Security Network Protection / IBM QRadar Network Security / XGS Technote Index
31 Jan 202100:10
ibm
IBM Security Bulletins
Security Bulletin: GNU C library (glibc) vulnerability affects IBM MQ Appliance (CVE-2015-7547)
15 Jun 201807:05
ibm
IBM Security Bulletins
Security Bulletin: Vulnerability in the GNU C Library (glibc) affects IBM API Management (CVE-2015-7547)
15 Jun 201807:05
ibm
IBM Security Bulletins
Security Bulletin: GNU C library (glibc) vulnerability affects IBM QRadar SIEM and Incident Forensics (CVE-2015-7547)
16 Jun 201821:39
ibm
IBM Security Bulletins
Security Bulletin: GNU C library (glibc) vulnerability affects IBM Security Guardium (CVE-2015-7547)
16 Jun 201821:39
ibm
IBM Security Bulletins
Security Bulletin: GNU C library (glibc) vulnerability affects <TS4500> (CVE-2015-7547)
18 Jun 201800:46
ibm
Rows per page
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

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

16 Feb 2016 00:00Current
8.3High risk
Vulners AI Score8.3
CVSS 26.8
CVSS 38.1
EPSS0.93905
101