Bug 71986 - RDP compositor fails to establish connection (unable to checkDescriptor)
Summary: RDP compositor fails to establish connection (unable to checkDescriptor)
Status: RESOLVED MOVED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: 1.3.0
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 12:59 UTC by Michael Hanselmann (hansmi)
Modified: 2018-06-08 23:51 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Debug log (20.77 KB, text/plain)
2013-11-25 12:59 UTC, Michael Hanselmann (hansmi)
Details

Description Michael Hanselmann (hansmi) 2013-11-25 12:59:33 UTC
Created attachment 89742 [details]
Debug log

TL;DR: RDP compositor fails with “unable to checkDescriptor for {RDP peer context address}”

Operating system: Debian GNU/Linux 7.2 (wheezy)

Manually compiled components:
FreeRDP commit d2a9df1ce0 (last commit on stable-1.1 branch as of this writing)
xkbcommon 0.3.2
Mesa 9.2.3
Wayland 1.3.0
Weston 1.3.1

I have tried using xfreerdp, rdesktop and Microsoft's Remote Desktop application for Mac OS X as clients. When connecting, Weston logs “unable to checkDescriptor for {RDP peer context address}” and nothing else happens. When I connect a second time, Weston crashes due to a double-free. From looking at the code I *think* it's an issue in the interaction between the RDP compositor and FreeRDP, but I'm not sure. Below you find the standard output. A debug log is attached.

$ ./weston --backend=rdp-backend.so --port=3391 --rdp-tls-cert=../tls.pem --rdp-tls-key=../tls.pem --width=800 --height=600
Date: 2013-11-25 CET
[13:32:50.064] weston 1.3.1
               http://wayland.freedesktop.org/
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.3.1
               Build:
[13:32:50.066] OS: Linux, 3.2.0-4-686-pae, #1 SMP Debian 3.2.51-1, i686
[13:32:50.067] Using config file '/home/[…]/.config/weston.ini'
[13:32:50.068] Loading module '[…]/data/wayland/install/lib/weston/rdp-backend.so'
[13:32:50.083] using FreeRDP version 1.1.0
[13:32:50.085] TLS support activated
Listening on 0.0.0.0 port 3391.
bind: Address already in use
[13:32:50.088] Loading module '[…]/data/wayland/install/lib/weston/desktop-shell.so'
[13:32:50.090] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
[13:32:50.091] libwayland: using socket /tmp/1000-runtime-dir/wayland-0
[13:32:50.117] launching '[…]/data/wayland/install/libexec/weston-desktop-shell'
[13:32:52.023] launching '[…]/data/wayland/install/libexec/weston-keyboard'
Client Security: NLA:0 TLS:1 RDP:0
Server Security: NLA:0 TLS:1 RDP:1
Negotiated Security: NLA:0 TLS:1 RDP:0
SSL_CTX_use_RSAPrivateKey_file failed
PrivateKeyFile: ../tls.pem
[13:32:52.040] unable to checkDescriptor for 0x8bd6b98
Comment 1 Hardening 2013-12-05 15:40:44 UTC
The log "SSL_CTX_use_RSAPrivateKey_file failed" means that you didn't set a key for RDP encryption. That may explain why the connection is closed so quickly.

Could you retry with a --rdp4-key argument set to key file ?

Thanks
Comment 2 Michael Hanselmann (hansmi) 2013-12-15 14:04:04 UTC
I have tried with a key, a self-signed X.509 certificate, both and without either. I did have a look at the code and found that the checkDescriptor function would return 0 once (I couldn't figure out the exact reason) and the handles would be closed. Consequent calls would fail, too.
Comment 3 John Obaterspok 2014-01-01 18:37:28 UTC
Same thing occurs for me when I try to start weston with the RDP backend using the  Fedora rawhide RPMS
Comment 4 Dawid Gajownik 2015-07-26 03:45:02 UTC
1) Is this issue still reproducible?
2) Could you please attach any certificate and private key that causes "SSL_CTX_use_RSAPrivateKey_file failed" error message? You could also provide instructions how you generate it.

Thanks
Comment 5 Dawid Gajownik 2015-07-26 04:51:12 UTC
3) Additionally could you please provide output of:

ls -l ../tls.pem

(executed from the same directory where you run weston)
Comment 6 Michael Hanselmann (hansmi) 2015-08-17 20:00:17 UTC
(In reply to Dawid Gajownik from comment #4)
> 1) Is this issue still reproducible?

I don't know since I no longer have the environment in which this issue originally occurred and am not using Wayland at this time.

> 2) Could you please attach any certificate and private key that causes
> "SSL_CTX_use_RSAPrivateKey_file failed" error message? You could also
> provide instructions how you generate it.

There's a good chance it was a command along the lines of “openssl req -batch -nodes -x509 -newkey rsa:2048 -out test.pem -keyout test.pem”.

I'm sorry to not be able to help any further.
Comment 7 John Obaterspok 2016-09-25 18:50:30 UTC
I've tried pre Weston 1.12 and it seems the bug is still there.
*But*, I've managed to get it to work by specifying -width 1024 and -height 768 and using the same resolution from the client. I still get the "unable to checkDescriptor" but mstsc (Windows rdp client) don't crash with protocol error.

Can freerdp detect the resolution the client is requesting?
Comment 8 GitLab Migration User 2018-06-08 23:51:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/wayland/weston/issues/31.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.