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
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
akallabeth
f7465af44f
Revert "allow to use in single threaded mode" ( #6864 )
...
This reverts commit bee2e1526d
.
2021-03-05 13:02:38 +01:00
akallabeth
c67e4df96b
Added getter/setter for settings
2021-03-01 11:03:52 +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
akallabeth
1dae0552d7
Fixed various warnings
2021-02-16 16:28:57 +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
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
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
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
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
f5177ca7e7
rdg: Read and set error code when ending an RD Gateway session
2020-12-22 15:51:00 +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
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
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
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
akallabeth
4d7cddd7c6
Use settings string setter to overwrite computername
2020-09-02 12:13:20 +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
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
Bernhard Miklautz
7f7a8f4d2f
fix: code formatting
2020-07-20 15:29:44 +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
akallabeth
57e7a99393
Added hint for errors due to missing offscreen-cache
2020-06-29 08:12:51 +02:00
Armin Novak
ce1a9d8d19
Fixed #6298 : Mask CACHED_BRUSH when checking brush style
2020-06-23 09:24:35 +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
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
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
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
319afb082b
Refactored settings clone/free, extended tests
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 Mizrachi
fddda159d9
change use of strtok to strtok_s
2020-05-18 11:08:20 +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
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
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
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
akallabeth
cb4d90fc0a
Fixed #6101 : POINTER_LARGE_UPDATE serialization
...
The length check and field sizes in _update_read_pointer_large
were off, corrected according to [MS-RDPBCGR] 2.2.9.1.2.1.11
Fast-Path Large Pointer Update (TS_FP_LARGEPOINTERATTRIBUTE)
2020-04-22 14:21:47 +02:00
akallabeth
0a86090ff1
Fix initialization of LargePointer flags
...
Capability exchange is first reading server capabilities,
mask these with local settings and send only what both support.
2020-04-22 11:10:56 +02:00
akallabeth
a75280300a
Fixed [MS-RDPBCGR] 2.2.9.1.1.4.4 Color Pointer Update
...
The pointer size is limited to 32 pixel in width and height
unless LARGE_POINTER_FLAG_96x96 is set which increases the size
to 96 pixel.
2020-04-22 11:10:56 +02:00
Armin Novak
58be47bc63
Added expert settings /tune and /tune-list
2020-04-21 17:30:24 +02:00
Armin Novak
24bd601f8d
Fixed data type warnings
2020-04-11 09:43:14 +02:00
akallabeth
6c0aeb10d2
Allow icon info with empty bitmap data.
2020-04-09 18:00:51 +02:00
akallabeth
232c7f4783
Abort order read on invalid element count.
2020-04-09 18:00:51 +02:00
akallabeth
97efff4e90
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
2020-04-09 18:00:51 +02:00
akallabeth
17f547ae11
Fixed CVE-2020-11521: Out of bounds write in planar codec.
...
Thanks to Sunglin and HuanGMz from Knownsec 404
2020-04-09 18:00:51 +02:00
akallabeth
907640a924
Fixed CVE-2020-11522: Limit number of DELTA_RECT to 45.
...
Thanks to Sunglin and HuanGMz from Knownsec 404
2020-04-09 18:00:51 +02:00
akallabeth
192856cb59
Fixed #6012 : CVE-2020-11526: Out of bounds read in update_recv_orders
...
Thanks to @hac425xxx and Sunglin and HuanGMz from Knownsec 404
2020-04-09 18:00:51 +02:00
akallabeth
e6d10041c1
Fix #6033 : freeaddrinfo must not be called with NULL arguments.
2020-04-09 14:26:46 +02:00
Norbert Federa
c367f65d42
Merge pull request #6019 from akallabeth/bound_access_fixes
...
Fix issues with boundary access.
2020-04-06 13:53:28 +02:00
akallabeth
6f00add067
Export remaining packet length from rdp_read_share_control_header
2020-04-06 13:18:35 +02:00
akallabeth
0ad894adbc
Fixed substream read in rdp_recv_tpkt_pdu
2020-04-06 11:58:48 +02:00
akallabeth
0533c05be3
Fixed rdp_recv_tpkt_pdu parsing, use substream.
2020-04-06 11:22:18 +02:00
akallabeth
df55f40ecf
Fixed incorrect parser error message.
2020-04-06 10:42:06 +02:00
akallabeth
a022958ddf
Better error message for partial parsed capability
2020-04-03 15:10:49 +02:00
akallabeth
cba63b6d43
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.
2020-04-03 12:18:59 +02:00
akallabeth
88ad9ca56b
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.
2020-04-03 12:00:53 +02:00
akallabeth
2a379bfe09
Fixed invalid seek size in patrial pdu parse case
2020-04-02 17:41:49 +02:00
akallabeth
21320d973c
Use safe seek for capability parsing
...
thanks to @hardening for pointing that one out.
2020-04-02 17:39:51 +02:00
akallabeth
ddfd0cdccf
Use substreams to parse gcc_read_server_data_blocks
2020-04-02 17:39:43 +02:00
akallabeth
6b2bc41935
Fix #6010 : Check length in read_icon_info
2020-04-02 17:34:02 +02:00
akallabeth
67c2aa52b2
Fixed #6013 : Check new length is > 0
2020-04-02 17:33:54 +02:00
akallabeth
3627aaf7d2
Fixed #6011 : Bounds check in rdp_read_font_capability_set
2020-04-02 17:28:17 +02:00
akallabeth
f8890a645c
Fixed #6005 : Bounds checks in update_read_bitmap_data
2020-04-02 17:28:10 +02:00
akallabeth
ed53cd148f
Fixed #6006 : bounds checks in update_read_synchronize
2020-04-02 17:28:04 +02:00
akallabeth
f5e73cc7c9
Fixed #6009 : Bounds checks in autodetect_recv_bandwidth_measure_results
2020-04-02 17:27:59 +02:00
akallabeth
9301bfe730
Fixed #6007 : Boundary checks in rdp_read_flow_control_pdu
2020-04-02 17:27:53 +02:00
akallabeth
bc33a50c5a
Treat NULL and empty string as the same for credentials.
2020-03-24 12:34:35 +01:00
akallabeth
cf2f674283
Initialize KeyboardHook with define instead of magic number
2020-03-18 17:22:08 +01:00
Armin Novak
4216646746
Fixed length checks for compressed rdp data.
2020-03-10 14:05:10 +01:00
Armin Novak
297ad536a2
Cleaned up bulk_compress/decompress, prettified log.
2020-03-10 14:05:10 +01:00
Armin Novak
49b17e4e03
Refactored bulk compression
...
* Arguments now opaque
* Removed internal functions from external interface
2020-03-10 14:05:10 +01:00
Armin Novak
3ba66db99d
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
2020-03-10 12:21:14 +01:00
Armin Novak
d5b5088eac
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.
2020-03-10 12:21:14 +01:00
Armin Novak
c7187928e9
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.
2020-03-10 12:20:50 +01:00
Armin Novak
cc49a212bd
Default to positive return for missing callbacks
...
When using +async-update, default to positive return if some
client callback is not implemented.
2020-03-10 08:59:52 +01:00
Armin Novak
d3b36ab299
Added CertificateAcceptedFingerprints to settings
2020-03-06 11:37:35 +01:00
Armin Novak
07605b0281
Consume all TPKT data reading new/upgrade license
2020-03-05 13:48:58 +01:00
Armin Novak
f1098aa17c
rdp_recv_tpkt_pdu verbose debug parsing issues
...
Print out parsing issues found in MCS Channel 1003 parsing.
2020-03-05 13:48:58 +01:00
Armin Novak
8e55c44088
tpkt_ensure_stream_consumed now more verbose.
...
tpkt_ensure_stream_consumed now writes the function it was called
from to the log. This should help identify areas the check failed.
2020-03-05 13:48:58 +01:00
Armin Novak
825d63cf0c
Added clarifications in freerdp_channel_process
2020-03-04 15:01:36 +01:00
Armin Novak
d7ba252cd7
Fixed arguments for peer->ReceiveChannelData
2020-03-04 14:52:19 +01:00
Armin Novak
0f729d2b2c
Fixed conversion and return checks.
...
* Fix some missing argument checks for function pointer implementations
* Fix broken return value check for client->SendChannelData
* Updated const correctness for function pointer implementations
2020-03-04 14:44:03 +01:00
Armin Novak
9398e8e647
Fixed freerdp_channel_process length checks
...
Fragmented data was not handled properly.
2020-03-04 14:44:03 +01:00
Armin Novak
4ad158fac6
Added freerdp_channels_data argument checks.
2020-03-04 14:44:03 +01:00
Armin Novak
bda2731035
Fixed reading suppress output pdu
...
Optional rectangle must be read from PDU
2020-03-03 13:10:24 +01:00
Armin Novak
1b91c77350
Fixed shadow server with mstsc as client.
2020-03-03 12:27:19 +01:00
Armin Novak
0d1c440cf5
Consume stream data in autoconnect
...
TPKT checks failed due to payload data not consumed in autodetect.
2020-03-02 13:54:44 +01:00
Armin Novak
be714d2a13
Fixed tpkt header length checks.
...
TPKT header length and consumption of data was not consistently
checked. This adds checks after each packet processed and fixes
any inconsistencies found.
2020-03-02 11:40:35 +01:00
Armin Novak
039bb88fef
Fixed warnings in capabilities.c
2020-03-02 11:40:35 +01:00
Armin Novak
171e73d797
Fixed compiler warnings in info.c
2020-03-02 11:40:35 +01:00
Armin Novak
318cb3dd47
Added tpkt header length plausibility checks.
2020-03-02 11:40:35 +01:00
Armin Novak
ce387ba04f
Check length of TPKT header for plausibility.
2020-03-02 11:40:35 +01:00
Kobi Mizrachi
9417350d92
core: channels: add API to get channel name/id
2020-02-26 11:47:01 +01:00
Martin Fleisz
7ae8a158a0
Merge pull request #5707 from akallabeth/kbd_codepage
...
Added KeyboardCodePage option
2020-02-25 14:50:51 +01:00
Armin Novak
30275e7ac3
Added keyboard language codepages and listing option
2020-02-21 11:57:36 +01:00
Norbert Federa
a48e7f8b47
core: fix endless loops waiting for activation
...
There are two loops polling the transport pdu receiver in non-blocking mode
when waiting for reaching CONNECTION_STATE_ACTIVE rdp state.
In case of an invalid pdu size in the tpkt header this leaded to an endless
loop, utilizing 100% of a cpu core.
Added a sleep and limited the max loop time to the tcp ack timout value.
2020-02-20 17:51:20 +01:00
Armin Novak
ac4bb3c103
End connection before user callbacks if aborted.
...
If somewhere in freerdp_connect freerdp_abort_connect was called
the user callbacks Authenticate, GatewayAuthenticate and
Verify[Changed|X509]Certificate[Ex] must not be called.
2020-02-19 16:44:42 +01:00
Kobi Mizrachi
7a2eafbc3c
core: server: fix a bad free in channel->queue cleanup
2020-02-10 14:29:30 +01:00
Armin Novak
89913624be
FreeRDP_WTSVirtualChannelOpen unify channel new/free
2020-01-29 08:24:03 +01:00
Kobi Mizrachi
b393d59bcb
server: make sure all messages in channel->queue are freed when queue is freed
2020-01-29 08:24:03 +01:00
Kobi Mizrachi
8c8e5e4239
server: proxy: show indicative log on bind failure.
2020-01-27 07:57:45 +01:00
Martin Fleisz
7ef8b10fec
core: Always send CS_MULTITRANSPORT PDU to server
...
This PDU is required by Microsoft servers in order for bandwidth
management to work correctly. Even if we do not support multi-transport
for now we should just send a PDU with flags set to 0 to enable correct
handing of bandwidth measurement PDUs.
2020-01-23 15:16:14 +01:00
Martin Fleisz
baca062321
core: Fix and extend populate rdp file from settings
...
This PR contains the following changes:
- Get rid of unused SettingsModified array (kept in the settings struct for ABI
compatibility)
- Fix and extend freerdp_client_populate_rdp_file_form_settings (wrote <null> strings to the rdp file, missed a lot of settings)
- Set KeyboardHook default value to 2 (hook in fullscreen) just as mstsc
does
2020-01-22 14:18:30 +01:00
Armin Novak
9d65d9562b
Fixed missing NULL set of pointer after free
...
Due to this double free was possible if disconnect_and_clear was
called multiple times.
2020-01-21 14:44:21 +01:00
Kobi Mizrachi
457d5e426c
Revert "core: rdp: reset rdp->nla in rdp_reset"
...
This reverts commit 205b0fba7f
.
2020-01-21 12:08:39 +01:00
Martin Fleisz
9cddb7c2be
Merge pull request #5836 from kubistika/proxy/fix_rail_and_update_issues
...
fixes: rail and update issues
2020-01-16 10:13:26 +01:00