RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2222250 - The trust relationship between this workstation and the primary domain failed
Summary: The trust relationship between this workstation and the primary domain failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba
Version: 7.9
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Andreas Schneider
QA Contact: Denis Karpelevich
URL:
Whiteboard:
Depends On:
Blocks: 2222883 2222884
TreeView+ depends on / blocked
 
Reported: 2023-07-12 12:09 UTC by bunkobugsy
Modified: 2023-12-28 04:25 UTC (History)
9 users (show)

Fixed In Version: samba-4.10.16-25.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2222883 2222884 (view as bug list)
Environment:
Last Closed: 2023-08-29 09:30:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
srv_netlog_nt.patch (712 bytes, patch)
2023-07-14 06:19 UTC, bunkobugsy
no flags Details | Diff
dcerpc_netlogon.patch (701 bytes, patch)
2023-07-14 06:20 UTC, bunkobugsy
no flags Details | Diff
correct patch built and tested for samba-4.10.16-24.el7_9.src.rpm (1.68 KB, patch)
2023-07-17 06:08 UTC, bunkobugsy
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-162108 0 None None None 2023-07-12 12:13:14 UTC
Red Hat Issue Tracker SSSD-6431 0 None None None 2023-07-14 10:12:48 UTC
Red Hat Product Errata RHBA-2023:4823 0 None None None 2023-08-29 09:30:58 UTC
Samba Project 15418 0 None None None 2023-07-14 09:53:53 UTC

Description bunkobugsy 2023-07-12 12:09:49 UTC
Description of problem:

"The trust relationship between this workstation and the primary domain failed." on domain logon or net connect to Windows 10/11 PDC joined workstations since July 2023 updates KB5028166 / KB5028185

https://support.microsoft.com/en-us/topic/kb5021130-how-to-manage-the-netlogon-protocol-changes-related-to-cve-2022-38023-46ea3067-3989-4d40-963c-680fd9e8ee25#timing5021130

Version-Release number of selected component (if applicable): samba-4.10.16-24.el7_9.x86_64

How reproducible: every time


Steps to Reproduce:
1. apply KB5028166 / KB5028185 on Windows 10/11
2. restart Windows 10/11
3. try to login with domain user

Actual results: 

Error message: "The trust relationship between this workstation and the primary domain failed."

Expected results: Successful login of domain user.

Additional info: No connection to PDC will let user login for now.

Samba log shows:
rpc_server/netlogon/srv_netlog_nt.c:976(_netr_ServerAuthenticate3)
  _netr_ServerAuthenticate3: netlogon_creds_server_check failed. Rejecting auth request from client PC machine account PC$
rpc_server/srv_pipe.c:1925(api_rpcTNP)
  api_rpcTNP: \netlogon: NETR_LOGONGETCAPABILITIES failed.

Comment 4 bunkobugsy 2023-07-13 06:52:15 UTC
https://bugzilla.samba.org/show_bug.cgi?id=15418#c3

Actually this might be CVE-2023-21526  Windows Netlogon Information Disclosure Vulnerability

For now only solution seems to be removing and blocking KB5028166 (Win10) or KB5028185 (Win11)

Comment 5 bunkobugsy 2023-07-14 05:23:21 UTC
There’s a patch available that seems to work https://bugzilla.samba.org/show_bug.cgi?id=15418#c25
https://cpaste.org/?df0494cac0063e2e#Cx69G684EBPQ71S6sAUVXSYburgV6gPyKHfPSbfmHZPJ

 source3/rpc_server/netlogon/srv_netlog_nt.c   | 9 +++++----
 source4/rpc_server/netlogon/dcerpc_netlogon.c | 8 ++++----
 2 files changed, 9 insertions(+), 8 deletions(-)
 
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index 3ba58e61206f..2018dc28eb67 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -2284,6 +2284,11 @@ NTSTATUS _netr_LogonGetCapabilities(struct pipes_struct *p,
 	struct netlogon_creds_CredentialState *creds;
 	NTSTATUS status;
 
+	if (r->in.query_level != 1) {
+		p->fault_state = DCERPC_NCA_S_FAULT_INVALID_TAG;
+		return NT_STATUS_NOT_SUPPORTED;
+	}
+
 	become_root();
 	status = dcesrv_netr_creds_server_step_check(p->dce_call,
 						p->mem_ctx,
@@ -2296,10 +2301,6 @@ NTSTATUS _netr_LogonGetCapabilities(struct pipes_struct *p,
 		return status;
 	}
 
-	if (r->in.query_level != 1) {
-		return NT_STATUS_NOT_SUPPORTED;
-	}
-
 	r->out.capabilities->server_capabilities = creds->negotiate_flags;
 
 	return NT_STATUS_OK;
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 6ccba65d3bf0..c869a6d3c791 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -2364,6 +2364,10 @@ static NTSTATUS dcesrv_netr_LogonGetCapabilities(struct dcesrv_call_state *dce_c
 	struct netlogon_creds_CredentialState *creds;
 	NTSTATUS status;
 
+	if (r->in.query_level != 1) {
+		DCESRV_FAULT(DCERPC_NCA_S_FAULT_INVALID_TAG);
+	}
+
 	status = dcesrv_netr_creds_server_step_check(dce_call,
 						     mem_ctx,
 						     r->in.computer_name,
@@ -2375,10 +2379,6 @@ static NTSTATUS dcesrv_netr_LogonGetCapabilities(struct dcesrv_call_state *dce_c
 	}
 	NT_STATUS_NOT_OK_RETURN(status);
 
-	if (r->in.query_level != 1) {
-		return NT_STATUS_NOT_SUPPORTED;
-	}
-
 	r->out.capabilities->server_capabilities = creds->negotiate_flags;
 
 	return NT_STATUS_OK;

Comment 6 bunkobugsy 2023-07-14 06:19:52 UTC
Created attachment 1975683 [details]
srv_netlog_nt.patch

srv_netlog_nt.patch for samba-4.10.16-24.el7_9.src.rpm

Comment 7 bunkobugsy 2023-07-14 06:20:43 UTC
Created attachment 1975684 [details]
dcerpc_netlogon.patch

dcerpc_netlogon.patch for samba-4.10.16-24.el7_9.src.rpm

Comment 10 bunkobugsy 2023-07-17 06:08:40 UTC
Created attachment 1976122 [details]
correct patch built and tested for samba-4.10.16-24.el7_9.src.rpm

Comment 17 errata-xmlrpc 2023-08-29 09:30:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (samba bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:4823

Comment 18 Red Hat Bugzilla 2023-12-28 04:25:08 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.