<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>96767</bug_id>
          
          <creation_ts>2005-06-22 03:11 0000</creation_ts>
          <short_desc>sys-auth/{pam_ldap|nss_ldap} not using tls for referred connections</short_desc>
          <delta_ts>2005-07-14 03:21:24 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Security</product>
          <component>Vulnerabilities</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <status_whiteboard>B3 [glsa]</status_whiteboard>
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>tigger@gentoo.org</reporter>
          <assigned_to>security@gentoo.org</assigned_to>
          <cc>lcars@gentoo.org</cc>
    
    <cc>pam-bugs@gentoo.org</cc>
    
    <cc>robbat2@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-06-22 03:11:43 0000</bug_when>
            <thetext>pam_ldap will send credentials in plaintext if a slave ldap server refers it to a master server during a password change operation. The ldap.conf &quot;ssl start_tls&quot; setting is not enforced on referrals (and openldap doesn&apos;t currently allow it due to a bug).

Worst case is that server admins are not enforcing tls server-side, in which case passwd will appear to work fine, but will be sending stuff over the wire in plaintext.

Two patches are needed to fix this, one for pam_ldap to request tls on referrals, and one for openldap to accept the request.

http://bugzilla.padl.com/show_bug.cgi?id=210

http://www.openldap.org/its/index.cgi/Incoming?id=3791</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-06-22 03:13:53 0000</bug_when>
            <thetext>setting upstream as fixes have been filed in the relevant bug systems.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-06-22 03:35:51 0000</bug_when>
            <thetext>Cleaning up :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-06-28 03:37:21 0000</bug_when>
            <thetext>Can we please being carrying this patch in the ebuilds? Upstream aren&apos;t
responding and this is a serious issue.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-06-28 03:54:45 0000</bug_when>
            <thetext>s/being/begin/ :)

adding robbat2 as this needs openldap lovin as well.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-06-29 13:25:13 0000</bug_when>
            <thetext>======================================================
Candidate: CAN-2005-2069
URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-2069
Reference: MISC:http://www.openldap.org/its/index.cgi/Incoming?id=3791
Reference: MISC:http://bugzilla.padl.com/show_bug.cgi?id=210
Reference:
CONFIRM:https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161990

pam_ldap and OpenLDAP, when connecting to a slave using TLS, does not
use TLS for the subsequent connection if the client is referred to a
master, which causes a password to be sent in cleartext and allows
remote attackers to sniff the password.
======================================================

Robin: please patch (or comment)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robbat2@gentoo.org</who>
            <bug_when>2005-07-03 11:55:47 0000</bug_when>
            <thetext>could security please check the code in nss_ldap as well, as it shares code 
with pam_ldap last I checked, and thus may be vulnerable to the same problem.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robbat2@gentoo.org</who>
            <bug_when>2005-07-03 12:10:56 0000</bug_when>
            <thetext>pam_ldap is patched now.
both 176-r1 and 178-r1 have the patch.
Could arches please test 178-r1, and if it works, stable it. If it doesn&apos;t 
work, try 176-r1 instead.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robbat2@gentoo.org</who>
            <bug_when>2005-07-03 12:16:08 0000</bug_when>
            <thetext>openldap is patched now.
2.1.30-r5 and 2.2.27-r1 have the patch.
2.1.30-r5 is the ebuild that should go stable. 
2.2.27-r1 (and the 2.2 series in general) will be considered for stable in 30 
days).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>flameeyes@gentoo.org</who>
            <bug_when>2005-07-03 12:16:29 0000</bug_when>
            <thetext>Updating the package name :) </thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dercorny@gentoo.org</who>
            <bug_when>2005-07-03 15:12:38 0000</bug_when>
            <thetext>Dear arches, please test sys-auth/pam_ldap-178-r1 and mark stable if possible
(if it fails, try 176-r1).
Please also try to mark openldap-2.1.30-r5 stable, thanks.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-07-03 15:41:10 0000</bug_when>
            <thetext>good call wrt nss_ldap. untested patch follows. if there are problems I&apos;ll try
to fix first thing tomorrow.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-07-03 15:42:11 0000</bug_when>
            <thetext>Created an attachment (id=62564)
tls patch for referrals for nss_ldap
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-07-04 02:09:02 0000</bug_when>
            <thetext>pam_ldap/nss_ldap ebuilds which have the tls problem fixed must DEPEND on
openldap ebuilds with the revelent library fix, otherwise they won&apos;t function.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lcars@gentoo.org</who>
            <bug_when>2005-07-04 03:41:37 0000</bug_when>
            <thetext>Well nss_ldap doesn&apos;t performs updates, so I don&apos;t think it&apos;s affected by this issue.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lcars@gentoo.org</who>
            <bug_when>2005-07-04 03:45:46 0000</bug_when>
            <thetext>Ok as rob pointed out referrals are used not only for updates but for subtrees as well...so ignore me ;)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-07-04 06:15:14 0000</bug_when>
            <thetext>lcars: any reason to clear our precious status whiteboard ?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>lcars@gentoo.org</who>
            <bug_when>2005-07-04 06:17:17 0000</bug_when>
            <thetext>Sorry :/ blame /usr/bin/links. I&apos;ll be more careful in the future (but honestly it
was impossible to spot without a post-commit review). links--</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>weeve@gentoo.org</who>
            <bug_when>2005-07-04 15:40:02 0000</bug_when>
            <thetext>pam_ldap-178-r1 and and openldap-2.1.30-r5 stable on sparc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-07-06 13:08:18 0000</bug_when>
            <thetext>Stable on ppc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robbat2@gentoo.org</who>
            <bug_when>2005-07-06 16:47:29 0000</bug_when>
            <thetext>ok, nss_ldap is patched as well now. Hopefully there is nothing else affected by
this bug. sorry about the delay.

arches:
please test nss_ldap-239-r1 first, but if that doesn&apos;t work, test 226-r1 instead.

sparc/ppc: sorry to bring you back, but ^^^^</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>corsair@gentoo.org</who>
            <bug_when>2005-07-07 03:37:04 0000</bug_when>
            <thetext>openldap-2.1.30-r5: stable on ppc64
pam_ldap-178-r1: was never marked ppc64 in any way -&gt; added ~ppc64
nss_ldap-239-r1: versions after 226 didn&apos;t compile, this one works again -&gt;
added ~ppc64

I&apos;ll mark those packages with ~ppc64 stable in 30 days, if no errors occur.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>weeve@gentoo.org</who>
            <bug_when>2005-07-09 05:48:19 0000</bug_when>
            <thetext>Stable on SPARC</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>blubb@gentoo.org</who>
            <bug_when>2005-07-11 05:03:44 0000</bug_when>
            <thetext>amd64 stable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-07-13 07:16:24 0000</bug_when>
            <thetext>GLSA is ready to go...

hppa,x86: please test and mark stable pam_ldap-178-r1 and nss_ldap-239-r1 (or
226-r1)

ppc: please test and mark stable nss_ldap-239-r1 (or 226-r1)

ppc64 : we&apos;ll need it for the GLSA before the 30 days period, as current stable
version is affected and the GLSA must go out. So please test and mark stable
nss_ldap-239-r1 if you can.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>hansmi@gentoo.org</who>
            <bug_when>2005-07-13 07:42:56 0000</bug_when>
            <thetext>Stable on hppa and ppc.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tigger@gentoo.org</who>
            <bug_when>2005-07-13 08:42:26 0000</bug_when>
            <thetext>stable on x86</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>corsair@gentoo.org</who>
            <bug_when>2005-07-13 13:24:28 0000</bug_when>
            <thetext>oh.. I didn&apos;t thought about that. nss_ldap-239-r1 is stable now on ppc64. sorry
for the delay...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-07-13 13:35:20 0000</bug_when>
            <thetext>Should be ready for GLSA</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>koon@gentoo.org</who>
            <bug_when>2005-07-14 03:21:24 0000</bug_when>
            <thetext>GLSA 200507-13
(Removed misc arches tat did not have those packages keyworded anyway)</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>62564</attachid>
            <date>2005-07-03 15:42 0000</date>
            <desc>tls patch for referrals for nss_ldap</desc>
            <filename>nss_ldap.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGxkYXAtbnNzLmMJMjAwNC0wOS0yOCAwMzoyMDoxMS4wMDAwMDAwMDAgKzAxMDAKKys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ZBSUw7CisJfQorICAgICAgZGVidWcgKCI8PT0gc3RhcnRfdGxzIik7Cisg
ICAgfQorI2VuZGlmIC8qIEhBVkVfTERBUF9TVEFSVF9UTFNfUyAqLworCiAgIHJldHVybiBkb19i
aW5kIChsZCwgdGltZWxpbWl0LCB3aG8sIGNyZWQsIHdpdGhfc2FzbCk7CiB9CiAjZWxzZQo=
</data>        

          </attachment>
    </bug>

</bugzilla>