Commit Graph

116 Commits

Author SHA1 Message Date
669e3a9e11 Second Batch: Update files using ChatGPT 4o 2024-05-31 15:52:13 +02:00
Alexander Zakharov
85f99edd65 Update copyrights 2019-02-01 11:21:32 +03:00
Alexander Zakharov
774a657975 Handle insufficient server side buffer for smartcard operations
We should pay attention to OutputBufferLength of DR_CONTROL_REQ
and send STATUS_BUFFER_TOO_SMALL if it's insufficient for returned
result.
2019-01-23 16:12:21 +03:00
Henrik Andersson
4dca546d04 Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.

All vulnerabilities was identified and reported by Eyal Itkin.

 * Add rdp_protocol_error function that is used in several fixes
 * Refactor of process_bitmap_updates
 * Fix possible integer overflow in s_check_rem() on 32bit arch
 * Fix memory corruption in process_bitmap_data - CVE-2018-8794
 * Fix remote code execution in process_bitmap_data - CVE-2018-8795
 * Fix remote code execution in process_plane - CVE-2018-8797
 * Fix Denial of Service in mcs_recv_connect_response - CVE-2018-20175
 * Fix Denial of Service in mcs_parse_domain_params - CVE-2018-20175
 * Fix Denial of Service in sec_parse_crypt_info - CVE-2018-20176
 * Fix Denial of Service in sec_recv - CVE-2018-20176
 * Fix minor information leak in rdpdr_process - CVE-2018-8791
 * Fix Denial of Service in cssp_read_tsrequest - CVE-2018-8792
 * Fix remote code execution in cssp_read_tsrequest - CVE-2018-8793
 * Fix Denial of Service in process_bitmap_data - CVE-2018-8796
 * Fix minor information leak in rdpsnd_process_ping - CVE-2018-8798
 * Fix Denial of Service in process_secondary_order - CVE-2018-8799
 * Fix remote code execution in in ui_clip_handle_data - CVE-2018-8800
 * Fix major information leak in ui_clip_handle_data - CVE-2018-20174
 * Fix memory corruption in rdp_in_unistr - CVE-2018-20177
 * Fix Denial of Service in process_demand_active - CVE-2018-20178
 * Fix remote code execution in lspci_process - CVE-2018-20179
 * Fix remote code execution in rdpsnddbg_process - CVE-2018-20180
 * Fix remote code execution in seamless_process - CVE-2018-20181
 * Fix remote code execution in seamless_process_line - CVE-2018-20182
2019-01-16 12:28:44 +01:00
Henrik Andersson
c16b74a974 Run indent-all.sh script on source 2018-10-29 15:53:57 +01:00
Henrik Andersson
83aef969ab Cleanup of reconnect code
We have seen different behaviour between versions of Windows RDP
servers how a connection should be closed and rdesktop should exit.
Windows 2008 server and earlier versions sets an error info value of
0 and then sends deactivate PDU. Later versions sends a error info
of vlaue 12 (User initiated logoff) but does not send deactivate PDU.

A work around was added to translate this case for Windows 2008 and
earlier to newer aporach to get proper handling.

This prevents reconnect loop introduced when hitting ESC or wait for
timeout at logon screen against 2008 server or earlier.

This commit also fixes a problem where a reconnect loop was triggerd
even if no required 'auto-reconnect cookie' is received from the server.
2018-03-28 13:34:16 +02:00
Henrik Andersson
b5708cf775 Refactoring of slow and fastpath handling
This changes clarifies a chunk of code related to receiving
data and handle slow and fast path pdus.
2018-02-01 12:47:22 +01:00
Cendio
e112b69c61 Use proper user-initiated disconnect sequence
A correct user initated disconnect sequence should send
a MCS Disconnect Provider Ultimatum PDU defined in T.128
upon a disconnect. This commit adds the implementation
the mentioned PDU and the actual write of the packet.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
2018-01-31 11:03:32 +01:00
Cendio
293680c034 Use hex constants for data pdu (pdutype2) enumeration
This matches how they're described in MS-RDPBCGR. Also add the proper
constant name as comments.

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Thomas Nilefalk <thoni56@cendio.se>
2018-01-31 11:03:32 +01:00
Cendio
2f03f65efe Add Dynamic Virtual Channels and basic RDPEDISP support
Fix issue #192

Signed-off-by: Henrik Andersson <hean01@cendio.com>
Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
2017-11-09 15:39:39 +01:00
René Genz
9e99dd52d6 Fix minor spelling mistakes 2017-11-02 01:01:44 +01:00
Henrik Andersson
7daf773b6a
Merge pull request #186 from derfian/suppress-output
Rename suppress output functions to match MS-RDPBCGR
2017-11-01 06:42:36 +01:00
joshudson
fe692058a2 Add Windows 10 support: add option to send DPI to server as Windows 1… (#66)
Add support  for choosing DPI of remote session
2017-11-01 06:37:18 +01:00
Karl Mikaelsson
8f83c1f6c7 Rename suppress output functions to match MS-RDPBCGR
Issue #161
2017-10-30 10:47:21 +01:00
Karl Mikaelsson
27e447555e Rename SEC_TAG_CLI_ constants to match specification 2017-10-17 12:29:41 +02:00
Karl Mikaelsson
3bb69ac4b8 Document sec_out_mcs_connect_initial_pdu
Cross-referenced the PDU with the spec. I found and fixed a few
inconsistencies while also adding comments identifying each data
field.
2017-10-17 12:17:13 +02:00
Karl Mikaelsson
99f5925cce Enable support for large pointers
The cursor-handling code already handles larger pointer sizes. This
advertises that rdesktop has the capability to handle large cursors
and adjusts the maximum size of fragmented packets to suit the large
cursor requirements.

Solves issue #173.
2017-10-16 19:26:30 +02:00
Karl Mikaelsson
0c7b4117ab Enable fragmented Fast-Path Updates
Fragmented updates are concatenated into temporary streams (one per
update type) that are processed when receiving an update with the
FASTPATH_FRAGMENT_LAST bit set.
2017-10-16 14:01:13 +02:00
Karl Mikaelsson
63ac9d3c42 Clarify the Fast-Path handling in the T.123/X.224 layer 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
eec94365c4 Improve Fast-Path code readability
Using constants and field definitions from MS-RDPBCGR.
2017-10-13 14:02:03 +02:00
Karl Mikaelsson
3abeca252b Log system pointer changes via Fast-Path updates 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
72f63d04ec Decipher remaining capabilitysets sent from rdesktop 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
9ca206bc08 Clarify order and bitmap capability set functions 2017-10-13 14:02:03 +02:00
Karl Mikaelsson
3b0a0c1334 Improve rdp_out_general_caps
Rename to rdp_out_ts_general_capabilityset to match the structure
name, describe all fields and use constants instead of magic numbers.
2017-10-13 14:02:03 +02:00
Samuel Mannehed
b0813fa275 Add handling for a few special RDP error codes
Most of the RPD protocol errors (reason > 0x1000) would only be
triggered by coding errors in the client. A few of them can occur due
to server errors however. We should attempt to handle these cases.
2017-10-04 16:27:34 +02:00
Samuel Mannehed
e8562507e7 Add handling for connection broker error codes 2017-10-04 15:51:36 +02:00
Samuel Mannehed
a6a2120cf7 Rename constants for disconnect reasons
To make them easier to search for - let's match the names with the
corresponding names on the server side:

https://msdn.microsoft.com/en-us/library/cc240544.aspx
2017-10-04 09:35:14 +02:00
Pierre Ossman
b236a3698f Merge branches 'shift_pause' and 'mouse_4_5' of https://github.com/bogbert/rdesktop 2017-07-10 15:00:47 +02:00
Pierre G. Bogossian
ba94ac028d Shift-Pause did not work because a PAUSE key press was not sending the proper sequence 2017-07-09 16:58:19 +02:00
Pierre G. Bogossian
9889ed6457 Support extended mouse buttons 4 and 5 (ie back/forward buttons) 2017-07-09 16:56:30 +02:00
Henrik Andersson
708b0f0071 Rename redirection flags matching names in specification
Also added missing flags available from spec
2017-05-15 08:03:39 +02:00
Henrik Andersson
c93960b266 Cleanup of TS_SECURITY_HEADER code
Add correct naming of header TS_SECURITY_HEADER and its flags
as per MSRDPBCGR specification.
2017-03-07 15:32:14 +01:00
Karl Mikaelsson
7f6748d1c3 Clarify printer parts of rdpdr_send_client_device_list_announce
Add new flag constants and comments for all fields.
2017-01-30 09:35:29 +01:00
Karl Mikaelsson
b093dc198d Decipher the contents of the DR_CORE_CAPABILITY_RSP message
Add relevant constants from the specification and use them while
building the capabilities reply.
2017-01-20 16:05:59 +01:00
Henrik Andersson
29583c53b5 Revert "Support horizontal scroll with mouse wheel" 2016-12-05 14:35:10 +01:00
James Laird-Wah
37a2206347 Support horizontal scroll with mouse wheel 2016-12-05 10:40:31 +11:00
Henrik Andersson
d952852629 Enable FontSmoothing per default
FontSmoothing is now enabled per default or if experience selected by lan or broadband.
2016-08-23 12:43:15 +02:00
Henrik Andersson
0440d0faca Make use of constants defined in specification instead of
magic character numbers found in protocol stream for clarity.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1828 423420c4-83ab-492f-b58f-81f9feb106b5
2014-09-09 12:34:09 +00:00
Henrik Andersson
a87ed59ad4 Updates all constants for TS_INFO_PACKET flags to
much names in specification.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1817 423420c4-83ab-492f-b58f-81f9feb106b5
2014-06-27 13:49:19 +00:00
Henrik Andersson
1c97aa5be1 Fix constant naming and enabled windowskey by default.
Fixes bug #384

Thanks to Alexander Zakharov for pinpointing
the core issue.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1816 423420c4-83ab-492f-b58f-81f9feb106b5
2014-06-27 13:15:24 +00:00
Henrik Andersson
b8557c42ea Always enable rdpsnd channel and use flags to control use
of streamed audio or not.

This is a fix for driveredirection which requires rdpsnd
channel to work as mentioned in the following post.

http://social.msdn.microsoft.com/Forums/en-US/75024a3d-458f-4ed9-b55d-7852d0113bd7/rdpbcgrpdf-2-minors-problems-with-server-2012
 


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1791 423420c4-83ab-492f-b58f-81f9feb106b5
2014-03-06 11:43:43 +00:00
Henrik Andersson
38ca609c78 Added minimal implementation for TS_AUTORECONNECT_STATUS_PDU.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1789 423420c4-83ab-492f-b58f-81f9feb106b5
2014-02-19 08:57:51 +00:00
Henrik Andersson
f8b0b64742 Update licence constants to match specs for clarity
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1782 423420c4-83ab-492f-b58f-81f9feb106b5
2014-02-06 10:32:52 +00:00
Henrik Andersson
b4dfb9b5e0 Use license terms used in specification for easier overview.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1779 423420c4-83ab-492f-b58f-81f9feb106b5
2014-02-05 09:50:29 +00:00
Henrik Andersson
2503dbb9d9 Cleanup and clarify the implementation of TS_UD_CS_CLUSTER.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1762 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-28 11:10:35 +00:00
Henrik Andersson
f74729b592 Added handling of enhanced security redirect PDU.
Part of the rework of server redirection.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1757 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-26 08:21:06 +00:00
Henrik Andersson
3e0d255bfb Initial cleanup of the redirection implementation.
Renamed redirect cookie to proper redirect load balance info,
also made it dynamically allocated due to its variable length.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1756 423420c4-83ab-492f-b58f-81f9feb106b5
2013-11-26 07:56:04 +00:00
Henrik Andersson
d74b2d4278 Added 4 new disconnect reasons with corresponding return code.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1742 423420c4-83ab-492f-b58f-81f9feb106b5
2013-09-17 14:48:56 +00:00
Henrik Andersson
15e4518b13 Add support to use password argument as pin when logon
using smartcard.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1687 423420c4-83ab-492f-b58f-81f9feb106b5
2012-12-20 16:33:55 +00:00
Henrik Andersson
51014c91df Initial implementation of kerberos server autentication with CredSSP,
disabled by default and is enabled using argument --enable-credssp
to configure script.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1676 423420c4-83ab-492f-b58f-81f9feb106b5
2012-11-15 11:21:01 +00:00