Operational Defect Database

BugZero found this defect 2534 days ago.

MongoDB | 365675

[SERVER-28370] Prevent LDAP authorization crash when parsing null valued attributes

Last update date:

4/5/2017

Affected products:

MongoDB Server

Affected releases:

3.4.2

Fixed releases:

3.4.3

3.5.5

Description:

Info

RFC4511 allows LDAP searches to return empty attributes which have no values: 4.1.7. Attribute and PartialAttribute Attributes and partial attributes consist of an attribute description and attribute values. A PartialAttribute allows zero values, while Attribute requires at least one value. PartialAttribute ::= SEQUENCE { type AttributeDescription, vals SET OF value AttributeValue } 4.5.2. Search Result The results of the Search operation are returned as zero or more SearchResultEntry and/or SearchResultReference messages, followed by a single SearchResultDone message. SearchResultEntry ::= [APPLICATION 4] SEQUENCE { objectName LDAPDN, attributes PartialAttributeList } PartialAttributeList ::= SEQUENCE OF partialAttribute PartialAttribute SearchResultReference ::= [APPLICATION 19] SEQUENCE SIZE (1..MAX) OF uri URI SearchResultDone ::= [APPLICATION 5] LDAPResult Servers conforming to this specification do not need to return any values for a particular attribute. libldap appears to return a NULL pointer when ldap_get_values_len is called for an attribute without values, instead of an array containing a NULL pointer. libldap more commonly returns a NULL pointer on error. However, this condition is not considered an error, so no result code is set on the LDAP session handle. We should correctly handle this case.

Top User Comments

xgen-internal-githook commented on Fri, 17 Mar 2017 21:16:48 +0000: Author: {u'username': u'spencerjackson', u'name': u'Spencer Jackson', u'email': u'spencer.jackson@mongodb.com'} Message: SERVER-28370: Avoid crash when parsing null valued LDAP attributes (cherry picked from commit 37c0edb1a50590e7591412b1fcc308dd85348f24) Branch: v3.4 https://github.com/10gen/mongo-enterprise-modules/commit/ddbfcdc097d658293caabdf2506222c43803c51d xgen-internal-githook commented on Fri, 17 Mar 2017 19:37:38 +0000: Author: {u'username': u'spencerjackson', u'name': u'Spencer Jackson', u'email': u'spencer.jackson@mongodb.com'} Message: SERVER-28370: Avoid crash when parsing null valued LDAP attributes Branch: master https://github.com/10gen/mongo-enterprise-modules/commit/37c0edb1a50590e7591412b1fcc308dd85348f24

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...