Segfault in gcc_write_server_security_data #601

tfar opened this Issue May 19, 2012 · 2 comments


None yet
4 participants

tfar commented May 19, 2012

Connecting "client/X11/xfreerdp --sec rdp --rfx localhost" to "server/X11/xfreerdp-server" results in a segmentation fault.

Here the servers bt:

(gdb) r
Starting program: /home/test/FreeRDP/server/X11/xfreerdp-server
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
Listening on port 3389.
bind: Address already in use
[New Thread 0x7ffff453b700 (LWP 6731)]
We've got a client
Requested protocols: RDP(Y)
Accepted client:
Accepted channels:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff453b700 (LWP 6731)]
0x00007ffff737cfde in gcc_write_server_security_data (s=0x658550, settings=0x6075e0) at /home/test/FreeRDP/libfreerdp-core/gcc.c:931
931 keyLen = settings->server_key->modulus.length;
(gdb) bt
#0 0x00007ffff737cfde in gcc_write_server_security_data (s=0x658550, settings=0x6075e0) at /home/test/FreeRDP/libfreerdp-core/gcc.c:931
#1 0x00007ffff737b283 in gcc_write_server_data_blocks (s=0x658550, settings=0x6075e0) at /home/test/FreeRDP/libfreerdp-core/gcc.c:424
#2 0x00007ffff737f2f2 in mcs_send_connect_response (mcs=0x61b0a0) at /home/test/FreeRDP/libfreerdp-core/mcs.c:528
#3 0x00007ffff739ddb7 in rdp_server_accept_mcs_connect_initial (rdp=0x607480, s=0x6584e0)

at /home/test/FreeRDP/libfreerdp-core/connection.c:601

#4 0x00007ffff73ab430 in peer_recv_callback (transport=0x609710, s=0x6584e0, extra=0x6071c0)

at /home/test/FreeRDP/libfreerdp-core/peer.c:239

#5 0x00007ffff73a5c5a in transport_check_fds (ptransport=0x6074d0) at /home/test/FreeRDP/libfreerdp-core/transport.c:451
#6 0x00007ffff73a107f in rdp_check_fds (rdp=0x607480) at /home/test/FreeRDP/libfreerdp-core/rdp.c:896
#7 0x00007ffff73aae37 in freerdp_peer_check_fds (client=0x6071c0) at /home/test/FreeRDP/libfreerdp-core/peer.c:55
#8 0x00000000004046d4 in xf_peer_main_loop (arg=0x6071c0) at /home/test/FreeRDP/server/X11/xf_peer.c:692
#9 0x00007ffff5305b50 in start_thread () from /lib/x86_64-linux-gnu/
#10 0x00007ffff4e4c90d in clone () from /lib/x86_64-linux-gnu/
#11 0x0000000000000000 in ?? ()


Commit: ff3b5af

Platform: Linux Mint (Linux 3.2.0-2-amd64 #1 SMP Sun Mar 4 22:48:17 UTC 2012 x86_64 GNU/Linux)


atong commented May 20, 2012

not sure if --sec rdp works yet in server mode..


llyzs commented May 31, 2012

The segfault should have been fixed now, but the real thing is that xfreerdp-server does not work with --sec rdp since it does not provide an rdp key file. It only works with TLS for now.

bmiklautz closed this Sep 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment