]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2022-32743 s4:rpc_server/netlogon: Always observe NETR_WS_FLAG_HANDLES_SPN_UPDATE...
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 7 Jun 2022 05:25:28 +0000 (17:25 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 28 Jul 2022 22:47:37 +0000 (22:47 +0000)
Even when there is no old DNS hostname present.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
selftest/knownfail.d/netlogon-dns-host-name
source4/rpc_server/netlogon/dcerpc_netlogon.c

index d6a8aa27803c961b8abe18eea60dd4d1fb900b02..30c157fb8d37596a3cc31735704d514b6a922a20 100644 (file)
@@ -1,7 +1,6 @@
 ^samba.tests.py_credentials.samba.tests.py_credentials.PyCredentialsTests.test_set_dns_hostname_invalid_suffix\(
 ^samba.tests.py_credentials.samba.tests.py_credentials.PyCredentialsTests.test_set_dns_hostname_invalid_validated_write\(
 ^samba.tests.py_credentials.samba.tests.py_credentials.PyCredentialsTests.test_set_dns_hostname_invalid_write_property\(
-^samba.tests.py_credentials.samba.tests.py_credentials.PyCredentialsTests.test_set_dns_hostname_with_flag\(
 ^samba4.rpc.netlogon on ncacn_ip_tcp with bigendian.netlogon.GetDomainInfo\(
 ^samba4.rpc.netlogon on ncacn_ip_tcp with seal,padcheck.netlogon.GetDomainInfo\(
 ^samba4.rpc.netlogon on ncacn_ip_tcp with validate.netlogon.GetDomainInfo\(
index 2d5fc8b070bf953a056894999756b03edbb5b66f..efba013883818bd9d8598f9b220decfbaa33148b 100644 (file)
@@ -2495,13 +2495,10 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
                /*
                 * Updates the DNS hostname when the client wishes that the
                 * server should handle this for him
-                * ("NETR_WS_FLAG_HANDLES_SPN_UPDATE" not set). And this is
-                * obviously only checked when we do already have a
-                * "dNSHostName".
+                * ("NETR_WS_FLAG_HANDLES_SPN_UPDATE" not set).
                 * See MS-NRPC section 3.5.4.3.9
                 */
-               if ((old_dns_hostname != NULL) &&
-                   (r->in.query->workstation_info->workstation_flags
+               if ((r->in.query->workstation_info->workstation_flags
                    & NETR_WS_FLAG_HANDLES_SPN_UPDATE) != 0) {
                        update_dns_hostname = false;
                }