Commit Graph

4533 Commits

Author SHA1 Message Date
Armin Novak
880c603c26 Renamed HashTable_Add to HashTable_Insert
* Since the changes break HashTable_Add rename it so that it will
  not fail silently
2021-06-16 11:46:42 +02:00
Armin Novak
d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
akallabeth
460fef545d Refactored NLA
* Simplified client/server state machine
* Encapsulated steps in functions
* Added proper debug logging so that state changes are easy to
  follow
2021-06-09 11:03:37 +02:00
akallabeth
bfbe6b62b5 Removed GSS_API error code hacks 2021-06-09 11:03:37 +02:00
Armin Novak
959923c633 Fixed codeQL warnings 2021-06-08 08:21:47 +02:00
Armin Novak
c5fded2d83 Improved runtime of unit tests 2021-06-08 08:21:47 +02:00
Armin Novak
2a91afb0cf Added adjustable tcp connect timeout 2021-06-08 08:21:47 +02:00
Armin Novak
7586ffd913 Fixed issues with planar codec buffer alignment
Align width and height to next multiple of 4 to avoid issues with
internal buffer sizes.
2021-06-02 13:11:24 +02:00
Armin Novak
7f5f91766a Increased TestSuccess startup delay
jenkins run tests are really slow :/
2021-06-01 14:18:01 +02:00
Armin Novak
4f4e546cd4 Fixed initial alpha values for codec buffers 2021-06-01 14:18:01 +02:00
Biswapriyo Nath
06315d0c5c codec/h264: Remove unused IMFDXGIDeviceManager and GUIDs declarations. 2021-05-31 13:38:19 +02:00
Biswapriyo Nath
173ab04b59 Use same data types as calling function prototypes. 2021-05-31 13:38:19 +02:00
akallabeth
6b36c6d417
Replace fopen and path functions with wrappers (#7043)
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
akallabeth
8e43f90590 Fixed #7045: allow NULL isser and subjects in certificates 2021-05-28 09:25:33 +02:00
akallabeth
fa73a2ba55 Fixed const correctness warning 2021-05-28 09:25:33 +02:00
Pascal Nowack
e8d146be71 codec/progressive: Allow the usage of multithreading for decoding
While decoding RemoteFX encoded frames is multithreaded, decoding
RemoteFX Progressive frames is not, although both codecs work
relatively similarly.
This is especially noticeable with frames, that have a resolution
larger than 1920x1080 pixels.

decompress_tile_first() and decompress_tile_upgrade() can both run in
different threads at the same time for different tiles without necessary
adjustments.

So, do exactly that using the ThreadPool that already exists in the
RFX_CONTEXT to decrease the decoding time and therefore increase the
performance.
On a 3K display (2880x1620 pixels) this makes out of a choppy
experience a fluid experience.
2021-05-25 10:16:36 +02:00
Pascal Nowack
11248b18c1 codec/progressive: Fix a memory leak
When checking whether tiles and updatedTileIndices are both non-NULL,
one of them might be NULL, while the other struct member might not
be NULL and progressive_surface_context_new() leaks then the non-NULL
struct member.

Fix this by freeing both struct members, when aborting in
progressive_surface_context_new().
free() will take no action on pointers that are NULL, so no additional
check is needed.
2021-05-25 10:16:36 +02:00
Theo Buehler
9914dbc770 Fix build for upcoming LibreSSL version
SSL will become opaque in LibreSSL 3.4.x, hence the code reaching inside
it will result in build breakage. This was done at the time for lack of
BIO_up_ref() support, which has been available since LibreSSL 2.7.0, so
adjust the relevant #ifdefs accordingly.
2021-05-25 10:06:32 +02:00
Biswapriyo Nath
37bbf9d218 CMake: Install DLLs in bin folder.
In Win32 platform, executables and runtime libraries need to be in one folder.
2021-05-25 09:41:44 +02:00
akallabeth
ddfdbb1300 Added rdg_read_http_unicode_string error messages
Added log entries in case something in the packet is wrong
2021-05-25 08:54:09 +02:00
Armin Novak
6f2c6625e4 Added FREERDP/WINPR prefix to define GIT_REVISION 2021-05-18 13:37:34 +02:00
Armin Novak
2b19576fc7 Fixed compiler warnings, function arguments and const parameter 2021-05-18 13:37:34 +02:00
akallabeth
80d7f206af
Refactored settings string setter (#7014)
* Common function to clear strings
* Set string memory to '\0' before free
2021-05-18 11:22:27 +02:00
akallabeth
3765a9fe35 Fixed AAC encoding for microphone
* Fixed b-frame interval for FFMPEG
* Fixed sample size for FAAC
2021-05-11 15:33:23 +02:00
akallabeth
c10a030ec6 Fixed use fo crypto_rsa_public_encrypt in license module 2021-05-11 08:00:18 +02:00
akallabeth
d4ebf8546f Cleaned up crypto API 2021-05-11 08:00:18 +02:00
akallabeth
b494a193db Refactored certificate API:
* Proper encapsulation
* known_hosts2 backend extended (storing PEM)
* New backend storing each host certificate in a file
2021-05-11 08:00:18 +02:00
akallabeth
c3171b90cb Removed unit tests for legacy known_hosts file 2021-05-11 08:00:18 +02:00
akallabeth
384f997aa7 Removed support for obsolete known_hosts file. 2021-05-11 08:00:18 +02:00
akallabeth
ab49694101 Added new RDP file options 2021-05-11 07:59:05 +02:00
akallabeth
9e466abe6f Fixed #6989: Use X509_STORE_set_default_paths 2021-05-03 13:37:26 +02:00
Armin Novak
bad528d36b Added version check for deprecated ffmpeg symbols 2021-05-03 10:38:35 +02:00
Biswapriyo Nath
a3a89a43f7 Fix intialization, remove some unused variables. 2021-04-28 17:11:31 +02:00
Biswapriyo Nath
3a1168cbda Check _MSC_VER for MSVC specific pragma directives. 2021-04-28 17:11:31 +02:00
Ondrej Holy
892cbe3261 Fix various memory leaks reported by Coverity
Covscan report contains various memory leak defects which were marked
as important. I have spent some time analyzing them and although they
were marked as important, most of them are in error cases, so probably
nothing serious. Let's fix most of them anyway. The rest are false
positives, or too complicated to fix, or already fixed in master, or
simply I am unsure about them.

Relates: https://github.com/FreeRDP/FreeRDP/issues/6981
2021-04-27 14:25:20 +02:00
Ondrej Holy
ac25baa5ee codec/rfx: Silence BAD_FREE reported by Coverity
The `rfx_context_free` function uses the `rfx_message_free` function
with an address of the statically allocated `RFX_MESSAGE` struct. This
causes that the following is reported from covscan:

```
address_free: "rfx_message_free" frees address of "context->currentMessage".
```

I am convinced that this is just false-positive as the address is freed
only when `freeArray` is `0`, which is not in case of `RFX_CONTEXT`.
Let's add a code annotation to silence the false-positive next time.
2021-04-27 14:25:20 +02:00
akallabeth
187946e965 Removed duplicated escape 2021-04-27 11:48:39 +02:00
akallabeth
d4ae65dbb5 Added version to client log, removed build_date 2021-04-22 14:07:37 +02:00
akallabeth
2ea7ac0c06 Unified bin to hex and hex to bin conversion
* Added new functions in WinPR
* Added unit tests for new functions
* Replaced existing (internal) conversion functions
2021-04-19 10:45:21 +02:00
akallabeth
ef6e4c0570
ADDIN_ARGV cleanup, added camera setting to RDP parser (#6947)
* Added camerastoredirect to RDP parser

* Refactored ADDIN_ARGV handling

* Added ADDIN_ARGV unit tests
2021-04-12 10:38:40 +02:00
Martin Fleisz
6fa9896474 core: Clear message queue to reset its closed state 2021-04-08 14:01:50 +02:00
akallabeth
7d4a84ca89 Added error logging. 2021-04-06 09:18:37 +02:00
akallabeth
721e05fc34 Reenabled multithreadded decoding 2021-04-06 09:18:37 +02:00
akallabeth
6f2bc2f3ac Fixed artifacts with yuv420/yuv444 decoding 2021-04-06 09:18:37 +02:00
sss
0bf5ebb68a
fixed tests 2021-03-30 21:20:56 +03:00
sss
4a2514b58d
reverted olf signature for rfx_context_new 2021-03-30 11:03:15 +03:00
sss
6b76ac9545 Revert "Revert "allow to use in single threaded mode" (#6864)"
This reverts commit f7465af44f.
2021-03-26 11:50:45 +01:00
Armin Novak
317e334cc3 Refactored YCoCg converstion 2021-03-20 14:31:43 +01:00
Armin Novak
67dbb7907a Fixed destination buffer offset in planar_decompress 2021-03-20 14:31:43 +01:00
Armin Novak
1407925aba Added freerdp_planar_switch_bgr to test 2021-03-20 14:31:43 +01:00
Armin Novak
e0bc548bf8 Added missing bounds check. 2021-03-12 10:52:04 +01:00
Armin Novak
9c8cce3acb Added fuzzying test for planar decoder 2021-03-12 10:52:04 +01:00
Armin Novak
cf09443c43 Added bounds checks to gfx commands 2021-03-12 10:52:04 +01:00
Armin Novak
5fc2290c03 Added option to disable gateway websocket support 2021-03-08 14:33:05 +01:00
akallabeth
fd902fb345
Win fixes multiple warnings + YUV decoder crash (#6873)
* Fixed conditional reading of regisrty values.

* Fixed sign warnings

* Removed use of deprecated settings functions

* added missing include

* Removed unused functions.

* Refactored registry reading functions

* Fixed TCHAR preprocessor for printf

* Fixed compilation warnings.

* Added bounding rectangle check for multithreadded yuv decoder

* Ensure yuv step calculation height is always >0

* Deactivate multithreadded YUV decoder until artifacts are fixed.
2021-03-08 12:48:22 +01:00
akarl
7382a5c7bf use tlsOut BIO when using websocket in rdg_bio_ctrl 2021-03-05 22:02:49 +01:00
Armin Novak
b0e8da6ee5 Fix yuv444_combine_work_callback check_rect argument 2021-03-05 15:49:31 +01:00
akallabeth
f7465af44f
Revert "allow to use in single threaded mode" (#6864)
This reverts commit bee2e1526d.
2021-03-05 13:02:38 +01:00
Armin Novak
b8bada17a8 Fixed yuv multithread decode
* Calculate step width depending on input rectangles
2021-03-03 17:11:48 +01:00
akallabeth
f346793970 Refactored encoder functions to return changed areas 2021-03-01 11:52:07 +01:00
akallabeth
50acf72615 Refactored H264 encoding/decoding
Use YUV primitives now for all H264 operations
2021-03-01 11:52:07 +01:00
akallabeth
c67e4df96b Added getter/setter for settings 2021-03-01 11:03:52 +01:00
akallabeth
3b7af0293e Fixed primitiveYUV unit test. 2021-02-25 14:18:01 +01:00
akallabeth
6c6e31217d Ignore alpha channel during color conversion.
Most GFX graphics do not carry alpha data. Keep the original
alpha value unless specified otherwise.
2021-02-25 14:18:01 +01:00
sss
6574fdf6e4 reverted changes from clang-format 2021-02-25 14:05:40 +01:00
Gluzskiy Alexandr
bee2e1526d allow to use in single threaded mode
(some client side channels and all server side channels still need to be
ported to new api)

server: build fix, do not disable threads for rfx encoder

cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel

do not initialize disabled image codecs (respect settings)

channels: client: rail: added support for DisableThreads setting

changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes

draft implementation of threading settings aware message handling api
for addins/channels

rail: use new messaging api

fixed memory leak

msgs handlers external api changes (as requested)

msgs_handlers: init fix

fixed memory leak

logic fix

resolved problems appeared after rebase to master, dropped unnecessary
changes

git clang-format origin/master

fixed TestFreeRDPCodecRemoteFX.c

"formatting, run `clang-format` please"

properly use new "rfx_context_new(BOOL, UINT32)" everywhere

passed Threading Flags to "rfx_context_new" where available

in older C standarts veriables declaration must be done before any code

requested changes

clang-format as requested

use broken signatures of standert C functions for m$ s**tos

clang-format

requested changes

requested changes

moved ThreadingFlags to stable api zone

define type for channel msg handler

typo fix

clang-format

build fix

us ThreadingFlags from server settings

git clang-format origin/master

clang-format
2021-02-25 14:05:40 +01:00
akallabeth
43311130a2 Fixed CodeQL warnings 2021-02-19 11:19:49 +01:00
akallabeth
e2fd9db0b5 Added const to function arguments 2021-02-17 11:29:56 +01:00
Martin Fleisz
d6db010fc4
Merge pull request #6820 from akallabeth/warning_and_locale_fix
Fixed various warnings
2021-02-17 09:21:18 +01:00
akallabeth
da938a6514 Only update destination rect for SurfaceToSurface and SurfaceToCache 2021-02-16 16:44:41 +01:00
akallabeth
1dae0552d7 Fixed various warnings 2021-02-16 16:28:57 +01:00
Martin Fleisz
89347d85a1 Fix some incorrect keyboard mappings on Mac 2021-02-16 15:42:27 +01:00
Marcel Ritter
a60413a1a0
Allow parallel listen to IPv4 and v6 addresses (#6816)
* Allow parallel listen to IPv4 and v6 addresses

* Reformatted last changes

Co-authored-by: Marcel <marcel+it+gitkraken@linux-ng.de>
Co-authored-by: akallabeth <akallabeth@posteo.net>
2021-02-15 11:19:58 +01:00
Vic Lee
8852d8631f server: ignore unknown channelId received from client. 2021-02-15 11:01:39 +01:00
akallabeth
6a908d8115 Fixed formatting and source/destination length use 2021-02-12 12:00:58 +01:00
mingfang
99fa312079 libfreerdp: core: deep copy ServerCertificate 2021-02-12 12:00:58 +01:00
Armin Novak
f9c2d5bab9 Added ConnectionStateChangeEvent for clients
Clients can now subscribe to connection state change events to
prevend data from being transmitted on sessions being redirected.
2021-02-11 10:41:28 +01:00
Armin Novak
65647d5763 Use separate codec contexts for legacy and GFX 2021-02-10 10:38:24 +01:00
Michael Saxl
bc52147fbb rdg websocket support 2021-02-09 18:47:14 +01:00
akallabeth
1feb034896 Fixed invalid argument type for license function 2021-02-07 19:58:56 +01:00
Martin Fleisz
21158c0e8b
Merge pull request #6537 from akallabeth/kbd_remap
Added option to remap scancodes
2021-02-05 09:31:45 +01:00
Martin Fleisz
929fe163b3
Merge pull request #6757 from akallabeth/smart_e_invalid
Fix PCSC_SCardGetAttrib wrapper
2021-02-05 09:21:00 +01:00
Armin Novak
54e02e1642 Use wide char file paths for license 2021-02-04 21:22:21 +01:00
Armin Novak
773cfcd6da Fixed #6760: Use wide char file operations on windows. 2021-02-04 21:22:21 +01:00
Martin Fleisz
e2620f0faa core: Enable network auto detection by default 2021-02-04 15:23:57 +01:00
Martin Fleisz
79fb38da84 core: Remove connection type manipulation in gcc_write_client_core_data
Removes the changes to connection type in gcc_write_client_core_data and
adds some checks if network detection is enabled when receiving network
detection requests.
2021-02-04 10:43:51 +01:00
Vic Lee
a1566574a3 progressive: fix multiple regions in one gfx frame. 2021-02-04 09:16:23 +01:00
David Fort
385c0596e1
Merge pull request #6779 from kubistika/fix_heap_overflow_in_write_client_data_blocks
libfreerdp: core: add mem checks in gcc_write_client_data_blocks
2021-02-03 11:04:27 +01:00
akallabeth
4587ef976c Fixed default return for DrawOrderInfo 2021-01-28 14:08:35 +01:00
Martin Fleisz
83658d2121 gateway: Fix consent/service message in legacy gateway code 2021-01-27 14:58:07 +01:00
akallabeth
dfec6228e4 Added OrderInfo callback for primary, seconardy and altsec orders
This allows gathering statistics about which orders have been
received
2021-01-26 20:00:23 +01:00
Martin Fleisz
408c865092 transport: Don't ask for credentials if empty password is specified 2021-01-25 11:04:58 +01:00
Martin Fleisz
bddeece00c
Merge pull request #6601 from akallabeth/clip_file
Fixed support for huge files in clipboard
2021-01-25 10:26:30 +01:00
Martin Fleisz
b45fa71976
Merge pull request #6742 from akallabeth/input_active_check
Fixed missing check for fastpath input messages
2021-01-25 09:24:39 +01:00
akallabeth
f3dad4106a Fixed support for huge files in clipboard 2021-01-25 08:43:46 +01:00
akarl10
43691d59ee
Fr6731 (#6734)
* Implement chunked encoding for RDG_OUT_DATA
2021-01-25 08:39:30 +01:00
kubistika
afa213b5e5 libfreerdp: core: add checks in gcc_write_client_data_blocks 2021-01-24 14:07:17 +02:00
akallabeth
102869f6a8 Fixed missing check for fastpath input messages
Input events are only allowed after a connection was established
(connection state is active)
This check aborts input sending when done before that.
2021-01-23 16:12:29 +01:00
Martin Fleisz
bcf2de2ffb transport: Also ask for password when connecting using TLS 2021-01-22 13:33:15 +01:00
Armin Novak
bc16472ad5 Added missing CoreFoundation library to dependencies 2021-01-21 09:51:30 +01:00
Martin Fleisz
bd7b43a7d0
Merge pull request #6723 from akallabeth/color_fidelity_fix
Color fidelity fix
2021-01-19 14:14:47 +01:00
Armin Novak
6a2ae388f8 Added settings dump function 2021-01-18 18:46:04 +01:00
Martin Fleisz
68dfa353b8 locale: Fix keyboard detection on MacOS 2021-01-18 16:53:02 +01:00
Armin Novak
9549d090ab Fixed const correctness of RECTANGLE_16 variable 2021-01-18 09:41:13 +01:00
Armin Novak
87e89bc719 Fixed pcap capture function const correctness 2021-01-18 09:41:13 +01:00
Armin Novak
8187ab7732 Fix ColorFidelity use 2021-01-18 09:41:13 +01:00
Armin Novak
57b58df806 Fix color fidelity issues with windows 7 2021-01-13 16:10:05 +01:00
Armin Novak
8c353e9292 Fixed problematic cast of integer mask to bool 2021-01-13 11:52:24 +01:00
Martin Fleisz
d3530a16d5 primitives: Respect alpha values in YUV444 SSE pixel routine 2021-01-12 09:16:08 +01:00
Martin Fleisz
8ed51bc5f5 core: Remove error code from string returned by rpc_error_to_string
This PR removes the error code from the error string returned by
rpc_error_to_string. The error code is passed into the function so it is
not necessary to append it to the returned string as well.

The PR also fixes the screwed formatting of the error code tables.
2021-01-11 10:21:21 +01:00
Martin Fleisz
e96415070c
Merge pull request #6670 from akallabeth/rfx_const
progressive codec simple tile fixes
2021-01-11 09:03:07 +01:00
Martin Fleisz
f2e082aa12 Fix parsing of current keyboard locale 2020-12-23 15:05:20 +01:00
Martin Fleisz
f5177ca7e7 rdg: Read and set error code when ending an RD Gateway session 2020-12-22 15:51:00 +01:00
akallabeth
130561c9fc Removed size change check from DesktopResize
Just pass on every reset event from the server, the callback might
need to reset internal state even if the resolution did not change.
2020-12-22 13:00:54 +01:00
akallabeth
4a7ec674e6 Respect invalidRegion in progressive_compress 2020-12-15 16:49:13 +01:00
akallabeth
e3445eefab Fixed progressive decoding without subbanddiff 2020-12-15 14:47:05 +01:00
akallabeth
8b8016ec21 Fixed call to GetKeyboardLayout 2020-12-15 11:29:51 +01:00
akallabeth
25a8abc4eb Cleaned up rfx API 2020-12-14 17:44:30 +01:00
akallabeth
af81d9bb47 Fixed keyboard layout detection for windows 2020-12-11 13:14:08 +01:00
David Fort
7eb3ff518a
Merge pull request #6657 from sss123next/external_io_api_fixes
typo fix
2020-12-10 13:29:10 +01:00
akallabeth
3c237fd687 Fixed #6656: invalid read of proxy port. 2020-12-10 07:38:25 +01:00
Gluzskiy Alexandr
4d47c626bc
typo fix 2020-12-10 01:20:44 +03:00
kubistika
50c09db081 reset codecs in gdi_pipeline_init 2020-12-01 13:10:45 +01:00
Fabio Fantoni
a2308507aa remove unwanted log level set to debug in rfx
I saw on debian packages (that have -DWITH_DEBUG_ALL=ON) remotefx logs always to
debug without respect log-level and log-filters settings making diffult
debugging of issue on other parts.
After a search I found this that set loglevel to debug that akallabeth confirmed
is unwanted, this patch remove it.

Closes #6606
2020-11-30 10:17:39 +01:00
kubistika
c34a8a684c libfreerdp: core: rdp.c: fix array size check 2020-11-24 08:34:20 +01:00
akallabeth
65f8d39074 Cleaned up reading of orders 2020-11-23 12:50:26 +01:00
bolt
03ced3d8f0 Add support for -grab-mouse, to prevent the client from moving the user's pointer 2020-11-20 09:40:00 +01:00
akallabeth
5409f4f043 Implemented 2.2.1.17.1 Persistent Key List PDU Data, added checks
* Implemented missing server side version of PDU (just skip data)
* Refactored read/write functions to properly check stream
  length/capacity and handle return values.
2020-11-20 09:39:25 +01:00
akallabeth
bf8a01cb63 Fixed rdp_capability_set_start checks 2020-11-20 09:39:25 +01:00
akallabeth
56e6b40f3d Check stream capacity in rdp_capability_set_finish 2020-11-20 09:39:25 +01:00
akallabeth
10fad497a3 Added data_pdu_type_to_string 2020-11-20 09:39:25 +01:00
Simon Tatham
1dc8198803 Command-line option to choose an X selection.
I personally find it more convenient to have pasted data written to
the X11 PRIMARY selection, so that I can paste it with a fast middle-
button click, than to write to CLIPBOARD which typically needs a key
sequence or menu action.

This commit adds a command-line option to let me express that
preference: now I can say "/clipboard:use-selection:PRIMARY" on the
command line, which not only enables clipboard transfer but also says
which X selection I want it to talk to. The previous options
"+clipboard" and "-clipboard" are also still supported.
2020-11-20 08:34:20 +01:00
akallabeth
e019ed6566 Removed invalid check 2020-11-17 09:04:52 +01:00
akallabeth
cf49e4bfa8 Added stack trace on signal. 2020-11-10 10:17:56 +01:00
akallabeth
66dc4cc9ee Fixed compilation warnings. 2020-11-10 08:53:43 +01:00
odednoam
88102275f0
Bugfix: when freerdp_assistance_parse_file_buffer was called from external code, it did not copy the access password to the rdpAssistanceFile struct. (#6550)
* Fixed bug with assistance buffer parsing: `freerdp_assistance_parse_file_buffer` may be called directly, not necessarily from `freerdp_assistance_parse_file`, so password should be saved to the `rdpAssistanceFile` in `freerdp_assistance_parse_file_buffer`.
2020-11-09 09:19:53 +01:00
akallabeth
6e3c00725a Cleaned up collections:
ArrayList, MessageQueue, Queue, PubSub, BipBuffer
ObjectPool and BufferPool
2020-11-06 12:30:13 +01:00
Martin Fleisz
b5fa928311 core: Fix race when deleting channel manager
This PR fixes a possible crash when the channel manager was freed and
there were pending messages in the message queue.
The problem was that even though the message queue already received the
WMQ_QUIT message, it was still possible to enqueue messages after this
point. This resulted in unprocessed messages in the queue when it was
deleted. The delete handler then called into channel handlers which
where aleady freed/deleted.
With this PR adding messages after WMQ_QUIT was posted to the message
queue returns an error and all channel messages are now processed before
the channels are closed/terminated.
2020-11-03 17:08:58 +01:00
Armin Novak
d7bf6553c5 Added option to remap scancodes 2020-10-29 18:44:32 +01:00
Martin Fleisz
cec261c4db Cleanup internal channel management
This PR gets rid of some unneeded/unused field and functions in the
channel handling code. It also makes it possible to call
VirtualChannelWrite from any thread like the Windows API allows. The
only restriction is that the channel must be initialized
(VirtualChannelInit) from the same thread that called freerdp_connect.
2020-10-29 15:53:32 +01:00
Martin Fleisz
7be04e212b
Merge pull request #6466 from akallabeth/memsan
Memsan: fixes (most) unit tests for use with memory sanitizer
2020-10-28 09:46:12 +01:00
akallabeth
6d8f355633 Fix warning #6515 2020-10-16 08:14:13 +02:00
akallabeth
c0284239a7 Fixed remarks. 2020-10-15 11:03:46 +02:00
akallabeth
ef8f1fd9f0 Refactored reading of optional order bytes 2020-10-15 11:03:46 +02:00
akallabeth
0456fc307c Fixed parsing of FastGlyph order. 2020-10-15 11:03:46 +02:00
Martin Fleisz
0eec7c0e90
Merge pull request #6501 from kubistika/server_wts_api_extended
server: add WTSVirtualChannelManagerCheckFileDescriptorEx API
2020-10-14 11:14:00 +02:00
Peter Harris
63ef97a2b3 core/nla: fix order of operations
The order of evaluation of the two sides of addition is undefined in C.
Since there is no sequence point between ber_write_contextual_tag and
ber_write_octet_string, these two functions can be called in any order.

Force the correct order by breaking the two function calls into two
separate statements.
2020-10-06 17:19:38 +02:00
Kobi Mizrachi
e0fa47f3b3 server: add WTSVirtualChannelManagerCheckFileDescriptorEx API 2020-10-06 13:17:38 +03:00
Kobi
dd7f70c0be
Merge pull request #6484 from kubistika/proxy_improve_logs
improve proxy logs
2020-09-21 14:26:34 +03:00
kubistika
508ba9201f core: server: add API to get peer accepted channel names 2020-09-21 14:16:22 +03:00
akallabeth
dbe5b69223 Fixed NULL checks (#6474) 2020-09-21 08:30:54 +00:00
Armin Novak
3b63903d3f Removed obsolete connectErrorCode 2020-09-16 10:21:15 +02:00
Nathan Loewen
a5ba0bbdf0 let freerdp_image_scale() determine step size 2020-09-14 09:21:33 +02:00
Armin Novak
b6f3922152 Fixed primitives test 2020-09-07 11:48:06 +02:00
Armin Novak
816e792e3f Fixed unit tests run under memory sanitizer 2020-09-07 10:42:28 +02:00
Alexandr
cf2daeb01d
cleanup of https://github.com/FreeRDP/FreeRDP/pull/6448 (#6455)
* Implemented switchable transport layer

Co-authored-by: akallabeth <akallabeth@posteo.net>
2020-09-02 13:37:04 +02:00
Martin Fleisz
223c42a0c7
Merge pull request #6453 from akallabeth/settings_refactor
Use settings string setter to overwrite computername
2020-09-02 12:49:22 +02:00
akallabeth
4d7cddd7c6 Use settings string setter to overwrite computername 2020-09-02 12:13:20 +02:00
akallabeth
70881d3957 Fixed #6442: Use cmake to provide source directory for test pem 2020-08-25 09:48:29 +02:00
Martin Fleisz
0f64e07444
Merge pull request #6424 from akallabeth/warning_fixes
Fixed #6418: Warning due to invalid const qualifier
2020-08-11 08:25:38 +02:00
Armin Novak
10ed4ec422 Improve NLA auth token debugging 2020-08-10 17:10:42 +02:00
Armin Novak
bfa07e701d Refactored rdg_read_http_unicode_string warning fixes 2020-08-10 16:39:49 +02:00
Armin Novak
32c9a519df Improve NLA error code logging. 2020-08-10 14:35:40 +02:00
Armin Novak
e50a8e09ee Fixed warnings. 2020-08-10 12:26:46 +02:00
Armin Novak
47d02a76ce Fixed missing input length check for color pointer. 2020-08-10 12:26:33 +02:00
Armin Novak
57b405ca26 Fixed compilation warnings. 2020-08-10 12:14:11 +02:00
Armin Novak
226b072af8 Fixed #6418: Warning due to invalid const qualifier 2020-08-10 11:47:52 +02:00
Martin Fleisz
0f70aa2f43
Merge pull request #6415 from akallabeth/proxy_settings_api
Use freerdp_settings_[s|g]et* api to access proxy vaiables.
2020-08-05 11:47:05 +02:00
akallabeth
44ea09e7ad Use freerdp_settings_[s|g]et* api to access proxy vaiables.
Fixes #6414
2020-08-05 11:29:00 +02:00
Martin Fleisz
d87d351c00 Add GatewayMessageType to public API 2020-08-04 15:58:48 +02:00
Martin Fleisz
e8c99f3a00 gateway: Add processing of consent and service messages with HTTP gateway 2020-08-04 15:58:48 +02:00
akallabeth
fde4867574 Fix #6399: Call ConvertFromUnicode with length -1.
The input string has ensured NULL termination, so let the function
determine the correct length.
2020-07-31 09:14:38 +02:00
Zhu Qun-Ying
0627357d66 remove wrong initialization value 2020-07-29 08:47:12 +02:00
Armin Novak
76d10561bb Set BIO data NULL on cleanup
Recursive BIO free could double free, if the BIO data is not set
NULL when removed.
2020-07-23 10:48:39 +02:00
Bernhard Miklautz
7f7a8f4d2f fix: code formatting 2020-07-20 15:29:44 +02:00
akallabeth
e08a23f931 Fixed missing input sanitation for GFX surfaces.
Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen
2020-07-20 14:11:36 +02:00
Bernhard Miklautz
efdc99528f new [orders]: BMF_24BPP support and some comments
* cached brush orders missed the BMF_24BPP documented case
  ([MS-RDPEGDI] 2.2.2.2.1.2.7)
* add some comments on secondary (brush) order details
2020-07-20 14:11:36 +02:00
Norbert Federa
54fdf7947d core: fix invalid inttype and reference
The error message in tpdu_read_header() printed the pointer address and
used PRIu16 for an UINT8 type
2020-07-20 13:18:45 +02:00
Giovanni Panozzo
9f7e475c16 Fix seeking in Cache Brush and other Secondary Drawing Orders 2020-07-15 00:11:03 +02:00
Kobi Mizrachi
5d39200cd7 libfreerdp: core: add ServerHeartbeat callback 2020-07-07 09:57:53 +02:00
Martin Fleisz
1996fde3d4
Merge pull request #6321 from akallabeth/extended_order_warn
Added hint for errors due to missing offscreen-cache
2020-07-06 16:28:40 +02:00
akallabeth
c5984ff811 Filter GSM codec for microphone redirection 2020-06-29 13:26:15 +02:00
akallabeth
57e7a99393 Added hint for errors due to missing offscreen-cache 2020-06-29 08:12:51 +02:00
Pascal Nowack
f25fbaee9c nsc: Fix memory leak
Fixes the following memory leak:

==115716== 16,662,960 bytes in 459 blocks are definitely lost in loss record 3,504 of 3,504
==115716==    at 0x48396AF: malloc (vg_replace_malloc.c:306)
==115716==    by 0x4C6A4E2: nsc_context_initialize_encode (nsc_encode.c:77)
==115716==    by 0x4C6A4E2: nsc_compose_message (nsc_encode.c:497)
2020-06-29 08:12:13 +02:00
Armin Novak
ce1a9d8d19 Fixed #6298: Mask CACHED_BRUSH when checking brush style 2020-06-23 09:24:35 +02:00
akallabeth
02c5ec66e5 Fixed possible integer overflow in crypto_rsa_common
Thanks @anticomputer for pointing this out
2020-06-22 12:09:36 +02:00
akallabeth
f753c25ad3 Reset freed HGDI_DC
CVE-2020-4031 thanks to @antonio-morales for finding this.
2020-06-22 11:51:39 +02:00
akallabeth
0a98c450c5 Fixed out of bound read in RLEDECOMPRESS
CVE-2020-4033 thanks to @antonio-morales for finding this.
2020-06-22 11:51:39 +02:00
akallabeth
e7bffa64ef Fixed OOB read in update_recv_secondary_order
CVE-2020-4032 thanks to @antonio-morales for finding this.
2020-06-22 11:51:39 +02:00
akallabeth
b8beb55913 Fixed OOB read in update_read_cache_bitmap_v3_order
CVE-2020-11096 thanks @antonio-morales for finding this.
2020-06-22 11:51:38 +02:00
akallabeth
733ee32083 Fixed invalid access in update_recv_primary_order
CVE-2020-11095 thanks @antonio-morales for finding this.
2020-06-22 11:51:38 +02:00
akallabeth
3ac7bb5d6a Fixed pcap cleanup 2020-06-22 11:51:38 +02:00
akallabeth
c0fd449ec0 Fixed Out-of-bound read in glyph_cache_put
CVE-2020-11098 thanks to @antonio-morales for finding this.
2020-06-22 11:51:38 +02:00
akallabeth
6ade7b4cbf Fixed OOB Read in license_read_new_or_upgrade_license_packet
CVE-2020-11099 thanks to @antonio-morales for finding this.
2020-06-22 11:51:38 +02:00
Armin Novak
0d80353bf3 Added missing SECBUFFER_READONLY flag in rpc_client_write_call 2020-06-19 11:31:13 +02:00
Armin Novak
ff79636d33 TSG improvements
* Respect connection timeout during connect
* Better debug output
* Cleaned up data types,
2020-06-19 11:31:13 +02:00
Martin Fleisz
cf7b9ca055 Fix usage of DsMakeSpn with IP address hostnames 2020-06-15 15:38:54 +02:00
akallabeth
733026dada Fixed #6267: adjust write_pixel_16 endian handling 2020-06-08 15:10:24 +02:00
Ondrej Holy
230d83b319 gdi: Fix missing unlock
This fixes the following defect reported by covscan tool:
libfreerdp/gdi/gfx.c:144: missing_unlock: Returning without unlocking "update->mux".
2020-06-04 07:55:12 +02:00
Armin Novak
44cf91be37 Fixed #6245: Added additional tests to assistance parser 2020-06-02 13:36:03 +02:00
akallabeth
6490106600 Lock remaining occurances of security_encrypt/security_decrypt variables 2020-06-02 13:31:17 +02:00
akallabeth
a381dd1a27 Lock security_decrypt to avoid simultaneous counter manipulation 2020-06-02 13:31:17 +02:00
akallabeth
a4e95f8e65 Reformatted to satisfy clang-format 2020-05-20 15:32:50 +02:00
akallabeth
354bb7d6ae Fixed some more resource cleanup leaks in nla 2020-05-20 15:10:08 +02:00
akallabeth
d57143f19e Renamed variable to avoid MSVC define collission 2020-05-20 15:10:08 +02:00
akallabeth
1e5bf45b1e Ensure buffers are NULL before reuse in NLA 2020-05-20 15:10:08 +02:00
akallabeth
58ef235bc5 Removed unused variable warnings 2020-05-20 15:10:07 +02:00
akallabeth
fe3e7eaa34 Fixed GHSL-2020-101 missing NULL check 2020-05-20 15:10:07 +02:00
akallabeth
d936402878 Fixed GHSL-2020-102 heap overflow 2020-05-20 15:10:07 +02:00
akallabeth
489cb26ac3 Fixed multiple sanitizer errors in codecs 2020-05-20 15:10:07 +02:00
akallabeth
6e59d9597c Fixed history buffer reset. 2020-05-20 15:10:07 +02:00
akallabeth
a71c96d86f Fixed extended info packet alignment. 2020-05-20 15:10:07 +02:00
akallabeth
e3fdf4b588 Fixed rdp_read_info_packet unaligned access and size checks 2020-05-20 15:10:07 +02:00
akallabeth
55b7fc50e0 Fixed memory leak in test 2020-05-20 15:10:07 +02:00
akallabeth
1d21585fa4 Fixed unaligned access 2020-05-20 15:10:07 +02:00
akallabeth
57ad88fd82 Rewritten rdp_recv_logon_info_v2 to remove unaligned access 2020-05-20 15:10:07 +02:00
akallabeth
c3c1f76da5 Rewritten check to satisfy BehaviouralSanitizer 2020-05-20 15:10:07 +02:00
akallabeth
ae5a30438e Fixed undefined behaviour 2020-05-20 15:10:07 +02:00
akallabeth
a139caf73a Fixed undefined behaviour in primitives shift 2020-05-20 15:10:07 +02:00
akallabeth
9b0b47496f Fixed undefined behaviour in ncrush 2020-05-20 15:10:07 +02:00
akallabeth
a1dd25e219 Fixed undefined behaviour in rfx decoder 2020-05-20 15:10:07 +02:00
akallabeth
ee160fc414 Fixed UndefinedBehaviour in planar left shift 2020-05-20 15:10:07 +02:00
akallabeth
319afb082b Refactored settings clone/free, extended tests 2020-05-20 15:10:07 +02:00
akallabeth
722790f4ca Always require aligned memory for interleaved codec. 2020-05-20 15:10:07 +02:00
akallabeth
2973ec6f1c Fixed BehaviorSanitizer warnings 2020-05-20 15:10:07 +02:00
Armin Novak
d1d8586374 Fixed #6200: Arraysize check 2020-05-20 15:02:24 +02:00
Armin Novak
0195de02f5 Fixed #6199: Reading version information in tsg 2020-05-20 15:02:24 +02:00
Kobi
6c151ee15c
Merge pull request #6193 from kubistika/proxy_fixes_
server: proxy: code refactor
2020-05-20 15:58:36 +03:00
akallabeth
6a2785e359 Abort on first possible certificate validation error
Only retry certificate validation if the purpose was wrong.
2020-05-20 14:48:15 +02:00
Kobi Mizrachi
8d72051ab1 codec: fix typo in progressive codec log 2020-05-20 10:31:51 +03:00
akallabeth
7890833af8 Replaced strtok with strtok_s 2020-05-18 11:39:22 +02:00
Kobi Mizrachi
fddda159d9 change use of strtok to strtok_s 2020-05-18 11:08:20 +02:00
Vladyslav Hordiienko
f79bb517c1 improve RFX DWT algorithm
merge multiple loops into the one loop for vertical DWT inverse
2020-05-18 10:56:40 +02:00
akallabeth
5cfc3e8593 Fixed #6148: multiple ceritificate purposes
OpenSSL certificate verification can only check a single purpose.
Run the checks with all allowed purposes and accept any.
2020-05-12 15:36:48 +02:00
akallabeth
a1f2c1e161 Fixed #6156: Enforce synchronized encrypt count
Old style RDP encryption uses a counter, synchronize this for
packets send from different threads.
2020-05-12 15:34:57 +02:00
akallabeth
477ad675f3 Ensure all NLA structs are freed up 2020-05-12 09:09:36 +02:00
akallabeth
daf4e11324 Silence valgrind in rdp_read_header
If a disconnect message is received, we returned success but did
not initialize the return arguments.
2020-05-08 11:04:03 +02:00
akallabeth
a73adecaf4 Fixed #6112: Segfault in update_decompress_brush
The iterators need to be signed for the loop check to work.
2020-05-06 13:31:57 +02:00
akallabeth
3a06ce058f Fixed oob read in rfx_process_message_tileset
Check input data length
Thanks to hac425 CVE-2020-11043
2020-05-06 13:31:57 +02:00
akallabeth
363d7046df Fixed oob read in clear_decompress_subcode_rlex
Fixed length checks before stream read.
Thanks to hac425 CVE-2020-11040
2020-05-06 13:31:57 +02:00
akallabeth
0332cad015 Fixed oob read in update_recv
properly use update_type_to_string to print update type.
Thanks to hac425 CVE-2020-11019
2020-05-06 13:31:57 +02:00
akallabeth
66d3b77d88 update_decompress_brush: explicit output length checks
The output length was just assumed to be >= 256 bytes, with this
commit it is explicitly checked.
2020-05-06 13:31:57 +02:00
akallabeth
a167f3b779 Fixed possible int overflow. 2020-05-06 13:31:57 +02:00
akallabeth
873ed92a84 Remove unnecessary cast. 2020-05-06 13:31:57 +02:00
akallabeth
6b485b146a Fixed oob read in irp_write and similar 2020-05-06 13:31:57 +02:00
Bernhard Miklautz
3e89574205
Merge pull request #6124 from akallabeth/speedup
Unify inline and some warning fixes
2020-05-05 15:34:38 +02:00
Linus Heckemann
5ce0ab909f
shadow_server: allow specifying IP addresses to listen on (#6050)
* shadow_server: allow specifying IP addresses to listen on

This allows using IPv6 as well as listening only on specific
interfaces. Additionally, it enables listening on local and TCP
sockets simultaneously.

* listener: log address with square brackets

This disambiguates IPv6 addresses.

* shadow_server: check error on each socket binding

* Refactored shadow /bind-address for 2.0 compiatibility.

* Made /ipc-socket and /bind-address incompatible arguments.

* Fixed shadow /bind-address handling and description

* Allow multiple bind addresses for shadow server.

Co-authored-by: akallabeth <akallabeth@posteo.net>
2020-05-05 08:35:19 +02:00
David Fort
5b98aa7515
Merge pull request #6063 from akallabeth/expert_settings
Added expert settings /tune and /tune-list
2020-05-04 12:09:39 +02:00
David Fort
6fb771e401
Merge pull request #6123 from akallabeth/cert_fix
Fixed #6122: Allow SSL server and client purpose
2020-05-04 12:04:08 +02:00
akallabeth
ca6d2d1b2c Workaround #6072: FFMPEG AAC encoding graded experimental
Due to many reporing issues with different AAC encoder configurations
deactivate support by default. Can be enabled by compiling with
experimental codec support.
2020-04-28 12:39:32 +02:00