CVE-2006-3738 - Improper Restriction of Operations within the Bounds of a Memory Buffer

Severity

99%

Complexity

99%

Confidentiality

165%

Failed exploit attempts may crash applications, denying service to legitimate users.

Buffer overflow in the SSL_get_shared_ciphers function in OpenSSL 0.9.7 before 0.9.7l, 0.9.8 before 0.9.8d, and earlier versions has unspecified impact and remote attack vectors involving a long list of ciphers.

Failed exploit attempts may crash applications, denying service to legitimate users.

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

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 18 years ago

2006-09-28 18:07:00

Last updated 6 years ago

2018-10-17 21:29:00

Affected Software

OpenSSL Project OpenSSL 0.9.7

0.9.7

OpenSSL Project OpenSSL 0.9.7a

0.9.7a

OpenSSL Project OpenSSL 0.9.7b

0.9.7b

OpenSSL Project OpenSSL 0.9.7c

0.9.7c

OpenSSL Project OpenSSL 0.9.7d

0.9.7d

OpenSSL Project OpenSSL 0.9.7e

0.9.7e

OpenSSL Project OpenSSL 0.9.7f

0.9.7f

OpenSSL Project OpenSSL 0.9.7g

0.9.7g

OpenSSL Project OpenSSL 0.9.7h

0.9.7h

OpenSSL Project OpenSSL 0.9.7i

0.9.7i

OpenSSL Project OpenSSL 0.9.7j

0.9.7j

OpenSSL Project OpenSSL 0.9.7k

0.9.7k

OpenSSL Project OpenSSL 0.9.8

0.9.8

OpenSSL Project OpenSSL 0.9.8a

0.9.8a

OpenSSL Project OpenSSL 0.9.8b

0.9.8b

OpenSSL Project OpenSSL 0.9.8c

0.9.8c

References

NetBSD-SA2008-007

20061001-01-P

http://docs.info.apple.com/article.html?artnum=304829

HPSBMA02250

http://issues.rpath.com/browse/RPL-613

HPSBUX02174

SSRT071299

http://kolab.org/security/kolab-vendor-notice-11.txt

Patch

APPLE-SA-2006-11-28

20060928 [SECURITY] OpenSSL 0.9.8d and 0.9.7l released

Patch

SSRT090208

[3.9] 20061007 013: SECURITY FIX: October 7, 2006

Patch

http://openvpn.net/changelog.html

Patch

22094

Patch, Vendor Advisory

22116

Patch, Vendor Advisory

22130

Patch, Vendor Advisory

22165

Patch, Vendor Advisory

22166

Patch, Vendor Advisory

22172

Patch, Vendor Advisory

22186

Patch, Vendor Advisory

22193

Patch, Vendor Advisory

22207

Patch, Vendor Advisory

22212

Patch, Vendor Advisory

22216

Patch, Vendor Advisory

22220

Patch, Vendor Advisory

22240

Patch, Vendor Advisory

22259

Patch, Vendor Advisory

22260

Patch, Vendor Advisory

22284

Patch, Vendor Advisory

22298

22330

Patch, Vendor Advisory

22385

22460

22487

22500

22544

22626

22633

22654

22758

22772

22791

22799

23038

23155

23280

23309

23340

23680

23794

23915

24930

24950

25889

26329

30124

30161

31492

FreeBSD-SA-06:23

Patch, Vendor Advisory

GLSA-200610-11

1016943

Patch

1017522

SSA:2006-272-01

Patch

http://sourceforge.net/project/shownotes.php?release_id=461863&group_id=69227

102668

Patch

102711

201531

http://support.avaya.com/elmodocs2/security/ASA-2006-220.htm

http://support.avaya.com/elmodocs2/security/ASA-2006-260.htm

20061108 Multiple Vulnerabilities in OpenSSL Library

20061108 Multiple Vulnerabilities in OpenSSL library

DSA-1185

Patch

DSA-1195

Patch, Vendor Advisory

GLSA-200612-11

GLSA-200805-07

VU#547300

US Government Resource

MDKSA-2006:172

MDKSA-2006:177

MDKSA-2006:178

SUSE-SR:2006:024

Patch, Vendor Advisory

SUSE-SA:2006:058

Patch, Vendor Advisory

OpenPKG-SA-2006.021

Patch, Vendor Advisory

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

http://www.oracle.com/technetwork/topics/security/cpujan2007-101493.html

29262

Patch

RHSA-2006:0695

Patch

RHSA-2008:0629

20060928 rPSA-2006-0175-1 openssl openssl-scripts

20060929 rPSA-2006-0175-2 openssl openssl-scripts

20070110 VMware ESX server security updates

20070602 Recent OpenSSL exploits

20249

Patch

22083

http://www.serv-u.com/releasenotes/

2006-0054

Patch

USN-353-1

Patch

TA06-333A

US Government Resource

http://www.vmware.com/support/esx2/doc/esx-202-200612-patch.html

http://www.vmware.com/support/esx21/doc/esx-213-200612-patch.html

http://www.vmware.com/support/esx25/doc/esx-253-200612-patch.html

http://www.vmware.com/support/esx25/doc/esx-254-200612-patch.html

http://www.vmware.com/support/vi3/doc/esx-3069097-patch.html

http://www.vmware.com/support/vi3/doc/esx-9986131-patch.html

ADV-2006-3820

ADV-2006-3860

ADV-2006-3869

ADV-2006-3902

ADV-2006-3936

ADV-2006-4036

ADV-2006-4264

ADV-2006-4314

ADV-2006-4401

ADV-2006-4417

ADV-2006-4443

ADV-2006-4750

ADV-2007-0343

ADV-2007-1401

ADV-2007-2315

ADV-2007-2783

http://www.xerox.com/downloads/usa/en/c/cert_ESSNetwork_XRX07001_v1.pdf

http://www130.nortelnetworks.com/go/main.jsp?cscat=BLTNDETAIL&DocumentOID=498093&RenditionID=&poid=8881

openssl-sslgetsharedciphers-bo(29237)

oval:org.mitre.oval:def:4256

oval:org.mitre.oval:def:9370

SSRT071304

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.