CVE-2010-0211: Double Free
A vulnerability was found in OpenLDAP during the processing of a modrdn call with a specially crafted destination rdn string. An unauthenticated user could cause slapd to segfault or abort.
Quoting the report:
In the function modrdn.c:386:slapmodrdn2mods() a call is made to 448:desc->adtype->satequality->smrnormalize() without checking its return value. In this case the call fails and leaves modtmp->smlnvalues uninitialized which leads to an invalid free() later in modrdn.c:202:slapmodsfree(). The breakdown of smrnormalize() is caused by invalid UTF-8 sequences, which are passed to the software via hex-formatted strings. It could be possible to insert and execute malicious code by careful manipulation of the program state prior to triggering the vulnerability. At least with a vanilla compilation of 2.4.22 it proved possible to freely control the invalid pointer being freed. For example, the following kind of log message is produced:
glibc detected /usr/sbin/slapd: double free or corruption (out): 0x002ce400
This has been reportedly tested against upstream 2.4.22 as well as 2.4.11 (Debian) and 2.4.21 (Ubuntu).
Acknowledgements:
Red Hat would like to thank CERT-FI for responsibly reporting this flaw, who credit Ilkka Mattila and Tuomas Salomäki for the discovery of the issue.
Other sources
The slapmodrdn2mods function in modrdn.c in OpenLDAP 2.4.22 does not check the return value of a call to the smrnormalize function, which allows remote attackers to cause a denial of service (segmentation fault) and possibly execute arbitrary code via a modrdn call with an RDN string containing invalid UTF-8 sequences, which triggers a free of an invalid, uninitialized pointer in the slapmodsfree function, as demonstrated using the Codenomicon LDAPv3 test suite.
— MITRE
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2010-0211?
CVE-2010-0211 has a severity rating that indicates it can lead to a denial of service and possibly arbitrary code execution.
How do I fix CVE-2010-0211?
To fix CVE-2010-0211, you should upgrade OpenLDAP to a version that has patched this vulnerability.
What software is affected by CVE-2010-0211?
CVE-2010-0211 affects OpenLDAP 2.4.22, VMware ESXi 4.0 and 4.1, and macOS between versions 10.6.0 and 10.6.5.
Can CVE-2010-0211 be exploited remotely?
Yes, CVE-2010-0211 can be exploited by remote attackers using a specific modrdn call.
Is the exploitation of CVE-2010-0211 easy?
The exploitation of CVE-2010-0211 may not be trivial, but it poses a significant risk of denial of service.