Commit Graph

76 Commits

Author SHA1 Message Date
David FORT
c03bf75896 Take in account @nfedera's comments 2015-04-07 21:06:53 +02:00
David FORT
0eb399a717 Treat return values for security.c
This patch make functions in security.c return values when they should instead of
beeing void. And it also fix the callers of these functions.
2015-04-01 11:11:37 +02:00
Bernhard Miklautz
74c8400789 coding style fixes
Add missing space after if
2015-03-30 17:15:45 +02:00
Bernhard Miklautz
f469e069dc stream: Stream_Ensure*Capacity: change return type
Change the return type of Stream_Ensure*Capacity from void to BOOL to be
able to detect realloc problems easily. Otherwise the only way to detect
this was to check if the capacity after the call was >= the required
size.
In case Stream_Ensure*Capacity fails the old memory is still available
and need to freed outside.

This commit also adds checks to most calls of Stream_Ensure*Capacity to
check if the call was successful.
2015-03-30 16:33:48 +02:00
Bernhard Miklautz
3c7662517c hardening
Start to add missing checks for:
* *alloc
* *_New
2015-03-25 17:38:21 +01:00
Norbert Federa
4c4019203a core/fastpath: removed flawed slow-path conversion
Commit 0357a38e31 modified the function
fastpath_send_update_pdu() to check if the desired update is possible
by checking the payload size against the computed maxLength and the
clients's advertised max request size.
If the check failed that commit added a workaround which simply
copied the payload to a slow path updade.
This workaround is totally flawed and causes protocol errors:
- the fast path update code is not checked and required data format
  conversions are missing
- depending on the fast path update code rdp_send_data_pdu() would
  have to be called with differend data pdu type values but the
  workaround always uses DATA_PDU_TYPE_UPDATE
- the workaround does not check if the total size would exceed
  the maximum possible size for a slow path update

The check if a fast path output is actually possible with the
passed parameters is basically a good idea.
However, if that check fails it would only indicate an error in
the server implementation who must not generate updates that
exceed the client's max request size.
Even though a slow-path conversion would be possible there is
much more involved than simply copying the payload stream.
In addition it is highly doubtful if there is a benefit at all.
Even the oldest rdesktop and windows ce clients do support fast
path and although some lack the multi-fragment update capability
we cannot really send larger updates using slow-path outputs.

For the reasons elucidated above, I have removed the workaround
but kept a modified version of the check if a fast-path output
is possible at all.
2015-02-03 13:51:35 +01:00
Hardening
e04f90eada Offer to disable bulk compression when using remoteFx
This patch adds a skipCompression field in surface commands struct so that
we can disable bulk compression with remoteFx.
2014-11-04 16:14:53 +01:00
Mike McDonald
5fa6fa7013 Merge branch 'master' of https://github.com/awakecoding/FreeRDP into awakecoding-staging 2014-10-20 14:42:46 -04:00
Mike McDonald
0357a38e31 Fix to properly negotiate fast-path fragmentation. 2014-09-30 21:12:20 -04:00
Armin Novak
2f519d7f16 Replaced logging in libfreerdp with wlog defines. 2014-09-15 08:48:46 +02:00
Armin Novak
f4c133eaf8 Replaced custom logging mechanism with WLog wrapper. 2014-08-07 16:51:24 +02:00
Bernhard Miklautz
2bb0659fb4 core: improve fast-path multifragment handling
* make sure fast-path packages are not fragmented if no
  multifragment support was announced
* handle special server side case where the multifragment size
  received from the client is smaller than one maximum fast-path
  PDU size
2014-07-24 16:29:46 +02:00
Hardening
532c42052a Fixes for CVE-2014-0250
This patch introduce misc checks when receiving pointer updates. We check
that the cursor are in the bounds defined by the spec. We also check that
the announced mask sizes are what they should be.
2014-05-28 23:07:00 +02:00
Marc-André Moreau
d08b6fe4bd libfreerdp-codec: fix handling of PACKET_AT_FRONT, PACKET_FLUSHED in MPPC compression 2014-04-20 21:28:09 -04:00
Bernhard Miklautz
76b7ecd1b7 core/fastpath: fix compiler warning 2014-04-17 12:16:10 +02:00
Norbert Federa
18cb418c81 core: FIPS for fastpath and RDP security fixes
- fixed invalid stream position if extEncryptionMethods is not used
- enabled 56bit rdp security method
- fixed entropy reduction of the keys for 40 bit and 56 bit
- added rdp security incl. FIPS for fastpath output
- added FIPS encryption to fast path input
- fixed FIPS key generation in server mode
- fixed stream length correction in FIPS mode
- added rdp encryption for licensing packets (apparently some clients,
  specifically cetsc, require the license packets received from the
  server to be encrypted under certain RDP encryption levels)
- replace errnous virtual extended mouse event in focus in event
2014-04-02 14:17:39 +02:00
Marc-André Moreau
797d326252 libfreerdp-core: fix handling of uncompressed packets 2014-03-26 09:16:28 -04:00
Marc-André Moreau
23cb561a53 libfreerdp-core: fix RDP4 compression 2014-03-21 10:27:11 -04:00
Marc-André Moreau
4d9a3dc218 libfreerdp-core: change internal fastpath utils function declarations 2014-03-12 12:09:14 -04:00
Marc-André Moreau
88bebd1f15 libfreerdp-core: add support for RDP4 MPPC compression 2014-03-11 22:33:41 -04:00
Marc-André Moreau
37e037ee71 libfreerdp-core: hook new MPPC compressor successfully 2014-03-11 20:58:35 -04:00
Marc-André Moreau
d52acf9099 libfreerdp-core: start hooking new MPPC compressor 2014-03-11 17:52:34 -04:00
Marc-André Moreau
d2ed1793fa libfreerdp-core: cleanup fastpath update fragmentation 2014-03-11 17:25:00 -04:00
Marc-André Moreau
affc5d5cc4 libfreerdp-core: further reduce fastpath output sending 2014-03-11 15:35:15 -04:00
Marc-André Moreau
69534400a6 libfreerdp-core: simplify server-side fastpath fragmentation code 2014-03-11 14:43:28 -04:00
Marc-André Moreau
f31676e4e4 libfreerdp-codec: make MPPC compressor produce output identical to Microsoft implementation 2014-03-10 15:06:23 -04:00
Marc-André Moreau
2f756745e9 libfreerdp-core: wrap old MPPC implementation under rdpBulk 2014-03-10 13:15:10 -04:00
Marc-André Moreau
61ecd0ff31 libfreerdp-core: add bulk.c to handle bulk compression in a centralized place 2014-03-10 11:41:10 -04:00
Bernhard Miklautz
2802efd52a fastpath: fixed sending of multiple input messages 2013-09-02 18:07:55 +02:00
Marc-André Moreau
8ca74a2766 libfreerdp-core: add support for server-side bitmap updates 2013-08-07 21:47:03 -04:00
Vic Lee
21796ad73d libfreerdp-core/fastpath: fix memory leak when sending large packet. 2013-08-04 17:23:32 +08:00
Monty
f8fa2f9f5d fixed error on compilation WITH_DEBUG_RDP ON that was raising due to wrong variable in debug statement 2013-07-07 12:14:38 +05:30
Marc-André Moreau
e8c5e6c70b libfreerdp-core: send using separate streams, re-enable frame acks 2013-05-15 18:05:40 -04:00
Marc-André Moreau
367ebf32a3 freerdp: make use of stream macros to access members 2013-05-15 12:14:26 -04:00
Marc-André Moreau
841c710e1c libfreerdp-core: server-side update combining 2013-05-09 16:30:28 -04:00
Marc-André Moreau
fdf3ddcf9e freerdp: purge deprecated stream utils 2013-05-08 17:48:30 -04:00
Marc-André Moreau
fd230443c5 freerdp: purge old stream utils 2013-05-08 16:27:21 -04:00
Marc-André Moreau
5b92413843 freerdp: purge deprecated stream utils 2013-05-08 16:09:16 -04:00
Marc-André Moreau
64df210a1d libfreerdp-core: fix messy merge 2013-05-08 15:25:24 -04:00
Marc-André Moreau
5e4365788f freerdp: merge with master 2013-05-08 15:15:15 -04:00
Marc-André Moreau
b4cac74136 xfreerdp-server: fix RemoteFX encoding 2013-05-01 18:15:55 -04:00
Marc-André Moreau
946d7ec589 libfreerdp-core: fix compression with stream pool 2013-04-30 11:26:33 -04:00
Marc-André Moreau
83af4266bf libfreerdp-core: refactor fastpath fragmentation 2013-04-29 23:55:44 -04:00
Marc-André Moreau
51715636a5 freerdp: remove some deprecated stream utils 2013-04-29 22:35:15 -04:00
Nigel Reeves
7dedd884b9 Merge branch 'master' of https://github.com/FreeRDP/FreeRDP.git 2013-04-15 11:15:49 +01:00
Nigel Reeves
fb2a087dbf Fix to issue #773. Ensure resume in correct NumLock state, when reconnectin to a session 2013-04-15 11:14:09 +01:00
Marc-André Moreau
d776a2d4ea libfreerdp-core: start using stream pool 2013-04-12 17:05:42 -04:00
Hardening
7701c9d934 Replace printf(...) by fprintf(stderr, ...) 2013-03-28 23:06:34 +01:00
Marc-André Moreau
8c8a82c31f libfreerdp-utils: purge old STREAM utils 2013-03-21 16:45:25 -04:00
Marc-André Moreau
a8201b0d1b libwinpr-utils: combine old and new stream utils 2013-03-21 15:19:33 -04:00