CVE-2014-0160 - Improper Restriction of Operations within the Bounds of a Memory Buffer

Severity

75%

Complexity

39%

Confidentiality

60%

CVSS V2 scoring evaluates the impact of the vulnerability on the host where the vulnerability is located. When evaluating the impact of this vulnerability to your organization, take into account the nature of the data that is being protected and act according to your organization’s risk acceptance. While CVE-2014-0160 does not allow unrestricted access to memory on the targeted host, a successful exploit does leak information from memory locations which have the potential to contain particularly sensitive information, e.g., cryptographic keys and passwords. Theft of this information could enable other attacks on the information system, the impact of which would depend on the sensitivity of the data and functions of that system.

The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packets, which allows remote attackers to obtain sensitive information from process memory via crafted packets that trigger a buffer over-read, as demonstrated by reading private keys, related to d1_both.c and t1_lib.c, aka the Heartbleed bug.

CVSS V2 scoring evaluates the impact of the vulnerability on the host where the vulnerability is located. When evaluating the impact of this vulnerability to your organization, take into account the nature of the data that is being protected and act according to your organization’s risk acceptance. While CVE-2014-0160 does not allow unrestricted access to memory on the targeted host, a successful exploit does leak information from memory locations which have the potential to contain particularly sensitive information, e.g., cryptographic keys and passwords. Theft of this information could enable other attacks on the information system, the impact of which would depend on the sensitivity of the data and functions of that system.

CVSS 3.1 Base Score 7.5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

CVSS 2.0 Base Score 5. CVSS Attack Vector: network. CVSS Attack Complexity: low. CVSS Vector: (AV:N/AC:L/Au:N/C:P/I:N/A:N).

Demo Examples

Improper Restriction of Operations within the Bounds of a Memory Buffer

CWE-119

This example takes an IP address from a user, verifies that it is well formed and then looks up the hostname and copies it into a buffer.


               
}
strcpy(hostname, hp->h_name);/*routine that ensures user_supplied_addr is in the right format for conversion */

This function allocates a buffer of 64 bytes to store the hostname, however there is no guarantee that the hostname will not be larger than 64 bytes. If an attacker specifies an address which resolves to a very large hostname, then we may overwrite sensitive data or even relinquish control flow to the attacker.

Note that this example also contains an unchecked return value (CWE-252) that can lead to a NULL pointer dereference (CWE-476).

Improper Restriction of Operations within the Bounds of a Memory Buffer

CWE-119

This example applies an encoding procedure to an input string and stores it into a buffer.


               
}
return dst_buf;
die("user string too long, die evil hacker!");
else dst_buf[dst_index++] = user_supplied_string[i];
dst_buf[dst_index++] = ';';
/* encode to < */

The programmer attempts to encode the ampersand character in the user-controlled string, however the length of the string is validated before the encoding procedure is applied. Furthermore, the programmer assumes encoding expansion will only expand a given character by a factor of 4, while the encoding of the ampersand expands by 5. As a result, when the encoding procedure expands the string it is possible to overflow the destination buffer if the attacker provides a string of many ampersands.

Improper Restriction of Operations within the Bounds of a Memory Buffer

CWE-119

The following example asks a user for an offset into an array to select an item.


               
}
printf("You selected %s\n", items[index-1]);

The programmer allows the user to specify which element in the list to select, however an attacker can provide an out-of-bounds offset, resulting in a buffer over-read (CWE-126).

Improper Restriction of Operations within the Bounds of a Memory Buffer

CWE-119

In the following code, the method retrieves a value from an array at a specific array index location that is given as an input parameter to the method


               
}
return value;// check that the array index is less than the maximum// length of the array
value = array[index];// get the value at the specified index of the array
// if array index is invalid then output error message// and return value indicating error
value = -1;

However, this method only verifies that the given array index is less than the maximum length of the array but does not check for the minimum value (CWE-839). This will allow a negative value to be accepted as the input array index, which will result in a out of bounds read (CWE-125) and may allow access to sensitive memory. The input array index should be checked to verify that is within the maximum and minimum range required for the array (CWE-129). In this example the if statement should be modified to include a minimum range check, as shown below.


               
...// check that the array index is within the correct// range of values for the array

Improper Restriction of Operations within the Bounds of a Memory Buffer

CWE-119

Windows provides the _mbs family of functions to perform various operations on multibyte strings. When these functions are passed a malformed multibyte string, such as a string containing a valid leading byte followed by a single null byte, they can read or write past the end of the string buffer causing a buffer overflow. The following functions all pose a risk of buffer overflow: _mbsinc _mbsdec _mbsncat _mbsncpy _mbsnextc _mbsnset _mbsrev _mbsset _mbsstr _mbstok _mbccpy _mbslen

Overview

Type

OpenSSL Project OpenSSL

First reported 10 years ago

2014-04-07 22:55:00

Last updated 5 years ago

2019-10-09 23:09:00

Affected Software

OpenSSL Project OpenSSL 1.0.1

1.0.1

OpenSSL Project OpenSSL 1.0.1 Beta1

1.0.1

OpenSSL Project OpenSSL 1.0.1 Beta2

1.0.1

OpenSSL Project OpenSSL 1.0.1 Beta3

1.0.1

OpenSSL Project OpenSSL 1.0.1a

1.0.1a

OpenSSL Project OpenSSL 1.0.1b

1.0.1b

OpenSSL Project OpenSSL 1.0.1c

1.0.1c

OpenSSL Project OpenSSL 1.0.1d

1.0.1d

OpenSSL Project OpenSSL 1.0.1e

1.0.1e

OpenSSL Project OpenSSL 1.0.1f

1.0.1f

OpenSSL Project OpenSSL 1.0.2-beta1

1.0.2

References

http://advisories.mageia.org/MGASA-2014-0165.html

Third Party Advisory

http://blog.fox-it.com/2014/04/08/openssl-heartbleed-bug-live-blog/

Third Party Advisory

http://cogentdatahub.com/ReleaseNotes.html

Third Party Advisory

http://download.schneider-electric.com/files?p_Doc_Ref=SEVD%202014-119-01

Third Party Advisory

http://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=96db9023b881d7cd9f379b0c154650d6c108e9a3

Vendor Advisory

http://heartbleed.com/

Technical Description, Third Party Advisory

FEDORA-2014-4879

Third Party Advisory

FEDORA-2014-4910

Third Party Advisory

FEDORA-2014-9308

Third Party Advisory

openSUSE-SU-2014:0492

Third Party Advisory

SUSE-SA:2014:002

Third Party Advisory

openSUSE-SU-2014:0560

Third Party Advisory

HPSBMU02995

Third Party Advisory

HPSBMU02994

Third Party Advisory

HPSBMU02998

Third Party Advisory

HPSBMU02997

Third Party Advisory

HPSBST03001

Third Party Advisory

HPSBMU02999

Third Party Advisory

HPSBGN03008

Third Party Advisory

HPSBGN03010

Third Party Advisory

HPSBMU03012

Third Party Advisory

HPSBMU03019

Third Party Advisory

HPSBMU03017

Third Party Advisory

HPSBMU03018

Third Party Advisory

HPSBST03015

Third Party Advisory

HPSBMU03013

Third Party Advisory

HPSBGN03011

Third Party Advisory

HPSBHF03021

Third Party Advisory

HPSBPI03014

Third Party Advisory

HPSBMU03020

Third Party Advisory

HPSBST03016

Third Party Advisory

HPSBMU03023

Third Party Advisory

HPSBMU03025

Third Party Advisory

HPSBMU03022

Third Party Advisory

HPSBMU03024

Third Party Advisory

HPSBPI03031

Third Party Advisory

HPSBMU03029

Third Party Advisory

HPSBMU03028

Third Party Advisory

HPSBMU03033

Third Party Advisory

HPSBMU03030

Third Party Advisory

HPSBMU03032

Third Party Advisory

HPSBMU03009

Third Party Advisory

HPSBST03004

Third Party Advisory

HPSBST03027

Third Party Advisory

HPSBMU03040

Third Party Advisory

HPSBMU03044

Third Party Advisory

HPSBMU03037

Third Party Advisory

HPSBMU03062

Third Party Advisory

HPSBHF03136

Third Party Advisory

SSRT101846

Third Party Advisory

http://public.support.unisys.com/common/public/vulnerability/NVD_Detail_Rpt.aspx?ID=1

Third Party Advisory

http://public.support.unisys.com/common/public/vulnerability/NVD_Detail_Rpt.aspx?ID=3

Third Party Advisory

RHSA-2014:0376

Third Party Advisory

RHSA-2014:0377

Third Party Advisory

RHSA-2014:0378

Third Party Advisory

RHSA-2014:0396

Third Party Advisory

20140409 Re: heartbleed OpenSSL bug CVE-2014-0160

Mailing List, Third Party Advisory

20140411 MRI Rubies may contain statically linked, vulnerable OpenSSL

Mailing List, Third Party Advisory

20140412 Re: heartbleed OpenSSL bug CVE-2014-0160

Mailing List, Third Party Advisory

20140408 heartbleed OpenSSL bug CVE-2014-0160

Mailing List, Third Party Advisory

20140408 Re: heartbleed OpenSSL bug CVE-2014-0160

Mailing List, Third Party Advisory

20141205 NEW: VMSA-2014-0012 - VMware vSphere product updates address security vulnerabilities

Mailing List, Third Party Advisory

57347

Vendor Advisory

57483

Vendor Advisory

57721

Vendor Advisory

57836

Vendor Advisory

57966

Vendor Advisory

57968

Vendor Advisory

59139

Third Party Advisory

59243

Third Party Advisory

59347

Third Party Advisory

http://support.citrix.com/article/CTX140605

Third Party Advisory

20140409 OpenSSL Heartbeat Extension Vulnerability in Multiple Cisco Products

Third Party Advisory

http://www.apcmedia.com/salestools/SJHN-7RKGNM/SJHN-7RKGNM_R4_EN.pdf

Third Party Advisory

http://www.blackberry.com/btsc/KB35882

Third Party Advisory

DSA-2896

Third Party Advisory

32745

Third Party Advisory, VDB Entry

32764

Third Party Advisory, VDB Entry

http://www.f-secure.com/en/web/labs_global/fsc-2014-1

Third Party Advisory

http://www.getchef.com/blog/2014/04/09/chef-server-11-0-12-release/

Third Party Advisory

http://www.getchef.com/blog/2014/04/09/chef-server-heartbleed-cve-2014-0160-releases/

Third Party Advisory

http://www.getchef.com/blog/2014/04/09/enterprise-chef-11-1-3-release/

Third Party Advisory

http://www.getchef.com/blog/2014/04/09/enterprise-chef-1-4-9-release/

Third Party Advisory

http://www.innominate.com/data/downloads/manuals/mdm_1.5.2.1_Release_Notes.pdf

Third Party Advisory

VU#720951

Third Party Advisory, US Government Resource

http://www.kerio.com/support/kerio-control/release-history

Third Party Advisory

MDVSA-2015:062

Third Party Advisory

http://www.openssl.org/news/secadv_20140407.txt

Vendor Advisory

http://www.oracle.com/technetwork/topics/security/cpujul2014-1972956.html

Third Party Advisory

http://www.oracle.com/technetwork/topics/security/opensslheartbleedcve-2014-0160-2188454.html

Third Party Advisory

20141205 NEW: VMSA-2014-0012 - VMware vSphere product updates address security vulnerabilities

Third Party Advisory, VDB Entry

66690

Third Party Advisory, VDB Entry

1030026

Third Party Advisory, VDB Entry

1030074

Third Party Advisory, VDB Entry

1030077

Third Party Advisory, VDB Entry

1030078

Third Party Advisory, VDB Entry

1030079

Third Party Advisory, VDB Entry

1030080

Third Party Advisory, VDB Entry

1030081

Third Party Advisory, VDB Entry

1030082

Third Party Advisory, VDB Entry

http://www.splunk.com/view/SP-CAAAMB3

Third Party Advisory

http://www.symantec.com/security_response/securityupdates/detail.jsp?fid=security_advisory&pvid=security_advisory&year=&suid=20160512_00

Third Party Advisory

USN-2165-1

Third Party Advisory

TA14-098A

Third Party Advisory, US Government Resource

http://www.vmware.com/security/advisories/VMSA-2014-0012.html

Third Party Advisory

http://www.websense.com/support/article/kbarticle/Vulnerabilities-resolved-in-TRITON-APX-Version-8-0

Third Party Advisory

http://www-01.ibm.com/support/docview.wss?uid=isg400001841

Third Party Advisory

http://www-01.ibm.com/support/docview.wss?uid=isg400001843

Third Party Advisory

http://www-01.ibm.com/support/docview.wss?uid=ssg1S1004661

Third Party Advisory

http://www-01.ibm.com/support/docview.wss?uid=swg21670161

Third Party Advisory

https://blog.torproject.org/blog/openssl-bug-cve-2014-0160

Third Party Advisory

https://bugzilla.redhat.com/show_bug.cgi?id=1084875

Issue Tracking

https://cert-portal.siemens.com/productcert/pdf/ssa-635659.pdf

https://code.google.com/p/mod-spdy/issues/detail?id=85

Third Party Advisory

https://filezilla-project.org/versions.php?type=server

Third Party Advisory

https://gist.github.com/chapmajs/10473815

Third Party Advisory

HPSBST03000

Third Party Advisory

[tomcat-dev] 20190319 svn commit: r1855831 [26/30] - in /tomcat/site/trunk: ./ docs/ xdocs/

Third Party Advisory

[tomcat-dev] 20190325 svn commit: r1856174 [26/29] - in /tomcat/site/trunk: docs/ xdocs/ xdocs/stylesheets/

Third Party Advisory

[tomcat-dev] 20200213 svn commit: r1873980 [31/34] - /tomcat/site/trunk/docs/

[tomcat-dev] 20200203 svn commit: r1873527 [26/30] - /tomcat/site/trunk/docs/

[syslog-ng-announce] 20140411 syslog-ng Premium Edition 5 LTS (5.0.4a) has been released

Third Party Advisory

https://sku11army.blogspot.com/2020/01/heartbleed-hearts-continue-to-bleed.html

https://support.f5.com/kb/en-us/solutions/public/15000/100/sol15159.html

Third Party Advisory

https://support.f5.com/kb/en-us/solutions/public/15000/100/sol15159.html?sr=36517217

Third Party Advisory

https://www.cert.fi/en/reports/2014/vulnerability788210.html

Third Party Advisory

https://www.mitel.com/en-ca/support/security-advisories/mitel-product-security-advisory-17-0008

Third Party Advisory

Stay updated

ExploitPedia is constantly evolving. Sign up to receive a notification when we release additional functionality.

Get in touch

If you'd like to report a bug or have any suggestions for improvements then please do get in touch with us using this form. We will get back to you as soon as we can.