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 crashes on RDP server redirection when clipboard redirection is enabled #4629

Closed
p-pautov opened this issue May 5, 2018 · 0 comments

Comments

@p-pautov
Copy link
Contributor

p-pautov commented May 5, 2018

This is FreeRDP version 2.0.0-dev3 (7eb12bb).

(gdb) bt
#0  0x00007fad0ba97428 in __GI_raise (sig=11) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007fad0c67db30 in fatal_handler (signum=11)
    at ../FreeRDP/libfreerdp/utils/signal.c:67
#2  <signal handler called>
#3  0x0000000000418594 in xf_cliprdr_init (xfc=0x19bf670, cliprdr=0x7facfc000a30)
    at ../FreeRDP/client/X11/xf_cliprdr.c:1757
#4  0x00000000004139a9 in xf_OnChannelConnectedEventHandler (context=0x19bf670, e=0x7fad00fd2870)
    at ../FreeRDP/client/X11/xf_channels.c:63
#5  0x00007fad0be81a48 in PubSub_OnEvent (pubSub=0x19c01d0, EventName=0x7fad0c7d4c00 "ChannelConnected",
    context=0x19bf670, e=0x7fad00fd2870)
    at ../FreeRDP/winpr/libwinpr/utils/collections/PubSub.c:188
#6  0x00007fad0c6e99c5 in PubSub_OnChannelConnected (pubSub=0x19c01d0, context=0x19bf670, e=0x7fad00fd2870)
    at ../FreeRDP/include/freerdp/event.h:84
#7  0x00007fad0c6ea7df in freerdp_channels_post_connect (channels=0x19f85c0, instance=0x19bf3e0)
    at ../FreeRDP/libfreerdp/core/client.c:380
#8  0x00007fad0c6fa1c8 in rdp_client_redirect (rdp=0x19c4a90)
    at ../FreeRDP/libfreerdp/core/connection.c:423
#9  0x00007fad0c706cca in rdp_check_fds (rdp=0x19c4a90)
    at ../FreeRDP/libfreerdp/core/rdp.c:1514
#10 0x00007fad0c6f9dba in rdp_client_connect (rdp=0x19c4a90)
    at ../FreeRDP/libfreerdp/core/connection.c:305
#11 0x00007fad0c6e7569 in freerdp_connect (instance=0x19bf3e0)
    at ../FreeRDP/libfreerdp/core/freerdp.c:189
#12 0x0000000000427032 in xf_client_thread (param=0x19bf3e0)
    at ../FreeRDP/client/X11/xf_client.c:1485
#13 0x00007fad0beb368e in thread_launcher (arg=0x1a0a560)
    at ../FreeRDP/winpr/libwinpr/thread/thread.c:319
#14 0x00007fad0b4266ba in start_thread (arg=0x7fad00fd3700) at pthread_create.c:333
#15 0x00007fad0bb6941d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Basically, in case of RDP server redirection xf_cliprdr_init() is called before xf_clipboard_new(), which causes NULL deference.

p-pautov added a commit to p-pautov/FreeRDP that referenced this issue May 5, 2018
akallabeth pushed a commit to akallabeth/FreeRDP that referenced this issue May 6, 2018
…as connected.

In rdp_client_redirect or rdp_client_reconnect freerdp_channels_post_connect must
be called if the channels were connected previously.
This might not be the case, skip that call then.
@akallabeth akallabeth added this to the 2.0-rc3 milestone May 6, 2018
akallabeth pushed a commit to akallabeth/FreeRDP that referenced this issue May 11, 2018
…as connected.

In rdp_client_redirect or rdp_client_reconnect freerdp_channels_post_connect must
be called if the channels were connected previously.
This might not be the case, skip that call then.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants