Commit Graph

2604 Commits

Author SHA1 Message Date
Martin Haimberger
e9e0764ace libfreerdp/core: transport_write unchecked parameters
transport_write did not check if transport or bio are
set. The transport read checks it. In using fastpath
and for example a mouse input is sent, the transport
is never checked and can cause a segfault.
2016-08-22 02:17:11 -07:00
zihao.jiang
2b6bd2626d rdpgfx: various fixes according to comments
1. Fix stream leak in rdpgfx
2. Make src data const in zgfx. Harden zgfx to be independent to byte order
3. Fix written bytes return value in channel write
4. Add check for return value in shadow_client.c
5. Add gfx callback to send surface command with frame marker pdu.
6. Check remain length for recv subroutine
7. Fix compile errors
2016-08-07 20:15:39 +08:00
zihao.jiang
746a754244 rdpgfx: Implementation for server side channel
server/shadow: support h264 codec with gfx channel
2016-08-07 20:14:33 +08:00
Marc-André Moreau
14cb6d33c6 freerdp: make modifications to NLA server-side fixes according to PR comments 2016-07-22 09:06:07 -04:00
Marc-André Moreau
801dc0f826 freerdp: add configurable NTLM SAM file option for server-side NLA 2016-07-21 18:58:24 -04:00
Marc-André Moreau
1ffbd774e9 freerdp: fix sending of TLS alert on NLA failure, add better handling of server-side NLA in shadow server 2016-07-21 17:53:20 -04:00
Armin Novak
44fc5b521d Added support for OpenH264 1.6 2016-07-04 12:42:57 +02:00
Norbert Federa
ae9460f02f protocol violation: rdp_read_extended_info_packet
The clientTimeZone and all subsequent fields in the Extended Info Packet
(MS RDPBCGR 2.2.1.11.1.1.1) are optional but were not handled as such.
2016-06-27 10:56:40 +02:00
Norbert Federa
6a3b48d4f0 freerdp: remove static inet_ntop
inet_ntop is already implemented in winpr
2016-06-15 18:01:38 +02:00
Giovanni Panozzo
01a8db2c17 Fix some memory leaks in freerdp_settings_free() 2016-06-02 10:23:28 +02:00
akallabeth
345478bd8e Merge pull request #3376 from realjiangms/fix_client_gfx
channels/rdpgfx: Fix for gfx client
2016-05-31 09:37:31 +02:00
Norbert Federa
7a42a8dd5b freerdp/core/gcc: channel name hardening
According to [MS-RDPBCGR 2.2.1.3.4.1 Channel Definition Structure]
the channel name must be an 8-byte array containing a null-terminated
collection of seven ANSI characters that uniquely identify the channel.

We did not check if the transmitted name was null-terminated which
could have the usual severe effects on stabiliy and security since
the channel name is used in several functions expecting a null-
terminated string (strlen, printf, etc.)
2016-05-30 14:40:23 +02:00
Ondrej Holy
e326e43e66 codec/xcrush: Fix endianness in compression
Compression doesn't work on big endian machines currently. The recieved
data are stored as little endian. Use conversion macros from endian.h to
load and store the data properly.

The patch fixes following error (so -compression option is no more needed
on big endian machines):
[06:42:14:782] [13772:13773] [ERROR][com.freerdp.core] - Decompression failure!
[06:42:14:782] [13772:13773] [ERROR][com.freerdp.core.fastpath] - bulk_decompress() failed
[06:42:14:782] [13772:13773] [ERROR][com.freerdp.core.fastpath] - fastpath_recv_update_data() fail
[06:42:14:782] [13772:13773] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1

https://github.com/FreeRDP/FreeRDP/issues/2520
2016-05-30 13:37:15 +02:00
zihao.jiang
e7d9e91864 channels/rdpgfx: Make freerdp_client_codecs_prepare calls codec reset. It fix broken h264 client from #3328. Also it doesn't make sense that we don't need width and height for codec initialization while we need them for codec reset 2016-05-30 02:00:05 +08:00
Norbert Federa
e8c4910e2e fix segfaults casused by size_t format specifier
win32/msvc cc does not recognize the %z format specifier which caused
invalid references and segfaults on win32.
Until FreeRDP gets format specifier macros we'll cast size_t to
unsigned long and use the %lu specifier.

Also simplified winpr_backtrace_symbols() a little bit and fixed it
to allocate the correct amount of bytes for the return buffer.
2016-05-27 15:55:28 +02:00
byteboon
158be3a9f0 fixed kerberos authentication
Details: cbSecurityTrailer was assumed to be a fixed length for all signatures, however for Kerberos authentication the signature may generate smaller than this value
2016-05-16 09:53:38 -07:00
Hardening
4e66df7228 Merge pull request #3333 from akallabeth/memleak_fixes
Memleak fixes
2016-05-13 11:32:48 +02:00
Marc-André Moreau
1b97593642 Merge pull request #3341 from awakecoding/xcrush_fix
proper xcrush context reset fix
2016-05-12 14:38:23 -04:00
Marc-André Moreau
a75d89d615 libfreerdp-codec: make proper xcrush context reset fix 2016-05-12 14:24:53 -04:00
Marc-André Moreau
ed326f6662 Merge pull request #3339 from awakecoding/xcrush_fix
libfreerdp-codec: fix xcrush decompression, revert remote control fix
2016-05-12 09:41:57 -04:00
Marc-André Moreau
892531d492 libfreerdp-codec: fix xcrush decompression, revert remote control fix 2016-05-12 09:22:24 -04:00
Armin Novak
eacf2b542e Fixed memory leaks. 2016-05-12 10:01:30 +02:00
Marc-André Moreau
9b7c53c90a Merge pull request #3329 from awakecoding/hv_fix
freerdp: fix Hyper-V connectivity, fix issues #2421 and #3325
2016-05-11 17:00:35 -04:00
Marc-André Moreau
b24df90063 Merge pull request #3330 from awakecoding/xcrush_fix
xcrush context flush fix
2016-05-11 16:47:50 -04:00
Marc-André Moreau
a0630dee07 libfreerdp-codec: fix xcrush context flush 2016-05-11 16:35:20 -04:00
Marc-André Moreau
e4714f3422 freerdp: fix Hyper-V connectivity, fix issues #2421 and #3325 2016-05-11 15:52:36 -04:00
Marc-André Moreau
56f9b18276 libfreerdp-codec: fix error on empty RFX tileset, which can sometimes happen 2016-05-11 13:53:34 -04:00
Marc-André Moreau
54cdd6a1ae channels/rdpgfx: fix resetting of codec contexts 2016-05-11 13:42:54 -04:00
Marc-André Moreau
915b9a15b1 Merge branch 'master' of github.com:FreeRDP/FreeRDP
Conflicts:
	winpr/libwinpr/bcrypt/CMakeLists.txt
2016-05-11 11:05:17 -04:00
Bernhard Miklautz
a61a642c9a core: don't advertise multi layout PDUs
If support for multi layout PDUs is advertised there are known issues
with Windows 7 and Windows 2008R2. Until those are resolved generally
disable multi layout PDUs.

See #3114 for details.
2016-05-04 09:47:23 +02:00
Bernhard Miklautz
f828595609 Merge pull request #3282 from akallabeth/input_arg_checks
Added argument checks for exported input functions.
2016-05-03 17:04:45 +02:00
Bernhard Miklautz
221a292b04 Merge pull request #3263 from akallabeth/tofu
Added command line option /cert-tofu
2016-05-03 16:27:15 +02:00
Armin Novak
115f59d9b0 Added argument checks for exported input functions. 2016-05-03 16:17:22 +02:00
Bernhard Miklautz
9d98759801 libfreerd/color: fix typo
Source: http://anonscm.debian.org/cgit/collab-maint/freerdp2.git/commit/?id=f3c1f25bbfe0f17a0d1317096984b73db6fa1f38
2016-05-02 18:32:32 +02:00
akallabeth
a62d962bc7 Merge pull request #3250 from mfleisz/cssp_v3
core: Add support for CredSSP version 3
2016-04-26 09:59:40 +02:00
Norbert Federa
9f148e6712 core: allow TS Gateway protocol violation
According to [MS-RDPBCGR 2.2.1.11.1.1.1] the TS_EXTENDED_INFO_PACKET
structure's cbClientAddress field must include the _mandatory_ NULL
terminator of the clientAddress field in its byte count.
However, connections proxied via Microsoft's TS Gateway set the
cbClientDir value to 0.
2016-04-19 14:09:58 +02:00
Norbert Federa
4ae77b8273 core: allow ms android client protocol violation
According to [MS-RDPBCGR 2.2.1.11.1.1.1] the TS_EXTENDED_INFO_PACKET
structure's cbClientDir field must include the _mandatory_ NULL
terminator of the ClientDir field.
However, since version 8.1.31.44, the Microsoft Remote Desktop Client
for Android sets cbClientDir to 0.
2016-04-11 10:50:27 +02:00
Norbert Federa
6ee445339b core: fix broken rdp security (server side)
- fixed typo in rdp_server_establish_keys
2016-04-08 14:47:35 +02:00
Armin Novak
53445768ed Added command line option /cert-tofu 2016-03-31 12:16:55 +02:00
Bernhard Miklautz
a0d9969a30 Merge pull request #3254 from akallabeth/avc444_cmd_arg
Added advanced gfx command line options.
2016-03-31 11:43:38 +02:00
Marc-André Moreau
cedf6d98e2 freerdp: more UWP porting 2016-03-29 20:34:52 -04:00
Marc-André Moreau
4d629a7999 freerdp: UWP porting 2016-03-29 16:03:15 -04:00
Bernhard Miklautz
9e8c6c99b6 First shot on fixing over linking
If a target is linked against libraries with cmake
(target_link_libraries) and the libraries are not marked as PRIVATE
they are "exported" and in case a other target is linked against this
target it is also linked against *all* (not private) libraries.

Without declaring private libraries PRIVATE a lot of over linking
(linking against unneeded libraries) was done.
2016-03-29 18:14:34 +02:00
Armin Novak
50873be062 Added advanced gfx command line options. 2016-03-24 16:36:43 +01:00
Martin Fleisz
5d956ebbb1 core: correctly set last error on credssp errors 2016-03-21 16:58:09 +01:00
Martin Fleisz
34a7c1860d core: Propagate credssp error code by setting last error 2016-03-21 10:23:18 +01:00
Martin Fleisz
1c2d315354 core: Add support for CredSSP version 3 2016-03-18 13:32:13 +01:00
David FORT
2cb3717d65 Fixed a typo in debug messages 2016-03-17 10:44:11 +01:00
Armin Novak
7faff04ec0 Assume the update rectangle is inclusive. 2016-03-16 13:46:47 +01:00
Armin Novak
dfdc4c38f9 Fixed comments. 2016-03-16 13:43:18 +01:00
Armin Novak
5bc333c626 Implemented GFX AVC444 support. 2016-03-16 13:43:18 +01:00
Armin Novak
3309bf8f9c Implemented YUV444 related primitives. 2016-03-16 13:43:17 +01:00
Armin Novak
3a3ec85898 Unified RDPGFX_RECT16 and RECTANGLE_16 2016-03-16 13:43:17 +01:00
Bernhard Miklautz
228f6b116b Merge pull request #3207 from akallabeth/mic_crash_fix
Fixed error handling for channel load failures.
2016-03-16 13:03:33 +01:00
Armin Novak
059c754b0d Fixed double free. 2016-03-16 12:39:36 +01:00
Marc-André Moreau
9211f44e46 Merge branch 'master' of github.com:FreeRDP/FreeRDP 2016-03-15 20:19:15 -04:00
Martin Fleisz
b2d24a4dd2 freerdp: Fix possible crash when setting error info in server-mode 2016-03-14 15:27:15 +01:00
Armin Novak
2dbc1a0b87 Reverted WTS API changes. 2016-03-14 13:19:08 +01:00
Armin Novak
d06723e297 Fixed return value for failed malloc. 2016-03-14 13:13:43 +01:00
Armin Novak
36cbf1b583 Fixed error handling for channel load failures. 2016-03-14 13:13:43 +01:00
Marc-André Moreau
3cbd7c08f7 freerdp: fix freerdp_connect possible incorrect status code 2016-03-11 14:42:16 -05:00
Martin Fleisz
66ae3f2c77 Merge pull request #3177 from akallabeth/codec_reset_fix
Fixed codec reset, now resetting resolution too.
2016-03-11 11:22:59 +01:00
David FORT
b3c0478305 Don't require HOME env var to be set for server-side code 2016-03-09 14:10:31 +01:00
Armin Novak
2208a84cd4 Moved assistance to winpr crypto. 2016-03-07 11:51:13 +01:00
Norbert Federa
de4adeff0e fix logon info processing
since there have been reports that certain windows versions send
zero values in the cbDomain field of the Logon Info Version 2
(TS_LOGON_INFO_VERSION_2) struct we allow zero values for cbUserName
and cbDomain in rdp_recv_logon_info_v1 and rdp_recv_logon_info_v2.
2016-03-04 00:45:26 +01:00
Norbert Federa
ef4b29e5b3 ConvertFromUnicode fixes and misc hardening
- Added missing ConvertFromUnicode checks
- If ConvertToUnicode allocates memory, guarantee the null termination
  similar to ConvertFromUnicode's implementation
- Fixed some TestUnicodeConversion.c CTest return values
- Added some CTests for ConvertFromUnicode and ConvertToUnicode
- Misc code and protocol hardening fixes in the surrounding code regions
  that have been touched
2016-03-03 16:56:19 +01:00
David FORT
f5ce5e72dd Fix parsing of saveSessionInfo PDU
This should fix the case when no username is sent (issue #3186).
2016-03-03 11:45:12 +01:00
Armin Novak
7dcba9a663 Removed additional '\0' from TUNNEL_AUTH message. 2016-03-03 09:11:28 +01:00
Armin Novak
5bb68a0b39 Fixed broken resource cleanup. 2016-03-02 14:46:33 +01:00
Armin Novak
8997c6c03a Added log messages for unsupported surface commands. 2016-03-02 14:46:33 +01:00
Armin Novak
2e110c7f35 Fixed codec reset, now resetting resolution too.
H264 and others require the surface resolution to work properly.
This initializes the codecs and the resolution on reset.
2016-03-02 14:46:33 +01:00
Bernhard Miklautz
e02af8287e Merge pull request #3160 from akallabeth/stream_fixes
Stream fixes
2016-03-01 16:44:19 +01:00
Armin Novak
e7814d5855 Fixed stream API for Stream_Copy. 2016-03-01 12:57:48 +01:00
Bernhard Miklautz
014f31db35 Merge pull request #3171 from akallabeth/crypto_simplification
Crypto simplification
2016-02-29 17:10:53 +01:00
Bernhard Miklautz
25506348d0 Merge pull request #3168 from akallabeth/visibility_fixes
Fixed default visibility.
2016-02-29 16:59:58 +01:00
Armin Novak
46fa7ec481 Fixed invalid stream copy length. 2016-02-29 12:51:54 +01:00
Armin Novak
b429d230cb Refactored crypto *_New functions. 2016-02-29 09:00:02 +01:00
Armin Novak
92c15783dc Updated RC4 API, fixed crashing bug. 2016-02-28 11:19:29 +01:00
Armin Novak
238ff3b315 Unified encryption functions. 2016-02-27 23:28:49 +01:00
Armin Novak
5805ba8e52 Removed crypto_nonce. 2016-02-27 22:40:43 +01:00
Armin Novak
1036f1e296 Fixed default visibility.
When nothing is declared, only export symbols defined
with WINPR_API or FREERDP_API defined.
Override this setting if BUILD_TESTING to allow tests
access to internal functions usually not exposed.
2016-02-26 19:44:14 +01:00
Armin Novak
dccf40c2bc Fixed duplicate loading of smartcard and printers. 2016-02-26 15:21:11 +01:00
Martin Fleisz
4f22682ed2 Merge pull request #3151 from akallabeth/timezone_refactor
Timezone refactor
2016-02-26 09:57:35 +01:00
Hardening
4217262680 Merge pull request #3156 from akallabeth/ssl_wrapper_merge
Ssl wrapper merge
2016-02-26 09:52:43 +01:00
Armin Novak
fe8f5dee82 Fixed indentation. 2016-02-26 09:32:17 +01:00
Armin Novak
7a253bae42 Replaced magic numbers with defines. 2016-02-26 09:27:53 +01:00
Armin Novak
e79eee2bb1 Fixed Stream API misuse. 2016-02-25 20:01:12 +01:00
Armin Novak
b61ab5ecb7 Fixed stream copy in update_message_SurfaceCommand 2016-02-25 19:37:20 +01:00
Bernhard Miklautz
8bdad1eb93 Merge pull request #3140 from hardening/printer_work
Misc changes
2016-02-25 16:57:34 +01:00
Armin Novak
fd415cd10a Fixed missing semicolon. 2016-02-25 09:02:46 +01:00
Armin Novak
f997421098 Unified hmac functions. 2016-02-24 21:50:08 +01:00
Armin Novak
4ca6b9bf10 Unified random functions and remaining MD5. 2016-02-24 20:41:01 +01:00
Armin Novak
95058c64d1 Fixed argument checks and return values. 2016-02-24 20:16:33 +01:00
Armin Novak
ada2b16c50 Unified RC4 functions. 2016-02-24 17:04:03 +01:00
Armin Novak
06da644007 Unified md5 functions. 2016-02-24 16:46:25 +01:00
Armin Novak
0e4ea3943a Unified sha1 functions. 2016-02-24 16:36:15 +01:00
Armin Novak
447ac23aee Refactored timezone functions. 2016-02-24 09:28:30 +01:00
akallabeth
7c5fcc9ee2 Merge pull request #3149 from bmiklautz/feb22
Misc fixes
2016-02-23 20:23:52 +01:00
Bernhard Miklautz
738f55a6a8 Merge pull request #3119 from akallabeth/abort_event_reset
Resetting abortEvent only on connect and reconnect.
2016-02-23 17:14:08 +01:00
Armin Novak
d28cb6ac6a Removed function call with invalid arguments. 2016-02-23 16:32:47 +01:00