CVE-2023-0922 set default ldap client sasl wrapping to seal
authorRob van der Linde <rob@catalyst.net.nz>
Mon, 27 Feb 2023 01:06:23 +0000 (14:06 +1300)
committerJule Anger <janger@samba.org>
Mon, 20 Mar 2023 09:04:44 +0000 (10:04 +0100)
This avoids sending new or reset passwords in the clear
(integrity protected only) from samba-tool in particular.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15315

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
docs-xml/smbdotconf/ldap/clientldapsaslwrapping.xml
lib/param/loadparm.c
python/samba/tests/auth_log.py
source3/param/loadparm.c

index 3152f0682ddd189b29dc040c83c92628cc497d2f..21bd209005774518f8939ae422d1bdd00c4a6feb 100644 (file)
        </para>
        
        <para>
-       This option is needed in the case of Domain Controllers enforcing 
-       the usage of signed LDAP connections (e.g. Windows 2000 SP3 or higher).
-       LDAP sign and seal can be controlled with the registry key
-       "<literal>HKLM\System\CurrentControlSet\Services\</literal>
-       <literal>NTDS\Parameters\LDAPServerIntegrity</literal>"
-       on the Windows server side.  
-       </para>
+       This option is needed firstly to secure the privacy of
+       administrative connections from <command>samba-tool</command>,
+       including in particular new or reset passwords for users. For
+       this reason the default is <emphasis>seal</emphasis>.</para>
 
-       <para>
-       Depending on the used KRB5 library (MIT and older Heimdal versions)
-       it is possible that the message "integrity only" is not supported. 
-       In this case, <emphasis>sign</emphasis> is just an alias for 
-       <emphasis>seal</emphasis>.
+       <para>Additionally, <command>winbindd</command> and the
+       <command>net</command> tool can use LDAP to communicate with
+       Domain Controllers, so this option also controls the level of
+       privacy for those connections.  All supported AD DC versions
+       will enforce the usage of at least signed LDAP connections by
+       default, so a value of at least <emphasis>sign</emphasis> is
+       required in practice.
        </para>
 
        <para>
-       The default value is <emphasis>sign</emphasis>. That implies synchronizing the time
+       The default value is <emphasis>seal</emphasis>. That implies synchronizing the time
        with the KDC in the case of using <emphasis>Kerberos</emphasis>.
        </para>
 </description>
-<value type="default">sign</value>
+<value type="default">seal</value>
 </samba:parameter>
index d47b37fa632928087885af118e22cfc223a81f3b..02dd602de7a0c1d586263094d857ad94d05c6aa0 100644 (file)
@@ -2988,7 +2988,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
 
        lpcfg_do_global_parameter(lp_ctx, "ldap debug threshold", "10");
 
-       lpcfg_do_global_parameter(lp_ctx, "client ldap sasl wrapping", "sign");
+       lpcfg_do_global_parameter(lp_ctx, "client ldap sasl wrapping", "seal");
 
        lpcfg_do_global_parameter(lp_ctx, "mdns name", "netbios");
 
index 9949b0abe4de04bd7931ee424938d1d337e3ed7d..b0f4840563d70a583c6c7451dba975e36316c640 100644 (file)
@@ -470,7 +470,7 @@ class AuthLogTests(samba.tests.auth_log_base.AuthLogTestBase):
         def isLastExpectedMessage(msg):
             return (msg["type"] == "Authorization" and
                     msg["Authorization"]["serviceDescription"] == "LDAP" and
-                    msg["Authorization"]["transportProtection"] == "SIGN" and
+                    msg["Authorization"]["transportProtection"] == "SEAL" and
                     msg["Authorization"]["authType"] == "krb5")
 
         self.samdb = SamDB(url="ldap://%s" % os.environ["SERVER"],
index 1cdfbb702762ec9b90a7eb973cdd0473e053d394..39cf3af8dd65032ff1a68aa60f5fdad6b0a97dc6 100644 (file)
@@ -753,7 +753,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
        Globals.ldap_debug_level = 0;
        Globals.ldap_debug_threshold = 10;
 
-       Globals.client_ldap_sasl_wrapping = ADS_AUTH_SASL_SIGN;
+       Globals.client_ldap_sasl_wrapping = ADS_AUTH_SASL_SEAL;
 
        Globals.ldap_server_require_strong_auth =
                LDAP_SERVER_REQUIRE_STRONG_AUTH_YES;