Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xfreerdp (on Linux) crashes immediately on connection to a Windows 10 RDP server #6604

Closed
berolinux opened this issue Nov 24, 2020 · 8 comments · Fixed by #7210
Closed

xfreerdp (on Linux) crashes immediately on connection to a Windows 10 RDP server #6604

berolinux opened this issue Nov 24, 2020 · 8 comments · Fixed by #7210

Comments

@berolinux
Copy link

Describe the bug
xfreerdp on Linux crashes immediately on connection to a Windows 10 RDP server, after confirming the SSL certificate

To Reproduce
run:
xfreerdp /u:DOMAIN\USERNAME /p:PASSWORD /v:IPv4.address.of.server

Result:
[22:35:13:356] [1575203:1575204] [INFO][com.freerdp.core] - freerdp_connect:freerdp_set_last_error_ex resetting error state
[22:35:13:356] [1575203:1575204] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpdr
[22:35:13:356] [1575203:1575204] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpsnd
[22:35:13:356] [1575203:1575204] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
[22:35:14:704] [1575203:1575204] [INFO][com.freerdp.primitives] - primitives autodetect, using optimized
[22:35:14:707] [1575203:1575204] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[22:35:14:707] [1575203:1575204] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[22:35:17:776] [1575203:1575204] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[22:35:17:776] [1575203:1575204] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[22:35:17:781] [1575203:1575204] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[22:35:17:781] [1575203:1575204] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[22:35:32:131] [1575203:1575204] [WARN][com.freerdp.crypto] - Certificate verification failure 'self-signed certificate (18)' at stack position 0
[22:35:32:131] [1575203:1575204] [WARN][com.freerdp.crypto] - CN = HOSTNAME.DOMAIN.COMPANY.COM
[22:35:32:131] [1575203:1575204] [ERROR][com.freerdp.crypto] - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[22:35:32:131] [1575203:1575204] [ERROR][com.freerdp.crypto] - @ WARNING: CERTIFICATE NAME MISMATCH! @
[22:35:32:131] [1575203:1575204] [ERROR][com.freerdp.crypto] - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[22:35:32:131] [1575203:1575204] [ERROR][com.freerdp.crypto] - The hostname used for this connection (192.168.2.130:3389)
[22:35:32:131] [1575203:1575204] [ERROR][com.freerdp.crypto] - does not match the name given in the certificate:
[22:35:32:131] [1575203:1575204] [ERROR][com.freerdp.crypto] - Common Name (CN):
[22:35:32:131] [1575203:1575204] [ERROR][com.freerdp.crypto] - HOSTNAME.DOMAIN.COMPANY.COM
[22:35:32:132] [1575203:1575204] [ERROR][com.freerdp.crypto] - A valid certificate for the wrong name should NOT be trusted!
Certificate details for 192.168.2.130:3389 (RDP-Server):
Common Name: HOSTNAME.DOMAIN.COMPANY.COM
Subject: CN = HOSTNAME.DOMAIN.COMPANY.COM
Issuer: CN = HOSTNAME.DOMAIN.COMPANY.COM
Thumbprint: ec:82:1b:cc:40:b2:af:14:06:5f:87:96:d9:ae:aa:87:4b:ca:b2:84:2d:e2:f2:a5:63:51:2a:55:f1:e2:93:78
The above X.509 certificate could not be verified, possibly because you do not have
the CA certificate in your certificate store, or the certificate has expired.
Please look at the OpenSSL documentation on how to add a private CA to the store.
Do you trust the above certificate? (Y/T/N) y
[22:35:57:933] [1575203:1575204] [INFO][com.freerdp.utils] - Caught signal 'Segmentation fault' [11]
Segmentation fault (core dumped)

Backtrace:
#0 0x00007ffff738db10 in EVP_CIPHER_CTX_set_key_length () from /usr/lib64/libcrypto.so.3
#1 0x00007ffff79b7474 in ntlm_encrypt_random_session_key () from /usr/lib64/libwinpr2.so.2
#2 0x00007ffff79b8764 in ntlm_read_ChallengeMessage () from /usr/lib64/libwinpr2.so.2
#3 0x00007ffff79bc56a in ntlm_InitializeSecurityContextW () from /usr/lib64/libwinpr2.so.2
#4 0x00007ffff79ba859 in ntlm_InitializeSecurityContextA () from /usr/lib64/libwinpr2.so.2
#5 0x00007ffff79bd3dc in negotiate_InitializeSecurityContextA () from /usr/lib64/libwinpr2.so.2
#6 0x00007ffff79c45d3 in winpr_InitializeSecurityContextA () from /usr/lib64/libwinpr2.so.2
#7 0x00007ffff7c1f31b in nla_recv_pdu () from /usr/lib64/libfreerdp2.so.2
#8 0x00007ffff7c5764d in rdp_recv_callback () from /usr/lib64/libfreerdp2.so.2
#9 0x00007ffff7c5e1c8 in rdp_check_fds () from /usr/lib64/libfreerdp2.so.2
#10 0x00007ffff7c4b918 in rdp_client_connect () from /usr/lib64/libfreerdp2.so.2
#11 0x00007ffff7c3c6b5 in freerdp_connect () from /usr/lib64/libfreerdp2.so.2
#12 0x0000000000226140 in xf_client_thread ()
#13 0x00007ffff79b1f85 in thread_launcher () from /usr/lib64/libwinpr2.so.2
#14 0x00007ffff76840a9 in start_thread () from /lib64/libpthread.so.0
#15 0x00007ffff77ea8cf in clone () from /lib64/libc.so.6

Expected behavior
Connection works

Application details

  • FreeRDP version
    2.2.0
  • Output of xfreerdp /buildconfig
    This is FreeRDP version 2.2.0 (n/a)
    Build configuration: BUILD_TESTING=OFF BUILTIN_CHANNELS=OFF HAVE_AIO_H=1 HAVE_EXECINFO_H=1 HAVE_FCNTL_H=1 HAVE_GETLOGIN_R=1 HAVE_INTTYPES_H=1 HAVE_JOURNALD_H=TRUE HAVE_MATH_C99_LONG_DOUBLE=1 HAVE_POLL_H=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK=ON HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL= HAVE_SYSLOG_H=1 HAVE_SYS_EVENTFD_H=1 HAVE_SYS_FILIO_H= HAVE_SYS_MODEM_H= HAVE_SYS_SELECT_H=1 HAVE_SYS_SOCKIO_H= HAVE_SYS_STRTIO_H= HAVE_SYS_TIMERFD_H=1 HAVE_TM_GMTOFF=1 HAVE_UNISTD_H=1 HAVE_XI_TOUCH_CLASS=1 WITH_ALSA=ON WITH_CAIRO=OFF WITH_CCACHE=ON WITH_CHANNELS=ON WITH_CLANG_FORMAT=ON WITH_CLIENT=ON WITH_CLIENT_AVAILABLE=1 WITH_CLIENT_CHANNELS=ON WITH_CLIENT_CHANNELS_AVAILABLE=1 WITH_CLIENT_COMMON=ON WITH_CLIENT_INTERFACE=OFF WITH_CUPS=ON WITH_DEBUG_ALL=OFF WITH_DEBUG_CAPABILITIES=OFF WITH_DEBUG_CERTIFICATE=OFF WITH_DEBUG_CHANNELS=OFF WITH_DEBUG_CLIPRDR=OFF WITH_DEBUG_DVC=OFF WITH_DEBUG_KBD=OFF WITH_DEBUG_LICENSE=OFF WITH_DEBUG_MUTEX=OFF WITH_DEBUG_NEGO=OFF WITH_DEBUG_NLA=OFF WITH_DEBUG_NTLM=OFF WITH_DEBUG_RAIL=OFF WITH_DEBUG_RDP=OFF WITH_DEBUG_RDPDR=OFF WITH_DEBUG_RDPEI=OFF WITH_DEBUG_RDPGFX=OFF WITH_DEBUG_REDIR=OFF WITH_DEBUG_RFX=OFF WITH_DEBUG_RINGBUFFER=OFF WITH_DEBUG_SCARD=OFF WITH_DEBUG_SND=OFF WITH_DEBUG_SVC=OFF WITH_DEBUG_SYMBOLS=OFF WITH_DEBUG_THREADS=OFF WITH_DEBUG_TIMEZONE=OFF WITH_DEBUG_TRANSPORT=OFF WITH_DEBUG_TSG=OFF WITH_DEBUG_TSMF=OFF WITH_DEBUG_TSMF=OFF WITH_DEBUG_TSMF_AVAILABLE=0 WITH_DEBUG_URBDRC=OFF WITH_DEBUG_WND=OFF WITH_DEBUG_X11=OFF WITH_DEBUG_X11_CLIPRDR=OFF WITH_DEBUG_X11_LOCAL_MOVESIZE=OFF WITH_DEBUG_XV=OFF WITH_DIRECTFB=OFF WITH_DSP_EXPERIMENTAL=OFF WITH_DSP_FFMPEG=OFF WITH_EVENTFD_READ_WRITE=1 WITH_FAAC=OFF WITH_FAAD2=OFF WITH_FFMPEG=TRUE WITH_FFMPEG=TRUE WITH_GFX_H264=ON WITH_GPROF=OFF WITH_GSM=ON WITH_GSSAPI=OFF WITH_GSTREAMER_0_10=OFF WITH_GSTREAMER_1_0=ON WITH_ICU=ON WITH_IPP=OFF WITH_JPEG=ON WITH_LAME=OFF WITH_LIBRARY_VERSIONING=ON WITH_LIBSYSTEMD=ON WITH_MACAUDIO=OFF WITH_MACAUDIO=OFF WITH_MACAUDIO_AVAILABLE=0 WITH_MANPAGES=ON WITH_MBEDTLS=OFF WITH_OPENCL=OFF WITH_OPENH264=OFF WITH_OPENSLES=OFF WITH_OPENSSL=ON WITH_OSS=ON WITH_PAM=ON WITH_PCSC=ON WITH_PROFILER=OFF WITH_PROXY=ON WITH_PROXY_MODULES=OFF WITH_PULSE=ON WITH_SAMPLE=OFF WITH_SANITIZE_ADDRESS=OFF WITH_SANITIZE_ADDRESS_AVAILABLE=1 WITH_SANITIZE_MEMORY=OFF WITH_SANITIZE_MEMORY_AVAILABLE=1 WITH_SANITIZE_THREAD=OFF WITH_SANITIZE_THREAD_AVAILABLE=1 WITH_SERVER=ON WITH_SERVER_CHANNELS=ON WITH_SERVER_INTERFACE=ON WITH_SHADOW=ON WITH_SHADOW_MAC=ON WITH_SHADOW_X11=ON WITH_SMARTCARD_INSPECT=OFF WITH_SOXR=OFF WITH_SSE2=ON WITH_SWSCALE=OFF WITH_THIRD_PARTY=OFF WITH_VAAPI=OFF WITH_VALGRIND_MEMCHECK=OFF WITH_VALGRIND_MEMCHECK_AVAILABLE=1 WITH_WAYLAND=ON WITH_WINPR_TOOLS=ON WITH_X11=ON WITH_X264=OFF WITH_XCURSOR=ON WITH_XDAMAGE=ON WITH_XEXT=ON WITH_XFIXES=ON WITH_XI=ON WITH_XINERAMA=ON WITH_XKBFILE=ON WITH_XRANDR=ON WITH_XRENDER=ON WITH_XSHM=ON WITH_XTEST=OFF WITH_XV=ON WITH_ZLIB=ON
    Build type: RelWithDebInfo
    CFLAGS: -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -O3 -m64 -march=znver1 -mtune=znver1 -mmmx -msse -msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt -mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -flto -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-unused-command-line-argument -Wno-deprecated-declarations -fno-omit-frame-pointer -DWINPR_DLL
    Compiler: Clang, 11.0.0
    Target architecture: x64
  • OS version connecting to (server side)
    Windows 10
  • If available the log output from a run with /log-level:trace 2>&1 | tee log.txt
    [22:45:25:078] [1576020:1576020] [DEBUG][com.freerdp.client.common] - This is Build configuration: BUILD_TESTING=OFF BUILTIN_CHANNELS=OFF HAVE_AIO_H=1 HAVE_EXECINFO_H=1 HAVE_FCNTL_H=1 HAVE_GETLOGIN_R=1 HAVE_INTTYPES_H=1 HAVE_JOURNALD_H=TRUE HAVE_MATH_C99_LONG_DOUBLE=1 HAVE_POLL_H=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK=ON HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL= HAVE_SYSLOG_H=1 HAVE_SYS_EVENTFD_H=1 HAVE_SYS_FILIO_H= HAVE_SYS_MODEM_H= HAVE_SYS_SELECT_H=1 HAVE_SYS_SOCKIO_H= HAVE_SYS_STRTIO_H= HAVE_SYS_TIMERFD_H=1 HAVE_TM_GMTOFF=1 HAVE_UNISTD_H=1 HAVE_XI_TOUCH_CLASS=1 WITH_ALSA=ON WITH_CAIRO=OFF WITH_CCACHE=ON WITH_CHANNELS=ON WITH_CLANG_FORMAT=ON WITH_CLIENT=ON WITH_CLIENT_AVAILABLE=1 WITH_CLIENT_CHANNELS=ON WITH_CLIENT_CHANNELS_AVAILABLE=1 WITH_CLIENT_COMMON=ON WITH_CLIENT_INTERFACE=OFF WITH_CUPS=ON WITH_DEBUG_ALL=OFF WITH_DEBUG_CAPABILITIES=OFF WITH_DEBUG_CERTIFICATE=OFF WITH_DEBUG_CHANNELS=OFF WITH_DEBUG_CLIPRDR=OFF WITH_DEBUG_DVC=OFF WITH_DEBUG_KBD=OFF WITH_DEBUG_LICENSE=OFF WITH_DEBUG_MUTEX=OFF WITH_DEBUG_NEGO=OFF WITH_DEBUG_NLA=OFF WITH_DEBUG_NTLM=OFF WITH_DEBUG_RAIL=OFF WITH_DEBUG_RDP=OFF WITH_DEBUG_RDPDR=OFF WITH_DEBUG_RDPEI=OFF WITH_DEBUG_RDPGFX=OFF WITH_DEBUG_REDIR=OFF WITH_DEBUG_RFX=OFF WITH_DEBUG_RINGBUFFER=OFF WITH_DEBUG_SCARD=OFF WITH_DEBUG_SND=OFF WITH_DEBUG_SVC=OFF WITH_DEBUG_SYMBOLS=OFF WITH_DEBUG_THREADS=OFF WITH_DEBUG_TIMEZONE=OFF WITH_DEBUG_TRANSPORT=OFF WITH_DEBUG_TSG=OFF WITH_DEBUG_TSMF=OFF WITH_DEBUG_TSMF=OFF WITH_DEBUG_TSMF_AVAILABLE=0 WITH_DEBUG_URBDRC=OFF WITH_DEBUG_WND=OFF WITH_DEBUG_X11=OFF WITH_DEBUG_X11_CLIPRDR=OFF WITH_DEBUG_X11_LOCAL_MOVESIZE=OFF WITH_DEBUG_XV=OFF WITH_DIRECTFB=OFF WITH_DSP_EXPERIMENTAL=OFF WITH_DSP_FFMPEG=OFF WITH_EVENTFD_READ_WRITE=1 WITH_FAAC=OFF WITH_FAAD2=OFF WITH_FFMPEG=TRUE WITH_FFMPEG=TRUE WITH_GFX_H264=ON WITH_GPROF=OFF WITH_GSM=ON WITH_GSSAPI=OFF WITH_GSTREAMER_0_10=OFF WITH_GSTREAMER_1_0=ON WITH_ICU=ON WITH_IPP=OFF WITH_JPEG=ON WITH_LAME=OFF WITH_LIBRARY_VERSIONING=ON WITH_LIBSYSTEMD=ON WITH_MACAUDIO=OFF WITH_MACAUDIO=OFF WITH_MACAUDIO_AVAILABLE=0 WITH_MANPAGES=ON WITH_MBEDTLS=OFF WITH_OPENCL=OFF WITH_OPENH264=OFF WITH_OPENSLES=OFF WITH_OPENSSL=ON WITH_OSS=ON WITH_PAM=ON WITH_PCSC=ON WITH_PROFILER=OFF WITH_PROXY=ON WITH_PROXY_MODULES=OFF WITH_PULSE=ON WITH_SAMPLE=OFF WITH_SANITIZE_ADDRESS=OFF WITH_SANITIZE_ADDRESS_AVAILABLE=1 WITH_SANITIZE_MEMORY=OFF WITH_SANITIZE_MEMORY_AVAILABLE=1 WITH_SANITIZE_THREAD=OFF WITH_SANITIZE_THREAD_AVAILABLE=1 WITH_SERVER=ON WITH_SERVER_CHANNELS=ON WITH_SERVER_INTERFACE=ON WITH_SHADOW=ON WITH_SHADOW_MAC=ON WITH_SHADOW_X11=ON WITH_SMARTCARD_INSPECT=OFF WITH_SOXR=OFF WITH_SSE2=ON WITH_SWSCALE=OFF WITH_THIRD_PARTY=OFF WITH_VAAPI=OFF WITH_VALGRIND_MEMCHECK=OFF WITH_VALGRIND_MEMCHECK_AVAILABLE=1 WITH_WAYLAND=ON WITH_WINPR_TOOLS=ON WITH_X11=ON WITH_X264=OFF WITH_XCURSOR=ON WITH_XDAMAGE=ON WITH_XEXT=ON WITH_XFIXES=ON WITH_XI=ON WITH_XINERAMA=ON WITH_XKBFILE=ON WITH_XRANDR=ON WITH_XRENDER=ON WITH_XSHM=ON WITH_XTEST=OFF WITH_XV=ON WITH_ZLIB=ON
    Build type: RelWithDebInfo
    CFLAGS: -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -O3 -m64 -march=znver1 -mtune=znver1 -mmmx -msse -msse2 -mssse3 -msse4a -msse4.1 -msse4.2 -mavx -mavx2 -msha -maes -mclflushopt -mfsgsbase -mrdrnd -mfma -mrdseed -mpopcnt -madx -mbmi -mbmi2 -mfxsr -mxsave -mxsaveopt -mxsavec -mxsaves -mmwaitx -mclzero -mfpmath=sse -flto -Wno-unused-parameter -Wno-unused-macros -Wno-padded -Wno-c11-extensions -Wno-gnu -Wno-unused-command-line-argument -Wno-deprecated-declarations -fno-omit-frame-pointer -DWINPR_DLL
    Compiler: Clang, 11.0.0
    Target architecture: x64

[22:45:25:078] [1576020:1576021] [INFO][com.freerdp.core] - freerdp_connect:freerdp_set_last_error_ex resetting error state
[22:45:25:078] [1576020:1576021] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpdr
[22:45:25:078] [1576020:1576021] [INFO][com.freerdp.client.common.cmdline] - loading channelEx rdpsnd
[22:45:25:078] [1576020:1576021] [DEBUG][com.freerdp.channels.cliprdr.client] - VirtualChannelEntryEx
[22:45:25:078] [1576020:1576021] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
[22:45:25:113] [1576020:1576021] [DEBUG][com.freerdp.primitives] - primitives benchmark result:
[22:45:25:275] [1576020:1576021] [DEBUG][com.freerdp.primitives] - * generic= 23
[22:45:25:426] [1576020:1576021] [DEBUG][com.freerdp.primitives] - * optimized= 121
[22:45:25:426] [1576020:1576021] [INFO][com.freerdp.primitives] - primitives autodetect, using optimized
[22:45:25:429] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - Enabling security layer negotiation: TRUE
[22:45:25:429] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - Enabling restricted admin mode: FALSE
[22:45:25:429] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - Enabling RDP security: TRUE
[22:45:25:429] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - Enabling TLS security: TRUE
[22:45:25:429] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - Enabling NLA security: TRUE
[22:45:25:429] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - Enabling NLA extended security: FALSE
[22:45:25:429] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - state: NEGO_STATE_NLA
[22:45:25:429] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - Attempting NLA security
[22:45:25:429] [1576020:1576021] [INFO][com.freerdp.core] - freerdp_tcp_is_hostname_resolvable:freerdp_set_last_error_ex resetting error state
[22:45:25:429] [1576020:1576021] [INFO][com.freerdp.core] - freerdp_tcp_connect:freerdp_set_last_error_ex resetting error state
[22:45:25:429] [1576020:1576021] [DEBUG][com.freerdp.core] - connecting to peer 192.168.2.130
[22:45:28:749] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - RequestedProtocols: 3
[22:45:29:115] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - RDP_NEG_RSP
[22:45:29:115] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - selected_protocol: 2
[22:45:29:115] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - state: NEGO_STATE_FINAL
[22:45:29:115] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - Negotiated NLA security
[22:45:29:115] [1576020:1576021] [DEBUG][com.freerdp.core.nego] - nego_security_connect with PROTOCOL_HYBRID
[22:45:33:416] [1576020:1576021] [WARN][com.freerdp.crypto] - Certificate verification failure 'self-signed certificate (18)' at stack position 0
[22:45:33:416] [1576020:1576021] [WARN][com.freerdp.crypto] - CN = A2003110422LENO.china.huawei.com
[22:45:33:416] [1576020:1576021] [DEBUG][com.winpr.sspi] - InitSecurityInterfaceExA
[22:45:33:416] [1576020:1576021] [DEBUG][com.freerdp.core.nla] - nla_client_init 411 : packageName=Negotiate ; cbMaxToken=12256
[22:45:33:416] [1576020:1576021] [TRACE][com.freerdp.core.nla] - InitializeSecurityContext status SEC_I_CONTINUE_NEEDED [0x00090312]
[22:45:33:416] [1576020:1576021] [DEBUG][com.freerdp.core.nla] - Sending Authentication Token
[22:45:36:319] [1576020:1576021] [DEBUG][com.freerdp.core.nla] - CredSSP protocol support 6, peer supports 6
[22:45:36:320] [1576020:1576021] [INFO][com.freerdp.utils] - Caught signal 'Segmentation fault' [11]
Segmentation fault (core dumped)

  • If you built it yourself add some notes which tag/commit/branch you have used, also your cmake parameters and
    compiler can help

Environment (please complete the following information):

  • OS: Linux
  • Version/Distribution: OpenMandriva Cooker
  • Architecture: amd64

Additional context
Given the trace ends inside OpenSSL, it's possible that this is related to my use of the current OpenSSL 3.0 alpha release.

@akallabeth
Copy link
Member

I´d think so too (OpenSSL) as the crash happens in a routine that (virtually) every connection attempt calls exactly like this.
(doing so myself every day)

@zx900930
Copy link

My problem is different:
freerdp version: community/freerdp 2:2.2.0-2 (archlinux x86_64)
When trying to connect to win 10 , it throws a driver error:

[16:48:14:233] [802:803] [INFO][com.freerdp.gdi] - Local framebuffer format  PIXEL_FORMAT_BGRX32
[16:48:14:233] [802:803] [INFO][com.freerdp.gdi] - Remote framebuffer format PIXEL_FORMAT_RGB16
[16:48:14:246] [802:803] [INFO][com.winpr.clipboard] - initialized POSIX local file subsystem
[16:48:14:257] [802:803] [INFO][com.freerdp.channels.rdpsnd.client] - [static] Loaded fake backend for rdpsnd
[16:48:15:556] [802:803] [INFO][com.freerdp.core] - ERRINFO_CLOSE_STACK_ON_DRIVER_FAILURE (0x00000011):The display driver in the remote session was unable to complete all the tasks required for startup.
[16:48:15:556] [802:803] [ERROR][com.freerdp.core] - rdp_set_error_info:freerdp_set_last_error_ex ERRINFO_CLOSE_STACK_ON_DRIVER_FAILURE [0x00010011]

but the connection to Windows server 2016 and 2019 is normal:

[16:50:30:584] [826:827] [INFO][com.freerdp.gdi] - Local framebuffer format  PIXEL_FORMAT_BGRX32
[16:50:30:585] [826:827] [INFO][com.freerdp.gdi] - Remote framebuffer format PIXEL_FORMAT_RGB16
[16:50:30:607] [826:827] [INFO][com.winpr.clipboard] - initialized POSIX local file subsystem
[16:50:30:617] [826:827] [INFO][com.freerdp.channels.rdpsnd.client] - [static] Loaded fake backend for rdpsnd
[16:50:30:073] [826:827] [INFO][com.freerdp.core] - rdp_set_error_info:freerdp_set_last_error_ex resetting error state
[16:50:54:711] [826:827] [INFO][com.freerdp.core] - ERRINFO_RPC_INITIATED_DISCONNECT_BY_USER (0x0000000B):The disconnection was initiated by an administrative tool on the server running in the user's session.
[16:50:54:711] [826:827] [ERROR][com.freerdp.core] - rdp_set_error_info:freerdp_set_last_error_ex ERRINFO_RPC_INITIATED_DISCONNECT_BY_USER [0x0001000B]

@akallabeth
Copy link
Member

@zx900930 you have a server side issue, the configuration is broken and disconnects the client with that message.
Might be that you need /network:auto or similar as your server is not configured for legacy RDP

@zx900930
Copy link

zx900930 commented Dec 15, 2020

@akallabeth I'll try to activate the legacy support on the server side.
enable /network:auto gives a VAAPI error:

[17:11:14:682] [2253:2254] [INFO][com.freerdp.gdi] - Local framebuffer format  PIXEL_FORMAT_BGRX32
[17:11:14:683] [2253:2254] [INFO][com.freerdp.gdi] - Remote framebuffer format PIXEL_FORMAT_BGRA32
[17:11:14:725] [2253:2254] [INFO][com.winpr.clipboard] - initialized POSIX local file subsystem
[17:11:14:734] [2253:2254] [INFO][com.freerdp.channels.rdpsnd.client] - [static] Loaded fake backend for rdpsnd
[17:11:14:735] [2253:2254] [INFO][com.freerdp.channels.drdynvc.client] - Loading Dynamic Virtual Channel rdpgfx
[AVHWDeviceContext @ 0x7f6c4161b300] Failed to initialise VAAPI connection: -1 (unknown libva error).
[17:11:15:562] [2253:2266] [ERROR][com.freerdp.codec] - Could not initialize hardware decoder, falling back to software: Erreur d'entrée/sortie
[17:11:16:237] [2253:2254] [INFO][com.freerdp.core] - ERRINFO_CLOSE_STACK_ON_DRIVER_FAILURE (0x00000011):The display driver in the remote session was unable to complete all the tasks required for startup.
[17:11:16:238] [2253:2254] [ERROR][com.freerdp.core] - rdp_set_error_info:freerdp_set_last_error_ex ERRINFO_CLOSE_STACK_ON_DRIVER_FAILURE [0x00010011]

The VAAPI error fixed by define a environment variable LIBVA_DRIVER_NAME=i965 to force it using the intel i965 driver.

but the ERRINFO_CLOSE_STACK_ON_DRIVER_FAILURE (0x00000011):The display driver in the remote session was unable to complete all the tasks required for startup. error is still there.

The Win 10 rdp server didn't check the "Allow connections only from computers running Remote Desktop with Network Level Authentication" option.
image
By the way the host Windows 10 version is 20H2 (19042.685)

@akallabeth
Copy link
Member

@zx900930

  1. the VAAPI warning is not really a bug (it just tells you that the configuration is not working and it is not using it, the env variable fixes that)
  2. the RDP configuration is wrong, NLA has nothing to do with that (keep that on), but check the gpedit.msc policies for your machine. I don´t know what is wrong there, but the stuff is something broken server side.

@zx900930
Copy link

zx900930 commented Dec 16, 2020

@akallabeth Yes, your right, it's in
Computer Configuration >> Administrative Templates >> Windows Components >> Remote Desktop Services >> Remote Session Enviroment
There are some H264 compression and Hardware Acceleration configs, some are set to Activated. Change all those HA and compression options to Not configured solve the problem.

Those things are MS use to automatically adjust the quality of RDP video streams I believe. And it's broke down the freerdp connection.

Thanks for your help!

@smbd
Copy link

smbd commented May 20, 2021

Hi, I found same error after update RDP server to Windows 10 ver 2004.

Password: 
[11:24:49:306] [4:5] [INFO][com.freerdp.gdi] - Local framebuffer format  PIXEL_FORMAT_BGRX32
[11:24:49:306] [4:5] [INFO][com.freerdp.gdi] - Remote framebuffer format PIXEL_FORMAT_RGB16
[11:24:49:310] [4:5] [INFO][com.winpr.clipboard] - initialized POSIX local file subsystem
[11:24:49:312] [4:5] [INFO][com.freerdp.channels.rdpsnd.client] - [static] Loaded fake backend for rdpsnd
[11:24:49:456] [4:5] [INFO][com.freerdp.core] - ERRINFO_CLOSE_STACK_ON_DRIVER_FAILURE (0x00000011):The display driver in the remote session was unable to complete all the tasks required for startup.
[11:24:49:456] [4:5] [ERROR][com.freerdp.core] - rdp_set_error_info:freerdp_set_last_error_ex ERRINFO_CLOSE_STACK_ON_DRIVER_FAILURE [0x00010011]

@zx900930 says "Change all those HA and compression options to Not configured solve the problem.", but in my case, disabling "Use WDDM graphics display driver for Remote Desktop Connections" and reboot the Windows 10 PC is only needed setting to connect by FreeRDP in current master HEAD(6f2c662).

Just FYI.

@akallabeth
Copy link
Member

Closing as the initial issue is OpenSSL 3.0 not working with freerdp.

ondrejholy added a commit to ondrejholy/FreeRDP that referenced this issue Aug 3, 2021
Currently, the `EVP_EncryptInit_ex` function fails for rc4 with OpenSSL 3.0.
This is becuase rc4 is provided by the legacy provider which is not loaded
by default. Let's explicitly load the legacy provider to make FreeRDP work
with OpenSSL 3.0.

Relates: openssl/openssl#14392
Fixes: FreeRDP#6604
mfleisz pushed a commit that referenced this issue Aug 3, 2021
* winpr/crypto: Exit cleanly when EVP_EncryptInit_ex fails

The `EVP_EncryptInit_ex` function may fail in certain configurations.
Consequently, FreeRDP segfaults in `EVP_CIPHER_CTX_set_key_length`.
Let's handle the `EVP_EncryptInit_ex` failures and exit cleanly in
such case.

* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0

Currently, the `EVP_EncryptInit_ex` function fails for rc4 with OpenSSL 3.0.
This is becuase rc4 is provided by the legacy provider which is not loaded
by default. Let's explicitly load the legacy provider to make FreeRDP work
with OpenSSL 3.0.

Relates: openssl/openssl#14392
Fixes: #6604
floppym pushed a commit to floppym/FreeRDP that referenced this issue Aug 16, 2021
…RDP#7210)

* winpr/crypto: Exit cleanly when EVP_EncryptInit_ex fails

The `EVP_EncryptInit_ex` function may fail in certain configurations.
Consequently, FreeRDP segfaults in `EVP_CIPHER_CTX_set_key_length`.
Let's handle the `EVP_EncryptInit_ex` failures and exit cleanly in
such case.

* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0

Currently, the `EVP_EncryptInit_ex` function fails for rc4 with OpenSSL 3.0.
This is becuase rc4 is provided by the legacy provider which is not loaded
by default. Let's explicitly load the legacy provider to make FreeRDP work
with OpenSSL 3.0.

Relates: openssl/openssl#14392
Fixes: FreeRDP#6604
(cherry picked from commit 67f3fff)

Conflicts:
	winpr/libwinpr/crypto/cipher.c
akallabeth pushed a commit that referenced this issue Aug 19, 2021
* winpr/crypto: Exit cleanly when EVP_EncryptInit_ex fails

The `EVP_EncryptInit_ex` function may fail in certain configurations.
Consequently, FreeRDP segfaults in `EVP_CIPHER_CTX_set_key_length`.
Let's handle the `EVP_EncryptInit_ex` failures and exit cleanly in
such case.

* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0

Currently, the `EVP_EncryptInit_ex` function fails for rc4 with OpenSSL 3.0.
This is becuase rc4 is provided by the legacy provider which is not loaded
by default. Let's explicitly load the legacy provider to make FreeRDP work
with OpenSSL 3.0.

Relates: openssl/openssl#14392
Fixes: #6604
(cherry picked from commit 67f3fff)

Conflicts:
	winpr/libwinpr/crypto/cipher.c
akallabeth pushed a commit to akallabeth/FreeRDP that referenced this issue Oct 15, 2021
…RDP#7210)

* winpr/crypto: Exit cleanly when EVP_EncryptInit_ex fails

The `EVP_EncryptInit_ex` function may fail in certain configurations.
Consequently, FreeRDP segfaults in `EVP_CIPHER_CTX_set_key_length`.
Let's handle the `EVP_EncryptInit_ex` failures and exit cleanly in
such case.

* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0

Currently, the `EVP_EncryptInit_ex` function fails for rc4 with OpenSSL 3.0.
This is becuase rc4 is provided by the legacy provider which is not loaded
by default. Let's explicitly load the legacy provider to make FreeRDP work
with OpenSSL 3.0.

Relates: openssl/openssl#14392
Fixes: FreeRDP#6604
(cherry picked from commit 67f3fff)

Conflicts:
	winpr/libwinpr/crypto/cipher.c
akallabeth pushed a commit to akallabeth/FreeRDP that referenced this issue Oct 15, 2021
…RDP#7210)

* winpr/crypto: Exit cleanly when EVP_EncryptInit_ex fails

The `EVP_EncryptInit_ex` function may fail in certain configurations.
Consequently, FreeRDP segfaults in `EVP_CIPHER_CTX_set_key_length`.
Let's handle the `EVP_EncryptInit_ex` failures and exit cleanly in
such case.

* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0

Currently, the `EVP_EncryptInit_ex` function fails for rc4 with OpenSSL 3.0.
This is becuase rc4 is provided by the legacy provider which is not loaded
by default. Let's explicitly load the legacy provider to make FreeRDP work
with OpenSSL 3.0.

Relates: openssl/openssl#14392
Fixes: FreeRDP#6604
(cherry picked from commit 67f3fff)

Conflicts:
	winpr/libwinpr/crypto/cipher.c
pld-gitsync pushed a commit to pld-linux/freerdp2 that referenced this issue Oct 15, 2021
mfleisz pushed a commit that referenced this issue Oct 21, 2021
* Fixed typo in changelog

* Fix FIPS mode support and build with OpenSSL 3.0

FreeRDP fails to build with OpenSSL 3.0 because of usage of the `FIPS_mode`
and `FIPS_mode_set` functions, which were removed there. Just a note that
the FIPS mode is not supported by OpenSSL 1.1.* although the mentioned
functions are still there (see https://wiki.openssl.org/index.php/FIPS_modules).
Let's make FreeRDP build with OpenSSL 3.0 and fix the FIPS mode support.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1952937
(cherry picked from commit 26bf281)

* winpr: avoid calling FIPS_mode() with OpenSSL 3.0

Fixes: 26bf281
(cherry picked from commit 0c81c73)

* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0 (#7210)

* winpr/crypto: Exit cleanly when EVP_EncryptInit_ex fails

The `EVP_EncryptInit_ex` function may fail in certain configurations.
Consequently, FreeRDP segfaults in `EVP_CIPHER_CTX_set_key_length`.
Let's handle the `EVP_EncryptInit_ex` failures and exit cleanly in
such case.

* winpr/crypto: Load legacy provider to fix rc4 with OpenSSL 3.0

Currently, the `EVP_EncryptInit_ex` function fails for rc4 with OpenSSL 3.0.
This is becuase rc4 is provided by the legacy provider which is not loaded
by default. Let's explicitly load the legacy provider to make FreeRDP work
with OpenSSL 3.0.

Relates: openssl/openssl#14392
Fixes: #6604
(cherry picked from commit 67f3fff)

Conflicts:
	winpr/libwinpr/crypto/cipher.c

* Fix TestUnicodeConversion on big endian machines (#7219)

Wide character literals are stored in native byte order.
Use an array of bytes as a reference instead.

Fixes: #6968
(cherry picked from commit 5208a67)

* Fixed async-input quit

* Fix data write on usb channel

* Bitmap update fix (#7349)

* Added checks for bitmap width and heigth values

Data received from the server might have invalid values for bitmap
with or height. Abort parsing if such a value is found.
Reported by Sunglin from the Knownsec 404 team & 0103 sec team

* Added checks for glyph width & height

* Fixed #7363: Length checks in ConvertUTF8toUTF16

(cherry picked from commit 623a772)

* Implemented missing TSG debug functions

(cherry picked from commit c06c463)

* Refactored RPC gateway parser

Utilize wStream instead of custom binary parsing code, add proper
input validation.
Reported by Sunglin from the Knownsec 404 team & 0103 sec team

(cherry picked from commit f0b44da)

* Replaced chmod with safer fchmod

* Use fchmod so the file may not change underneath
* Add unit tests for SetFileAttributesA
* Add warning logs for unsupported flags

(cherry picked from commit c8571dd)

* Updated changelog and version

* Added more explicit warning for deprecated command line

* Add exit codes for more errors

(cherry picked from commit aa4c3df)

* Updated changelog.

Co-authored-by: Ondrej Holy <oholy@redhat.com>
Co-authored-by: Mike Gilbert <floppym@gentoo.org>
Co-authored-by: Ondrej Holy <ondrejholy@users.noreply.github.com>
Co-authored-by: Ian Weir <mr.weir@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants