Fix for expected PDU_TYPE_DEMAND_ACTIVE 0001, got 0007 #1167

Merged
merged 1 commit into from Apr 9, 2013

Projects

None yet

4 participants

@dpoe
Contributor
dpoe commented Apr 5, 2013

This is related to issue #729 and it is probably #729's cause.

The problem here is that during rdp_client_connect_demand_active, an error PDU may be sent from the server. The code is set up to handle unexpected PDUs, but it skips over a fixed number of bytes (RDP_PACKET_HEADER_MAX_LENGTH) rather than basing it on the content of the headers (TPKT+X224+T125, etc.). In summary, it skips over 15 bytes when it should be skipping over 14, and then when the demand_active parsing picks up again, it starts in the wrong place and fails.

The fix is to use the same header-parsing code to handle the error packet header, rather than relying on a fixed offset. That code is smart enough to compute the offsets correctly.

Can one of the admins verify this patch?

Owner

@freerdp-bot test this please

Build results will soon be (or already are) available at: https://ci.freerdp.com/job/Github%20pull%20request%20tester/57/

@awakecoding awakecoding merged commit 466fbbf into FreeRDP:master Apr 9, 2013

1 check passed

default Merged build finished.
Details

Fix broken in Debian Jessie:
xfreerdp --version
This is FreeRDP version 1.1.0-beta1 (git n/a)

Virtualmachin is on Virtualbox, guest is windows 8.1 pro; works without /app:"||calc"

xfreerdp /u:user /p:pass /app:"||calc" /v:machine /cert-ignore
loading channel rail
connected to machine:3389
expected PDU_TYPE_DEMAND_ACTIVE 0001, got 0007
SSL_read: I/O error: Success (0)

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