platform/upstream/freerdp.git
4 years agoFixed possible NULL access.
akallabeth [Thu, 2 Apr 2020 08:50:16 +0000 (10:50 +0200)]
Fixed possible NULL access.

4 years agoRefactored gdi region
akallabeth [Tue, 31 Mar 2020 15:17:35 +0000 (17:17 +0200)]
Refactored gdi region

* Added a unit test
* Fixed const correctness of function arguments
* Added return values for all functions

4 years agoProper error return from gdi_rect_str and gdi_regn_str
akallabeth [Tue, 31 Mar 2020 12:19:49 +0000 (14:19 +0200)]
Proper error return from gdi_rect_str and gdi_regn_str

4 years agoRefactored order stream manipulation
akallabeth [Tue, 31 Mar 2020 06:31:24 +0000 (08:31 +0200)]
Refactored order stream manipulation

* Use stream seek instead of setting pointer directly
* Add log messages in case of inconsistencies
* Fixed missing stream advance in update_decompress_brush

4 years agoFixed CVE-2020-11521: Out of bounds write in planar codec.
akallabeth [Mon, 30 Mar 2020 16:18:12 +0000 (18:18 +0200)]
Fixed CVE-2020-11521: Out of bounds write in planar codec.

Thanks to Sunglin and HuanGMz from Knownsec 404

4 years agoFixed CVE-2020-11522: Limit number of DELTA_RECT to 45.
akallabeth [Mon, 30 Mar 2020 16:14:18 +0000 (18:14 +0200)]
Fixed CVE-2020-11522: Limit number of DELTA_RECT to 45.

Thanks to Sunglin and HuanGMz from Knownsec 404

4 years agoFix CVE-2020-11524: out of bounds access in interleaved
akallabeth [Mon, 30 Mar 2020 16:05:17 +0000 (18:05 +0200)]
Fix CVE-2020-11524: out of bounds access in interleaved

Thanks to Sunglin and HuanGMz from Knownsec 404

4 years agoAdded debug logging and claping to all region functions
akallabeth [Mon, 30 Mar 2020 15:57:11 +0000 (17:57 +0200)]
Added debug logging and claping to all region functions

4 years agoFix CVE-2020-11523: clamp invalid rectangles to size 0
akallabeth [Mon, 30 Mar 2020 15:32:04 +0000 (17:32 +0200)]
Fix CVE-2020-11523: clamp invalid rectangles to size 0

Thanks to Sunglin and HuanGMz from Knownsec 404

4 years agoFixed #6012: CVE-2020-11526: Out of bounds read in update_recv_orders
akallabeth [Mon, 30 Mar 2020 15:22:34 +0000 (17:22 +0200)]
Fixed #6012: CVE-2020-11526: Out of bounds read in update_recv_orders

Thanks to @hac425xxx and Sunglin and HuanGMz from Knownsec 404

4 years agoFixed CVE-2020-11525: Out of bounds read in bitmap_cache_new
akallabeth [Mon, 30 Mar 2020 15:13:51 +0000 (17:13 +0200)]
Fixed CVE-2020-11525: Out of bounds read in bitmap_cache_new

Thanks to Sunglin and HuanGMz from Knownsec 404

4 years agoMerge pull request #6034 from akallabeth/addrinfo
Martin Fleisz [Thu, 9 Apr 2020 12:37:39 +0000 (14:37 +0200)]
Merge pull request #6034 from akallabeth/addrinfo

Fix #6033: freeaddrinfo must not be called with NULL arguments.

4 years agoFix #6033: freeaddrinfo must not be called with NULL arguments.
akallabeth [Thu, 9 Apr 2020 12:26:46 +0000 (14:26 +0200)]
Fix #6033: freeaddrinfo must not be called with NULL arguments.

4 years agoEnforce coding style.
akallabeth [Thu, 9 Apr 2020 10:52:07 +0000 (12:52 +0200)]
Enforce coding style.

4 years agoMoves variable declaration to beginning of scope
Julian Albrecht [Tue, 7 Apr 2020 15:59:12 +0000 (17:59 +0200)]
Moves variable declaration to beginning of scope

4 years agoCheck return value if already a listener is registered
Julian Christian Albrecht [Tue, 7 Apr 2020 08:28:21 +0000 (10:28 +0200)]
Check return value if already a listener is registered

4 years agoAlways copy null terminator when filtering smartcard list
Alex Wilson [Wed, 8 Apr 2020 11:03:02 +0000 (21:03 +1000)]
Always copy null terminator when filtering smartcard list

4 years agoAllow old openssl name in android client.
akallabeth [Thu, 9 Apr 2020 06:51:34 +0000 (08:51 +0200)]
Allow old openssl name in android client.

4 years agoFixed cmake formatting
akallabeth [Thu, 9 Apr 2020 06:17:46 +0000 (08:17 +0200)]
Fixed cmake formatting

4 years agoUse cmake from NDK
akallabeth [Wed, 8 Apr 2020 14:58:19 +0000 (16:58 +0200)]
Use cmake from NDK

4 years agoUsed default openssl library names.
akallabeth [Wed, 8 Apr 2020 14:52:51 +0000 (16:52 +0200)]
Used default openssl library names.

4 years agoUpdated android build scripts for ci.
akallabeth [Wed, 8 Apr 2020 10:37:36 +0000 (12:37 +0200)]
Updated android build scripts for ci.

4 years agoMerge pull request #6019 from akallabeth/bound_access_fixes
Norbert Federa [Mon, 6 Apr 2020 11:53:28 +0000 (13:53 +0200)]
Merge pull request #6019 from akallabeth/bound_access_fixes

Fix issues with boundary access.

4 years agoExport remaining packet length from rdp_read_share_control_header
akallabeth [Mon, 6 Apr 2020 11:01:20 +0000 (13:01 +0200)]
Export remaining packet length from rdp_read_share_control_header

4 years agoFixed substream read in rdp_recv_tpkt_pdu
akallabeth [Mon, 6 Apr 2020 09:58:48 +0000 (11:58 +0200)]
Fixed substream read in rdp_recv_tpkt_pdu

4 years agoFixed rdp_recv_tpkt_pdu parsing, use substream.
akallabeth [Mon, 6 Apr 2020 09:22:18 +0000 (11:22 +0200)]
Fixed rdp_recv_tpkt_pdu parsing, use substream.

4 years agoFixed incorrect parser error message.
akallabeth [Mon, 6 Apr 2020 08:42:06 +0000 (10:42 +0200)]
Fixed incorrect parser error message.

4 years agoBetter error message for partial parsed capability
akallabeth [Fri, 3 Apr 2020 13:10:49 +0000 (15:10 +0200)]
Better error message for partial parsed capability

4 years agoserver: fix surface command types
Norbert Federa [Fri, 3 Apr 2020 12:04:12 +0000 (14:04 +0200)]
server: fix surface command types

- Legacy RemoteFX is encapsulated in a "Stream Surface Bits Command" (CMDTYPE_STREAM_SURFACE_BITS)
- NSCodec is encapsulated in a "Set Surface Bits Command" (CMDTYPE_SET_SURFACE_BITS)

References:
- MS-RDPRFX 3.1.8.3.1 RemoteFX Stream / Encode Message Sequencing
- MS-RDPNSC 2.2.2 NSCodec Compressed Bitmap Stream

4 years agoMerge pull request #5982 from akallabeth/surface_stream_set_bits
Norbert Federa [Fri, 3 Apr 2020 10:41:29 +0000 (12:41 +0200)]
Merge pull request #5982 from akallabeth/surface_stream_set_bits

Fix sending/receiving surface bits command.

4 years agoAdded fallback to CMDTYPE_STREAM_SURFACE_BITS
akallabeth [Thu, 2 Apr 2020 10:13:45 +0000 (12:13 +0200)]
Added fallback to CMDTYPE_STREAM_SURFACE_BITS

Since our samples were incorrect, add a fallback with a log warnings
to the old CMDTYPE_STREAM_SURFACE_BITS by default behaviour.

4 years agoFix sending/receiving surface bits command.
akallabeth [Thu, 19 Mar 2020 08:04:59 +0000 (09:04 +0100)]
Fix sending/receiving surface bits command.

* Pass on proper command type to application
* On send let the server implementation decide to send
   2.2.9.2.1 Set Surface Bits Command (TS_SURFCMD_SET_SURF_BITS) or
   2.2.9.2.2 Stream Surface Bits Command (TS_SURFCMD_STREAM_SURF_BITS)
Thanks to @viniciusjarina for tracing the issue down.

4 years agoFixed invalid seek size in patrial pdu parse case
akallabeth [Wed, 1 Apr 2020 07:52:47 +0000 (09:52 +0200)]
Fixed invalid seek size in patrial pdu parse case

4 years agoUse safe seek for capability parsing
akallabeth [Wed, 1 Apr 2020 08:01:49 +0000 (10:01 +0200)]
Use safe seek for capability parsing

thanks to @hardening for pointing that one out.

4 years agoUse substreams to parse gcc_read_server_data_blocks
akallabeth [Wed, 1 Apr 2020 07:56:13 +0000 (09:56 +0200)]
Use substreams to parse gcc_read_server_data_blocks

4 years agoFix #6010: Check length in read_icon_info
akallabeth [Tue, 31 Mar 2020 07:06:05 +0000 (09:06 +0200)]
Fix #6010: Check length in read_icon_info

4 years agoFixed #6013: Check new length is > 0
akallabeth [Tue, 31 Mar 2020 12:36:40 +0000 (14:36 +0200)]
Fixed #6013: Check new length is > 0

4 years agoFixed #6011: Bounds check in rdp_read_font_capability_set
akallabeth [Tue, 31 Mar 2020 12:32:01 +0000 (14:32 +0200)]
Fixed #6011: Bounds check in rdp_read_font_capability_set

4 years agoFixed #6005: Bounds checks in update_read_bitmap_data
akallabeth [Tue, 31 Mar 2020 07:23:42 +0000 (09:23 +0200)]
Fixed #6005: Bounds checks in update_read_bitmap_data

4 years agoFixed #6006: bounds checks in update_read_synchronize
akallabeth [Tue, 31 Mar 2020 07:21:43 +0000 (09:21 +0200)]
Fixed #6006: bounds checks in update_read_synchronize

4 years agoFixed #6009: Bounds checks in autodetect_recv_bandwidth_measure_results
akallabeth [Tue, 31 Mar 2020 07:19:17 +0000 (09:19 +0200)]
Fixed #6009: Bounds checks in autodetect_recv_bandwidth_measure_results

4 years agoFixed #6007: Boundary checks in rdp_read_flow_control_pdu
akallabeth [Tue, 31 Mar 2020 07:14:55 +0000 (09:14 +0200)]
Fixed #6007: Boundary checks in rdp_read_flow_control_pdu

4 years agoFixed possible NULL dereference
akallabeth [Thu, 2 Apr 2020 08:33:44 +0000 (10:33 +0200)]
Fixed possible NULL dereference

4 years agoMerge pull request #5974 from akallabeth/cmd_avc420_fix
Martin Fleisz [Thu, 2 Apr 2020 06:41:47 +0000 (08:41 +0200)]
Merge pull request #5974 from akallabeth/cmd_avc420_fix

Cmd avc420 fix

4 years agoMerge pull request #5884 from akallabeth/smartcard_ndr_strict
Martin Fleisz [Tue, 31 Mar 2020 06:34:04 +0000 (08:34 +0200)]
Merge pull request #5884 from akallabeth/smartcard_ndr_strict

Smartcard tighter input validation

4 years agoAdded missing context and handle read.
akallabeth [Mon, 30 Mar 2020 09:07:47 +0000 (11:07 +0200)]
Added missing context and handle read.

4 years agoPack smartcard channel structs to 1 byte alignment
Armin Novak [Fri, 27 Mar 2020 17:23:33 +0000 (18:23 +0100)]
Pack smartcard channel structs to 1 byte alignment

4 years agoRemoved a few magic numbers.
akallabeth [Fri, 27 Mar 2020 14:03:59 +0000 (15:03 +0100)]
Removed a few magic numbers.

4 years agoFixed typos, make status comparisons explicit.
akallabeth [Fri, 27 Mar 2020 13:49:09 +0000 (14:49 +0100)]
Fixed typos, make status comparisons explicit.

4 years agoFormatted patch.
akallabeth [Fri, 27 Mar 2020 08:08:32 +0000 (09:08 +0100)]
Formatted patch.

4 years agoAdds touch support to wlfreerdp
Julian Albrecht [Wed, 25 Mar 2020 15:52:30 +0000 (16:52 +0100)]
Adds touch support to wlfreerdp

4 years agoFree clipboard respond to fix bug
LatinSuD [Thu, 26 Mar 2020 17:50:44 +0000 (18:50 +0100)]
Free clipboard respond to fix bug

Fixes #5997 (clipboard stops responding in the middle of a session)

4 years agoMerge pull request #5985 from akallabeth/log_version_debug
Martin Fleisz [Thu, 26 Mar 2020 08:55:46 +0000 (09:55 +0100)]
Merge pull request #5985 from akallabeth/log_version_debug

Added buildconfig output to debug log level.

4 years agoTreat NULL and empty string as the same for credentials.
akallabeth [Tue, 17 Mar 2020 10:18:54 +0000 (11:18 +0100)]
Treat NULL and empty string as the same for credentials.

4 years agoMerge pull request #5988 from akallabeth/rdp_parser_leak
Martin Fleisz [Tue, 24 Mar 2020 11:17:05 +0000 (12:17 +0100)]
Merge pull request #5988 from akallabeth/rdp_parser_leak

Fixed memory leak in rdp file parser.

4 years agoMerge pull request #5987 from akallabeth/manual_ack_timeout
Martin Fleisz [Tue, 24 Mar 2020 11:16:08 +0000 (12:16 +0100)]
Merge pull request #5987 from akallabeth/manual_ack_timeout

Add option to adjust the tcp ack timeout

4 years agoFixed memory leak in rdp file parser.
akallabeth [Mon, 23 Mar 2020 14:21:47 +0000 (15:21 +0100)]
Fixed memory leak in rdp file parser.

4 years agoAdd option to adjust the tcp ack timeout
akallabeth [Mon, 23 Mar 2020 07:51:35 +0000 (08:51 +0100)]
Add option to adjust the tcp ack timeout

On high latency links the default of 9 second timeout might be too
strict. Adjusting this for all users will result in a long time
for connections to fail, so let these with high latency links
adjust the value manually.

4 years agoAdded buildconfig output to debug log level.
akallabeth [Fri, 20 Mar 2020 12:05:01 +0000 (13:05 +0100)]
Added buildconfig output to debug log level.

4 years agoInitialize KeyboardHook with define instead of magic number
akallabeth [Wed, 18 Mar 2020 15:36:23 +0000 (16:36 +0100)]
Initialize KeyboardHook with define instead of magic number

4 years agoAllow externally supplied FREERDP_INSTALL_PREFIX
akallabeth [Wed, 18 Mar 2020 12:59:43 +0000 (13:59 +0100)]
Allow externally supplied FREERDP_INSTALL_PREFIX

4 years agoAdded deprecation warning to gfx-h264
akallabeth [Sun, 15 Mar 2020 09:33:53 +0000 (10:33 +0100)]
Added deprecation warning to gfx-h264

4 years agoFixed gfx-h264 option parsing.
akallabeth [Sun, 15 Mar 2020 09:33:34 +0000 (10:33 +0100)]
Fixed gfx-h264 option parsing.

4 years agoserver: proxy: fix wrong log level used in pf_modules_run_filter
Kobi Mizrachi [Thu, 12 Mar 2020 06:43:00 +0000 (08:43 +0200)]
server: proxy: fix wrong log level used in pf_modules_run_filter

4 years agoserver: proxy: removed unnecessary cast after #5955
Kobi Mizrachi [Thu, 12 Mar 2020 06:42:13 +0000 (08:42 +0200)]
server: proxy: removed unnecessary cast after #5955

4 years agoserver: proxy: use config path from argv if provided
Kobi Mizrachi [Thu, 12 Mar 2020 06:41:07 +0000 (08:41 +0200)]
server: proxy: use config path from argv if provided

4 years agoMerge pull request #5943 from akallabeth/x11_lock
Martin Fleisz [Tue, 10 Mar 2020 15:03:54 +0000 (16:03 +0100)]
Merge pull request #5943 from akallabeth/x11_lock

X11 lock recursion checks

4 years agoFixed length checks for compressed rdp data.
Armin Novak [Tue, 10 Mar 2020 09:52:28 +0000 (10:52 +0100)]
Fixed length checks for compressed rdp data.

4 years agoCleaned up bulk_compress/decompress, prettified log.
Armin Novak [Tue, 10 Mar 2020 09:46:13 +0000 (10:46 +0100)]
Cleaned up bulk_compress/decompress, prettified log.

4 years agoFixed misleading log message.
Armin Novak [Tue, 10 Mar 2020 09:32:41 +0000 (10:32 +0100)]
Fixed misleading log message.

4 years agoRefactored bulk compression
Armin Novak [Tue, 10 Mar 2020 09:31:41 +0000 (10:31 +0100)]
Refactored bulk compression

* Arguments now opaque
* Removed internal functions from external interface

4 years agoRemoved unused function
Armin Novak [Tue, 10 Mar 2020 12:37:57 +0000 (13:37 +0100)]
Removed unused function

4 years ago Silenced warning due to missing debug define guard.
Armin Novak [Tue, 10 Mar 2020 12:37:12 +0000 (13:37 +0100)]
 Silenced warning due to missing debug define guard.

4 years ago Silenced warning due to missing define guard.
Armin Novak [Tue, 10 Mar 2020 12:36:41 +0000 (13:36 +0100)]
 Silenced warning due to missing define guard.

4 years agoRemoved unused function
Armin Novak [Tue, 10 Mar 2020 12:36:12 +0000 (13:36 +0100)]
Removed unused function

4 years agoRemoved unused function
Armin Novak [Tue, 10 Mar 2020 12:36:04 +0000 (13:36 +0100)]
Removed unused function

4 years agoRemoved unused function
Armin Novak [Tue, 10 Mar 2020 12:35:54 +0000 (13:35 +0100)]
Removed unused function

4 years agoRemoved unused function
Armin Novak [Tue, 10 Mar 2020 12:35:45 +0000 (13:35 +0100)]
Removed unused function

4 years agoRemoved unused function
Armin Novak [Tue, 10 Mar 2020 12:35:26 +0000 (13:35 +0100)]
Removed unused function

4 years agoRemoved unused function.
Armin Novak [Tue, 10 Mar 2020 12:35:00 +0000 (13:35 +0100)]
Removed unused function.

4 years agoUsing bsearch to get ntstatus string.
Armin Novak [Tue, 10 Mar 2020 12:34:13 +0000 (13:34 +0100)]
Using bsearch to get ntstatus string.

4 years agoSilenced warning due to missing debug define guard.
Armin Novak [Tue, 10 Mar 2020 12:32:37 +0000 (13:32 +0100)]
Silenced warning due to missing debug define guard.

4 years agoRemoved unused functions / files
Armin Novak [Tue, 10 Mar 2020 12:02:39 +0000 (13:02 +0100)]
Removed unused functions / files

4 years agoUnify pReceiveChannelData and psPeerReceiveChannelData
Armin Novak [Mon, 9 Mar 2020 09:58:02 +0000 (10:58 +0100)]
Unify pReceiveChannelData and psPeerReceiveChannelData

Fix definitions of the two function pointers.
Use and definition did not match, fix that.
Will create warnings in external projects

4 years agoFixed misinterpretation of SendChannelData
Armin Novak [Mon, 9 Mar 2020 09:33:58 +0000 (10:33 +0100)]
Fixed misinterpretation of SendChannelData

SendChannelData was defined with a return value of type int, but
used as BOOL everywhere. Fix the definition to match use.

4 years agoFix tpkt header length checks for encrypted packets
Armin Novak [Mon, 9 Mar 2020 20:54:34 +0000 (21:54 +0100)]
Fix tpkt header length checks for encrypted packets

If securityFlag SEC_ENCRYPT is set, remove the encryption headers from
the TPKT header length on comparison.

4 years agoMerge pull request #5963 from akallabeth/fixes
Martin Fleisz [Tue, 10 Mar 2020 09:14:28 +0000 (10:14 +0100)]
Merge pull request #5963 from akallabeth/fixes

Fixes some warnings and checks

4 years agoDefault to positive return for missing callbacks
Armin Novak [Tue, 10 Mar 2020 07:59:11 +0000 (08:59 +0100)]
Default to positive return for missing callbacks

When using +async-update, default to positive return if some
client callback is not implemented.

4 years agoFixed broken NULL check.
Armin Novak [Tue, 10 Mar 2020 07:50:55 +0000 (08:50 +0100)]
Fixed broken NULL check.

4 years agoFixed return check for usbdk backend.
Armin Novak [Mon, 9 Mar 2020 15:22:29 +0000 (16:22 +0100)]
Fixed return check for usbdk backend.

4 years agoRemoved unnecessary cast.
Armin Novak [Mon, 9 Mar 2020 15:21:43 +0000 (16:21 +0100)]
Removed unnecessary cast.

4 years agoMerge pull request #5958 from akallabeth/usb_win_fixes
David Fort [Mon, 9 Mar 2020 14:35:55 +0000 (15:35 +0100)]
Merge pull request #5958 from akallabeth/usb_win_fixes

Fixed missing config include.

4 years agoFixed missing config include.
Armin Novak [Mon, 9 Mar 2020 13:57:20 +0000 (14:57 +0100)]
Fixed missing config include.

4 years agoMerge pull request #5957 from akallabeth/cmake_libusb
Martin Fleisz [Mon, 9 Mar 2020 12:24:53 +0000 (13:24 +0100)]
Merge pull request #5957 from akallabeth/cmake_libusb

Added libusb detection for windows.

4 years agoAdded libusb detection for windows.
Armin Novak [Mon, 9 Mar 2020 11:43:42 +0000 (12:43 +0100)]
Added libusb detection for windows.

4 years agoMerge pull request #5954 from akallabeth/server_config_options
Martin Fleisz [Mon, 9 Mar 2020 09:01:31 +0000 (10:01 +0100)]
Merge pull request #5954 from akallabeth/server_config_options

Server config options

4 years agoDefault proxy modules to OFF
Armin Novak [Mon, 9 Mar 2020 08:14:50 +0000 (09:14 +0100)]
Default proxy modules to OFF

The proxy module sample is c++ 11 which some older build targets
do not like. Deactivate this by default.

4 years agoSet C++ standard for proxy demo target
Armin Novak [Mon, 9 Mar 2020 08:03:19 +0000 (09:03 +0100)]
Set C++ standard for proxy demo target

4 years agoCMake options to compile without proxy or shadow
Armin Novak [Mon, 9 Mar 2020 07:48:57 +0000 (08:48 +0100)]
CMake options to compile without proxy or shadow

* Added WITH_SHADOW (default ON) to compile without shadow server
* Added WITH_PROXY (default ON) to compile without proxy server

4 years agoegfx: client: add missing NULL checks
Kobi Mizrachi [Sun, 1 Mar 2020 11:43:09 +0000 (13:43 +0200)]
egfx: client: add missing NULL checks