CVE-2022-38023 docs-xml/smbdotconf: change 'reject md5 clients' default to yes
authorStefan Metzmacher <metze@samba.org>
Thu, 24 Nov 2022 17:26:18 +0000 (18:26 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 13 Dec 2022 13:07:29 +0000 (13:07 +0000)
AES is supported by Windows Server >= 2008R2, Windows (Client) >= 7 and Samba >= 4.0,
so there's no reason to allow md5 clients by default.
However some third party domain members may need it.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
docs-xml/smbdotconf/logon/rejectmd5clients.xml
lib/param/loadparm.c
selftest/target/Samba4.pm
source3/param/loadparm.c

index 0bb9f6f6c8ec333e96eec4c7704a5605bd2fbec4..edcbe02e99a3fb723173ab362441d59d75a51319 100644 (file)
@@ -7,11 +7,16 @@
        only in 'active directory domain controller' mode), will
        reject clients which does not support NETLOGON_NEG_SUPPORTS_AES.</para>
 
-       <para>You can set this to yes if all domain members support aes.
-       This will prevent downgrade attacks.</para>
+       <para>Support for NETLOGON_NEG_SUPPORTS_AES was added in Windows
+       starting with Server 2008R2 and Windows 7, it's available in Samba
+       starting with 4.0, however third party domain members like NetApp ONTAP
+       still uses RC4 (HMAC-MD5), see https://www.samba.org/samba/security/CVE-2022-38023.html for more details.</para>
+
+       <para>The default changed from 'no' to 'yes', with the patches for CVE-2022-38023,
+       see https://bugzilla.samba.org/show_bug.cgi?id=15240</para>
 
        <para>This option overrides the 'allow nt4 crypto' option.</para>
 </description>
 
-<value type="default">no</value>
+<value type="default">yes</value>
 </samba:parameter>
index 10157c95bc16a0c95c66d94006575d28549917ee..e509cf85bb89716865ec44f76da51f5a606dd9e7 100644 (file)
@@ -2729,6 +2729,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
        lpcfg_do_global_parameter(lp_ctx, "winbind nss info", "template");
 
        lpcfg_do_global_parameter(lp_ctx, "server schannel", "True");
+       lpcfg_do_global_parameter(lp_ctx, "reject md5 clients", "True");
 
        lpcfg_do_global_parameter(lp_ctx, "short preserve case", "True");
 
index 7c80630695b67532321a6bbe46f7ca14eb13b7cc..182b9f2fb26478d5bb1671ab077f27fd5ac4a65d 100755 (executable)
@@ -1622,6 +1622,8 @@ sub provision_ad_dc_ntvfs($$$)
        client min protocol = CORE
        server min protocol = LANMAN1
 
+       reject md5 clients = no
+
        CVE_2020_1472:warn_about_unused_debug_level = 3
        server require schannel:schannel0\$ = no
        server require schannel:schannel1\$ = no
@@ -1987,6 +1989,8 @@ sub provision_ad_dc($$$$$$$)
        lpq cache time = 0
        print notify backchannel = yes
 
+       reject md5 clients = no
+
        CVE_2020_1472:warn_about_unused_debug_level = 3
        server require schannel:schannel0\$ = no
        server require schannel:schannel1\$ = no
index 621b5b9f48c74b46a23458cbf9d246c34f2c3a1e..336852b927cbe9f43bdf86764dbc74236581355a 100644 (file)
@@ -666,6 +666,7 @@ static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
        Globals.require_strong_key = true;
        Globals.reject_md5_servers = true;
        Globals.server_schannel = true;
+       Globals.reject_md5_clients = true;
        Globals.read_raw = true;
        Globals.write_raw = true;
        Globals.null_passwords = false;