CVE-2016-4984: Race Condition

Published Jun 14, 2016
·
Updated

/usr/libexec/openldap/generate-server-cert.sh in openldap-servers sets weak permissions for the TLS certificate, which allows local users to obtain the TLS certificate by leveraging a race condition between the creation of the certificate, and the chmod to protect it.

Other sources

The openldap-servers rpm creates the password file using the following rpm postinstall called script:

generate sample TLS certificate for server (will not replace) /usr/libexec/openldap/generate-server-cert.sh -o &>/dev/null || :

the script in turn creates the file unsafely and changes the permissions after creating it:

certutil -d "$CERTDBDIR" -f "$PASSWORDFILE" -z "$CERTRANDOM" \ -S -x -n "$CERTNAME" \ -s "CN=$HOSTNAMEFQDN" \ -t TC,, \password -k $CERTKEYTYPE -g $CERTKEYSIZE \ -v $CERTVALIDMONTHS \ -8 "$ALTNAMES" \ &>/dev/null

rm -f $CERTRANDOM

tune permissions

if [ "$(id -u)" -eq 0 ]; then chgrp ldap "$PASSWORDFILE" chmod g+r "$PASSWORDFILE" else printf "WARNING: The server requires read permissions on the password file in order to\n" >&2 printf " load it's private key from the certificate database.\n" >&2 fi

this can lead to the contents of the file being exposed between the time the file is created and the chmod command runs. I would suggest setting umask 077 first.

Additionally this secret value needs to be unique per instance or install but this value is created at install-time and not during the first run. All container and image instances created would share the same password as this password is set at rpm install time, and each instance should recieve a unique password.

This bug is being file because Product Security considers "first run problems" to be bugs with the source package and with the container or image only in the aggregate. This view is in collaboration with upstream Fedora. See: https://fedorahosted.org/fpc/ticket/506

The recommended resolution for services is to follow the "First-time Service Setup" pattern (see: https://fedoraproject.org/wiki/Packaging:InitialServiceSetup ). Other packages may should use a runtime check and generation or similar procedure.

Red Hat

Affected Software

4 affected components
openldap openldap-servers
redhat Enterprise Linux=5
redhat Enterprise Linux=6.0
redhat Enterprise Linux=7.0

Event History

Jun 14, 2016
Data Sourced
via Red Hat·03:38 AM
DescriptionSeverityAffected Software
Jul 14, 2017
CVE Published
via MITRE·08:00 PM
Data Sourced
via MITRE·08:00 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2016-4984?

CVE-2016-4984 is classified with a low severity rating, indicating that while it poses a risk, it requires specific circumstances to be exploited.

2

How do I fix CVE-2016-4984?

To remediate CVE-2016-4984, ensure that proper permissions are set on the TLS certificate file to prevent unauthorized access.

3

Which versions of OpenLDAP are affected by CVE-2016-4984?

CVE-2016-4984 affects the OpenLDAP servers package prior to the remediation updates that enforce stronger permissions for TLS certificates.

4

Can local users exploit CVE-2016-4984?

Yes, local users can exploit CVE-2016-4984 by leveraging a race condition to access the TLS certificate due to weak permission settings.

5

What is the nature of the vulnerability in CVE-2016-4984?

CVE-2016-4984 involves a race condition during the certificate creation process that allows local users to access the TLS certificate insecurely.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203