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