Fix authentication with FreeRDP 3.32

FreeRDP 3.32 enables FreeRDP_ExtSecurity by default. KRDP explicitly selects TLS or NLA depending on the authentication mode, but does not currently configure extended security.

With FreeRDP 3.32.1, this allows PROTOCOL_HYBRID_EX to be selected for PAM/system-user authentication. Authentication then enters CredSSP/NTLM before KRDP's PAM authentication and fails because there is no corresponding user in the SAM database.

The resulting errors include:

[ERROR][com.winpr.sspi.NTLM] - [ntlm_fetch_ntlm_v2_hash]: Error: Could not find user in SAM database
[WARN][com.winpr.sspi] - [winpr_AcceptSecurityContext]: AcceptSecurityContext status SEC_E_NO_CREDENTIALS [0x8009030e]
[ERROR][com.freerdp.core.auth] - [credssp_auth_authenticate]: AcceptSecurityContext status SEC_E_NO_CREDENTIALS [0x8009030e]
[ERROR][com.freerdp.core.transport] - [transport_accept_nla]: client authentication failure

Disable FreeRDP_ExtSecurity for PAM authentication so that KRDP's existing TLS/PAM authentication path is used, while leaving extended security enabled for the SAM-backed NLA path used by KRDP-managed users.

Reproduction

Tested with KRDP 6.7.5 and FreeRDP 3.32.1:

  • A normal Windows Remote Desktop (MSTSC) connection using system-user authentication fails with the errors above when FreeRDP_ExtSecurity is left at its new default.
  • A FreeRDP client forced to /sec:tls successfully authenticates the same system user.
  • With FreeRDP_ExtSecurity disabled for PAM/system-user authentication, an ordinary Windows Remote Desktop client successfully authenticates the system user.
  • With FreeRDP_ExtSecurity enabled for KRDP-managed/SAM authentication, an ordinary Windows Remote Desktop client successfully authenticates a KRDP-managed user.
  • Incorrect passwords are rejected for both the PAM/system-user and KRDP-managed/SAM authentication paths.

Current master still leaves FreeRDP_ExtSecurity unspecified. I was unable to runtime-test current master on the same system because it requires newer KPipeWire APIs than Plasma 6.7.5 provides. The runtime authentication tests were performed against KRDP 6.7.5.

Edited by Ben Marshall

Merge request reports

Loading
Loading