Bug 453444 - (CVE-2008-2952) CVE-2008-2952 OpenLDAP denial-of-service flaw in ASN.1 decoder
CVE-2008-2952 OpenLDAP denial-of-service flaw in ASN.1 decoder
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
: Security
Depends On: 453637 453638 453639 453640 453726 453727 453728
  Show dependency treegraph
Reported: 2008-06-30 13:39 EDT by Josh Bressers
Modified: 2008-12-11 13:00 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-21 06:15:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch from upstream CVE (1.12 KB, patch)
2008-06-30 13:53 EDT, Josh Bressers
no flags Details | Diff

  None (edit)
Description Josh Bressers 2008-06-30 13:39:52 EDT
A DoS flaw was reported to the OpenLDAP BTS:

The bug states:

This vulnerability allows remote attackers to deny services on vulnerable
installations of OpenLDAP. Authentication is not required to exploit this

The specific flaw exists in the decoding of ASN.1 BER network datagrams. When
the size of a BerElement is specified incorrectly, the application will trigger
an assert(), leading to abnormal program termination.
Tech Details: 	

The code exhibiting the problem is located in the function ber_get_next()
function in "libraries/liblber/io.c" .

The function fails to handle properly BER encoding of an element (tag + length +
content) that contains:

* exactly 4 bytes long "multi-byte tag"
* exactly 4 bytes long "multi-byte size"

The total size of the resulting encoding equals to the size of the BerElement
structure buffer plus one byte. This causes the function returns indicating that
more data are needed, but leaves the read-pointer pointing right at the end of
the buffer, which is not permitted.

Subsequent calls to the function result in an assertion failure:

assert( 0 ); /* ber structure is messed up ?*/

Example Exploitation:

  > slapd -h ldap:// -d511 &
  > xxd packet
  0000000: ffff ff00 8441 4243 44                   .....ABCD
  > nc localhost 389 < packet
Comment 1 Josh Bressers 2008-06-30 13:53:21 EDT
Created attachment 310609 [details]
Patch from upstream CVE

This patch came from here:
Comment 2 Josh Bressers 2008-06-30 14:48:49 EDT
The testcase only crashes the Red Hat Enterprise Linux 4 and 5 versions of
openldap.  The 2.1 and 3 versions seem to handle this just fine.
Comment 5 Tomas Hoger 2008-07-02 04:43:41 EDT
Original upstream patch was reported to be broken:


Different patch applied upstream:

Comment 6 Fedora Update System 2008-07-02 23:15:29 EDT
openldap-2.3.39-4.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2008-07-02 23:17:16 EDT
openldap-2.4.8-6.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Red Hat Product Security 2008-07-21 06:15:35 EDT
This issue was addressed in:

Red Hat Enterprise Linux:


Comment 10 Tomas Hoger 2008-08-15 02:55:32 EDT
ZDI advisory related to this issue:


Note You need to log in before you can comment on or make changes to this bug.