Issue 7373 - [PATCH] TLS: do not reuse tls_session if hostname check fails
Summary: [PATCH] TLS: do not reuse tls_session if hostname check fails
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-28 15:57 UTC by jvcelak@redhat.com
Modified: 2018-03-22 19:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jvcelak@redhat.com 2012-08-28 15:57:04 UTC
Full_Name: Jan Vcelak
Version: git master
OS: Linux
URL: ftp://ftp.openldap.org/incoming/jvcelak-20120828-tls-do-not-reuse-tls_session-if-hostname-check-fails.patch
Submission from: (NULL) (209.132.186.34)


If multiple URIs are specified when creating LDAP connection, the connection to
the first one succeeds but the hostname verification fails, *tls_session is not
dropped, but reused when connecting to the second server.

This is a problem with Mozilla NSS backend because another handshake cannot be
performed on the same file descriptor and SSL_ForceHandshake() will hang. From
this reason, hostname checking was moved into ldap_int_tls_connect() before
connection error handling.

I have verified for all backends (OpenSSL, GnuTLS, MoznSSS) that this fix does
not break hostname verification and that this bug does not present.

Original report: https://bugzilla.redhat.com/show_bug.cgi?id=843056


The attached file is derived from OpenLDAP Software. All of the modifications to
OpenLDAP Software represented in the following patch(es) were developed by Red
Hat. Red Hat has not assigned rights and/or interest in this work to any party.
I, Jan Vcelak am authorized by Red Hat, my employer, to release this work under
the following terms. 

Red Hat hereby place the following modifications to OpenLDAP Software (and only
these modifications) into the public domain. Hence, these modifications may be
freely used and/or redistributed for any purpose with or without attribution
and/or other notice. 
Comment 1 jvcelak@redhat.com 2012-08-28 16:09:16 UTC
> Original report: https://bugzilla.redhat.com/show_bug.cgi?id=843056

Sorry, correct one: https://bugzilla.redhat.com/show_bug.cgi?id=852476

Comment 2 Quanah Gibson-Mount 2017-04-03 18:05:34 UTC
moved from Incoming to Software Bugs
Comment 3 Quanah Gibson-Mount 2017-08-30 21:04:30 UTC
changed notes
Comment 4 Quanah Gibson-Mount 2017-09-07 00:08:54 UTC
changed notes
Comment 5 Quanah Gibson-Mount 2017-09-07 16:39:53 UTC
changed notes
Comment 6 Quanah Gibson-Mount 2017-10-06 17:54:40 UTC
changed notes
changed state Open to Test
Comment 7 Quanah Gibson-Mount 2017-10-11 19:34:20 UTC
changed notes
changed state Test to Release
Comment 8 OpenLDAP project 2018-03-22 19:24:46 UTC
fixed in master
fixed in RE24 (2.4.46)
Comment 9 Quanah Gibson-Mount 2018-03-22 19:24:46 UTC
changed notes
changed state Release to Closed