First published: Tue Jun 14 2016(Updated: )
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 "$CERTDB_DIR" -f "$PASSWORD_FILE" -z "$CERT_RANDOM" \ -S -x -n "$CERT_NAME" \ -s "CN=$HOSTNAME_FQDN" \ -t TC,, \password -k $CERT_KEY_TYPE -g $CERT_KEY_SIZE \ -v $CERT_VALID_MONTHS \ -8 "$ALT_NAMES" \ &>/dev/null rm -f $CERT_RANDOM # tune permissions if [ "$(id -u)" -eq 0 ]; then chgrp ldap "$PASSWORD_FILE" chmod g+r "$PASSWORD_FILE" 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: <a href="https://fedorahosted.org/fpc/ticket/506">https://fedorahosted.org/fpc/ticket/506</a> The recommended resolution for services is to follow the "First-time Service Setup" pattern (see: <a href="https://fedoraproject.org/wiki/Packaging:Initial_Service_Setup">https://fedoraproject.org/wiki/Packaging:Initial_Service_Setup</a> ). Other packages may should use a runtime check and generation or similar procedure.
Affected Software | Affected Version | How to fix |
---|---|---|
Red Hat OpenLDAP Servers |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
REDHAT-BUG-1346120 has been classified as a medium severity vulnerability.
To fix REDHAT-BUG-1346120, ensure that your OpenLDAP server is updated to the latest version where this bug has been addressed.
The impact of REDHAT-BUG-1346120 involves potential security risks associated with unsafe password file creation during installation.
REDHAT-BUG-1346120 affects systems running the OpenLDAP servers package from Red Hat.
Yes, if exploited, REDHAT-BUG-1346120 could potentially lead to unauthorized access and data breaches.