Armin Novak
87bca1088a
Fixed #6199 : Reading version information in tsg
...
(cherry picked from commit e501c56e5c
)
2020-05-20 15:41:24 +02:00
akallabeth
442ac71ec7
Renamed variable to avoid MSVC define collission
...
(cherry picked from commit f9e1f21b0ce47d8eeea40314ce6b8b666964dc7d)
2020-05-20 15:41:24 +02:00
akallabeth
fba85da673
Ensure buffers are NULL before reuse in NLA
...
(cherry picked from commit 5f53b2b7c7109016b7127d595e13bd333ac77613)
2020-05-20 15:41:24 +02:00
akallabeth
9d5bb41445
Removed unused variable warnings
...
(cherry picked from commit 8052708f3354a686de98b62d641e9d0eb61a74db)
2020-05-20 15:41:24 +02:00
akallabeth
d6cd14059b
Fixed GHSL-2020-101 missing NULL check
...
(cherry picked from commit b207dbba35c505bbc3ad5aadc10b34980c6b7e8e)
2020-05-20 15:41:24 +02:00
akallabeth
8305349a94
Fixed GHSL-2020-102 heap overflow
...
(cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581)
2020-05-20 15:41:24 +02:00
akallabeth
cf4f6dbf3f
Fixed multiple sanitizer errors in codecs
...
(cherry picked from commit 2278d92a5d902692a7d1088629b2345c9b4e229c)
2020-05-20 15:41:24 +02:00
akallabeth
2e28385fbb
Fixed history buffer reset.
...
(cherry picked from commit ccc9cbef2d5d0d9f5cf5ec7621f71bed33f41aba)
2020-05-18 17:10:01 +02:00
akallabeth
a58129346d
Fixed extended info packet alignment.
...
(cherry picked from commit 03ebaf2dc1547c75f8693dd5087ce2e8dc17765a)
2020-05-18 17:10:01 +02:00
akallabeth
4e24cca056
Fixed rdp_read_info_packet unaligned access and size checks
...
(cherry picked from commit c75d08d70e878d35cd12ffac2aefcda405576092)
2020-05-18 17:10:01 +02:00
akallabeth
f2d836cd94
Fixed memory leak in test
...
(cherry picked from commit 2d630cccf7b1e566f99b74a224805fc25f85d6c1)
2020-05-18 17:10:01 +02:00
akallabeth
1a11f129ab
Fixed unaligned access
...
(cherry picked from commit cb2ed7f09ad68242bfdfad8967024b063f785d97)
2020-05-18 17:10:01 +02:00
akallabeth
47c456c39f
Rewritten rdp_recv_logon_info_v2 to remove unaligned access
...
(cherry picked from commit 66d182a84bed7bf19b6a99d71a4e4c7c6856f583)
2020-05-18 17:10:01 +02:00
akallabeth
5cf27e3969
Rewritten check to satisfy BehaviouralSanitizer
...
(cherry picked from commit 14829de866b43e7f2740b46f0c736b9adf5067eb)
2020-05-18 17:10:01 +02:00
akallabeth
6dfd915004
Fixed undefined behaviour
...
(cherry picked from commit c15929d821ce99aa8c1069f790f4addbe9439593)
2020-05-18 17:10:01 +02:00
akallabeth
73fd3c0a7c
Fixed undefined behaviour in primitives shift
...
(cherry picked from commit 436bd3dbb103c7c49e51ffb1cafad6f25ab05d66)
2020-05-18 17:10:01 +02:00
akallabeth
11c6ed0fb7
Fixed undefined behaviour in ncrush
...
(cherry picked from commit 83137d2a1bb732fbea2f20778924a50a79f63fef)
2020-05-18 17:10:01 +02:00
akallabeth
f25c2f265e
Fixed undefined behaviour in rfx decoder
...
(cherry picked from commit ef611d34d61c6590429c17db5c97f0a9a33147e8)
2020-05-18 17:10:01 +02:00
akallabeth
37158cd17f
Fixed UndefinedBehaviour in planar left shift
...
(cherry picked from commit 328691c46597c194f01a77a9d33d58b2faa88c9d)
2020-05-18 17:10:01 +02:00
akallabeth
c060089a2b
Refactored settings clone/free, extended tests
...
(cherry picked from commit 773ad6e9791844ca3ccdc40d378a37fc0238ef0a)
2020-05-18 17:10:01 +02:00
akallabeth
96621d4f45
Always require aligned memory for interleaved codec.
...
(cherry picked from commit 20c11fb7178462a8ba36b4fdbfb3e2a03197356f)
2020-05-18 17:10:00 +02:00
akallabeth
064a90c8b3
Fixed BehaviorSanitizer warnings
...
(cherry picked from commit afdd81dab5c484ab95b977a0d71f3809c8fa89a3)
2020-05-18 17:10:00 +02:00
Vladyslav Hordiienko
11eb374ef4
improve RFX DWT algorithm
...
merge multiple loops into the one loop for vertical DWT inverse
(cherry picked from commit fff9eba34a
)
2020-05-18 16:56:03 +02:00
akallabeth
64bec7586d
Replaced strtok with strtok_s
...
(cherry picked from commit 7890833af8
)
2020-05-18 16:56:03 +02:00
Kobi Mizrachi
efecbf41a9
change use of strtok to strtok_s
...
(cherry picked from commit 6013a96bff
)
2020-05-18 16:56:03 +02:00
akallabeth
0f89e23542
Fixed #6148 : multiple ceritificate purposes
...
OpenSSL certificate verification can only check a single purpose.
Run the checks with all allowed purposes and accept any.
(cherry picked from commit f3063a589d
)
2020-05-18 16:41:11 +02:00
akallabeth
2f75c4ac8d
Ensure all NLA structs are freed up
...
(cherry picked from commit 477ad675f3
)
2020-05-18 16:40:33 +02:00
akallabeth
5fc0ddeff5
Fixed #6156 : Enforce synchronized encrypt count
...
Old style RDP encryption uses a counter, synchronize this for
packets send from different threads.
(cherry picked from commit 873a9bef42
)
2020-05-18 16:38:42 +02:00
akallabeth
1178381809
Silence valgrind in rdp_read_header
...
If a disconnect message is received, we returned success but did
not initialize the return arguments.
(cherry picked from commit b45336f51febb4c34b5bf33fdf8d63ce44fe9e99)
2020-05-08 11:11:12 +02:00
Linus Heckemann
3c24e10bf3
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-08 11:06:02 +02:00
akallabeth
c903aa0409
Fixed index out of bound access in update_glyph_offset
2020-05-08 11:06:02 +02:00
akallabeth
0f266b5362
Fixed #6112 : Segfault in update_decompress_brush
...
The iterators need to be signed for the loop check to work.
2020-05-05 07:46:10 +02:00
akallabeth
e35d06f6e1
Fixed oob read in rfx_process_message_tileset
...
Check input data length
Thanks to hac425 CVE-2020-11043
2020-05-05 07:46:10 +02:00
akallabeth
32f705e597
Fixed oob read in clear_decompress_subcode_rlex
...
Fixed length checks before stream read.
Thanks to hac425 CVE-2020-11040
2020-05-05 07:46:10 +02:00
akallabeth
738d4bff00
Fixed oob read in update_recv
...
properly use update_type_to_string to print update type.
Thanks to hac425 CVE-2020-11019
2020-05-05 07:46:10 +02:00
akallabeth
f5b838de37
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-05 07:46:10 +02:00
akallabeth
13dac0ee2a
Fixed possible int overflow.
2020-05-05 07:46:10 +02:00
akallabeth
09d0124418
Remove unnecessary cast.
2020-05-05 07:46:10 +02:00
akallabeth
a1a6790f99
Fixed oob read in irp_write and similar
2020-05-05 07:46:10 +02:00
Armin Novak
bc4615e5ed
Added expert settings /tune and /tune-list
2020-05-05 07:46:10 +02:00
akallabeth
da03f7e04e
Fixed #6122 : Allow SSL server and client purpose
2020-05-05 07:46:10 +02:00
akallabeth
5d56937e20
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-05-05 07:46:09 +02:00
Raul Fernandes
54c902b3b5
Optimize function xcrush_copy_bytes()
...
Use memcpy to copy the bytes when we can assure that the memory areas does not overlap.
When the areas overlap, copy the area that doesn't overlap repeatly.
With this change, the copy is ~30x faster.
2020-05-05 07:46:09 +02:00
akallabeth
973731824b
Fixed #6099 : Add a flag for legacy hash entries
...
If a legacy entry is found in certificate hash store print
additional information to the user informing about the change
with FreeRDP 2.0
2020-04-28 14:03:19 +02:00
akallabeth
97bd60ba67
Refactored pointer and/xor data copying
...
Using unified function upate_pointer_copy_andxor to copy now.
2020-04-28 14:03:19 +02:00
akallabeth
cfc0d060c6
Refactored freerdp_image_copy_from_pointer_data
...
Split monochrome and color pointer handling to separate functions.
2020-04-28 14:03:19 +02:00
akallabeth
28e6c2e1d9
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-28 14:03:19 +02:00
akallabeth
ccaad04876
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-28 14:03:19 +02:00
akallabeth
150343978d
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-28 14:03:19 +02:00
Raul Fernandes
4df7200836
Cache the calculated color
...
In desktop area, the next color has high odds to be the same of previous color.
If we cache the value, it can be reused by the next pixel avoiding recalculation.
This optimization can halve the function's processing.
2020-04-28 14:03:19 +02:00
akallabeth
cc6831ae31
Moved PROGRESSIVE_BLOCK_REGION to heap.
2020-04-28 14:03:19 +02:00
Armin Novak
2d0a136e8e
Fixed #6067 : Better CMake warning for deactivated image scaling
2020-04-28 14:03:19 +02:00
Armin Novak
4cfc5b25ef
Fixed data type warnings
2020-04-28 14:03:19 +02:00
Armin Novak
808928ee7e
Fixed format string warnings.
2020-04-28 14:03:19 +02:00
Linus Heckemann
b70be2ee04
tls: support non-RSA keys
2020-04-10 18:06:14 +02:00
akallabeth
a9daba0190
Check for int overflow in gdi_InvalidateRegion
2020-04-09 18:00:51 +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
acc6023643
Fixed possible NULL access.
2020-04-09 18:00:51 +02:00
akallabeth
a3996af062
Refactored gdi region
...
* Added a unit test
* Fixed const correctness of function arguments
* Added return values for all functions
2020-04-09 18:00:51 +02:00
akallabeth
b677b5db25
Proper error return from gdi_rect_str and gdi_regn_str
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
7b1d4b4939
Fix CVE-2020-11524: out of bounds access in interleaved
...
Thanks to Sunglin and HuanGMz from Knownsec 404
2020-04-09 18:00:51 +02:00
akallabeth
e075f348d2
Added debug logging and claping to all region functions
2020-04-09 18:00:51 +02:00
akallabeth
ce21b9d7ec
Fix CVE-2020-11523: clamp invalid rectangles to size 0
...
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
0b6b92a25a
Fixed CVE-2020-11525: Out of bounds read in bitmap_cache_new
...
Thanks to 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
58dc36b3c8
Fixed possible NULL dereference
2020-04-02 17:27:10 +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
5b9b7f331b
Fixed memory leak in tls_get_channel_bindings
2020-03-06 11:37:35 +01:00
Armin Novak
9c999b7135
Added raw function wrapping X509_digest
2020-03-06 11:37:35 +01:00
Armin Novak
2be6e4117f
Let ssl backend handle hash checks.
2020-03-06 11:37:35 +01:00
Armin Novak
00fa84b514
Check cert against CertificateAcceptedFingerprints
...
CertificateAcceptedFingerprints may contain a list of certificate
hashes and the corresponding fingerprint.
If one of the hashes matches consider the certificate accepted.
2020-03-06 11:37:35 +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
3de666a80e
Improve signal handler printout.
2020-03-04 08:22:56 +01:00
Norbert Federa
17e0d25104
dynvc/client: fix and improve channel closing code
...
- fixed and consolitate the duplicated code for sending the
CLOSE_REQUEST_PDU to the server into dvcman_close_channel
- call dvcman_close_channel if a dynamic channel plugin fails
to process the received channel data
- rdpegfx: don't try to remove a non-existing cache entry,
return an error instead which now will close the channel, as
expected by Microsoft's windows protocols test suite
2020-03-04 08:03:56 +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
66352741f2
Added fallbacks for primitives auto detection.
...
When using primitives auto detection it was possible that no
primitive implementation was chosen at all.
This now skips broken implementations and falls back to generic
primitives if no other implementation does work.
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
Norbert Federa
ceb015a6bb
egfx: the gfx reset grahics pdu is optional
...
Since the EGFX Reset Graphics PDU seems to be optional,
the graphicsReset variable (which is updated in that PDU's handler)
should be removed from the rdp_gdi struct with the next change
in public headers (as in freerdp v3).
There are still some clients that expect and check it and therefore
we keep it for now, initialized with TRUE.
sdas
2020-02-26 13:57:12 +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
cc7027f799
Updated RDP_KEYBOARD_LAYOUT_TABLE
...
Regenerated with new fetch_language_identifiers.py, less manual
postprocessing required.
2020-02-24 12:44:15 +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
Armin Novak
436b68e416
Fixed #5895 : cast warnings.
2020-02-19 10:21:43 +01:00
Armin Novak
c0bf6c0768
working progressive Original Method DWT
...
Implemented decoding utilizing Original Method DWT
(See [MS-RDPEGFX] 3.2.8.1.2.2 Reduce-Extrapolate Method)
2020-02-18 11:13:52 +01:00
Armin Novak
1fa00c4318
Refactored progressive codec.
2020-02-18 11:13:52 +01:00
Martin Fleisz
e304428a5f
Merge pull request #5857 from akallabeth/scanbuild_fixes
...
Scanbuild fixes
2020-02-12 10:16:54 +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
e4a2287f4d
Merge pull request #5859 from mfleisz/multi_trans_fix
...
core: Always send CS_MULTITRANSPORT PDU to server
2020-01-23 15:39:28 +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
Armin Novak
c92bbb37f5
Fixed NULL dereference.
2020-01-23 10:12:12 +01:00
Armin Novak
ea25900f4c
Fixed #5855 : YCoCg to RGB conversion color order
2020-01-22 17:28:22 +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
9099682f71
Merge pull request #5841 from akallabeth/vaapi_fixes
...
Vaapi fixes
2020-01-16 10:17:10 +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
Armin Novak
b0b81af8b8
Fixed #5839 : Use correct pointer to cast.
2020-01-16 09:53:57 +01:00
Kobi Mizrachi
205b0fba7f
core: rdp: reset rdp->nla in rdp_reset
2020-01-16 08:46:24 +01:00
David Fort
30d6e25def
Merge pull request #5750 from akallabeth/encomsp_auto
...
Encomsp automatic input control && cleanups
2020-01-15 13:56:00 +01:00
Kobi Mizrachi
d552ef9e83
server: update: made functions static
2020-01-15 12:59:06 +02:00
Kobi Mizrachi
bd5ac550c5
update: update_send_new_or_existing_window: fix signed/unsigned according to spec
2020-01-15 12:59:06 +02:00
Kobi Mizrachi
9e47fd76db
server: update: call update_check_flush whenever using the reused update buffer
2020-01-15 12:59:06 +02:00
Armin Novak
1c19de5a76
Fixed remaining issues with chroma subsampling.
2020-01-14 17:46:13 +01:00
Armin Novak
61d2e84fdc
Fixed inverted color formats in YCoCgRToRGB_8u_AC4R
2020-01-14 17:45:20 +01:00
Armin Novak
b3a642164a
Fixed planar size checks.
2020-01-14 15:14:40 +01:00
Armin Novak
4766f5204b
Enabled YCoCg for planar.
2020-01-14 14:23:43 +01:00
Armin Novak
c1679d0f2c
Added planar RLE chroma subsampling.
2020-01-14 14:06:43 +01:00
Armin Novak
6fd9525823
Implemented chroma subsampling for planar non RLE
...
Planar frames that are not RLE encoded can now be decoded if
chroma subsampling is enabled. Partly fixes #5822
2020-01-14 12:43:40 +01:00
David Fort
0cc3af2282
Merge pull request #5796 from akallabeth/rdp_10_7_large_pointers
...
Added RDP 10.7 large pointer support
2020-01-14 10:17:13 +01:00
Kobi Mizrachi
50d2789ebf
server: fix leak in WTSCloseServer
...
make sure every pending message that wouldn't be handled because the
server is closing, will be free()ed as expected.
2020-01-13 13:41:44 +01:00
Kobi Mizrachi
2d9a50fafb
fix memory leaks in disp server and gfx.c
2020-01-13 13:41:44 +01:00
Armin Novak
548bec9ef2
Setting optional last error on transport close
...
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-09 10:35:49 +01:00
Armin Novak
895cb8f944
Added macro freerdp_set_last_error_if_not
...
This macro replaces the multiple instances where the current
error state is checked before setting an optional error state.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-09 10:34:27 +01:00
Martin Fleisz
f7f2ab302f
Merge pull request #5819 from akallabeth/last_error_informative
...
make Last error more informative
2020-01-09 08:47:09 +01:00
Armin Novak
105799de31
Added an error message in rdp_set_error_info
...
If the provided arguments are not properly set up write
an error message explaining what is wrong.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:51:00 +01:00
Martin Fleisz
4e06855826
proxy: Add received response in case of an error
2020-01-08 17:45:10 +01:00
Armin Novak
2391a1528b
CONNECT_TRANSPORT_FAILED in transport_check_fds
...
If TRANSPORT_LAYER_CLOSED was detected in transport_check_fds
check if there is already a connection error set, otherwise
set FREERDP_ERROR_CONNECT_TRANSPORT_FAILED to allow proper
reconnect or abort handling.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:42:08 +01:00
Armin Novak
7d252cdc8e
Added freerdp_set_last_error_ex function
...
This new function allows better logging of call locations
for errors. Additionally added freerdp_set_error_log macro
to record function, file and line the error was set.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2020-01-08 17:39:25 +01:00
Armin Novak
c24da9e856
Fixed freerdp_settings_new error cleanup.
2020-01-07 10:49:17 +01:00
David Fort
31a4e2ad8b
Merge pull request #5745 from akallabeth/urbdrc_rewrite
...
Urbdrc rewrite
2020-01-06 09:23:45 +01:00
Norbert Federa
a4988f5469
transport: check if layer was set to closed
...
There are several code paths and error conditions where
transport->layer is correctly set to TRANSPORT_LAYER_CLOSED but
the required code for checking that state was missing.
E.g. write errors in the rdg code resulted in marking the transport
layer as closed but the transport code would indefinitely continue
to read from the receiving socket.
2019-12-27 12:37:03 +01:00
Armin Novak
323491dab1
Support for RDP protocol version 10.7
...
* Adds support for 10.7 protocol version
* Uses it as client default
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-19 09:54:11 +01:00
Armin Novak
182d0ce548
Added RDP 10.7 large pointer support
...
* Implements [MS-RDPBCGR] version 51 large pointer support.
* Logs unknown large pointer capability flags as warning.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-19 09:53:40 +01:00
Armin Novak
6482a638f4
Increased client build number
...
According to [MS-RDPESC] 1.7 Versioning and Capability Negotiation
the client build is used to determine feature / behaviour.
Announce something more modern than Windows XP SP3.
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-18 12:22:18 +01:00
Ondrej Holy
0531624826
Tell the server that smartcard is redirected
...
There were server-side changes on Windows 2012 and newer regarding
smartcards, namely the Smart Card Service start and stop behavior:
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh849637(v%3Dws.11)#smart-card-service-start-and-stop-behavior
Some people see "No valid certificates were found on this smart card",
when the Smart Card Service is not running and has to use various
workarounds to start the service manually, e.g.:
http://blogs.danosaab.com/2016/12/using-smart-card-with-remote-desktop-connection-on-mac-osx/
http://www.edugeek.net/forums/windows-server-2012/161255-smart-card-service-issue-windows-server-2012r2-terminal-services-hyperv.html
I've been looking at RDP specifications and found that
REDIRECTED_SMARTCARD should be probably specified in TS_UD_CS_CLUSTER
block flags when the smartcard is redirected, but it is not currently:
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/d68c629f-36a1-4a40-afd0-8b3e56d29aac
This might be the reason, why the Smart Card Service is not
autostarted for some people. Let's try to set this flag and see what
will happens...
https://github.com/FreeRDP/FreeRDP/issues/4743
Signed-off-by: Armin Novak <armin.novak@thincast.com>
2019-12-18 12:22:11 +01:00
Kobi Mizrachi
200f50c1f6
update: add proper stream checks
2019-12-17 12:38:41 +01:00
xie.kunming
e16bef6b4f
rdp.c : fix DATA_PDU_TYPE_STRINGS mismatch declaration when WITH_DEBUG_ALL=ON
2019-12-16 12:14:59 +01:00
Kobi Mizrachi
033ee763e9
core: server: update: fix update_send_new_or_existing_notification_icons
2019-12-12 11:10:44 +01:00
Kobi Mizrachi
edeb449185
core: server: add missing NULL check in FreeRDP_WTSVirtualChannelRead
2019-12-12 11:10:44 +01:00
Mati Shabtay
4dacb57f6f
rail server: implement channel code for rail server
...
* Split common functionality from client code
* Clean up client code and use proper defines for constants
* Implements the channel code to read/write server side
messages.
2019-12-12 11:10:44 +01:00
Mati Shabtay
8298728663
channels.c: Send the CHANNEL_OPTION_SHOW_PROTOCOL option only in client mode
...
According to MS-RDPBCGR section 2.2.1.3.4.1, this option should only be
sent as a client. If set by a server, mstsc will crash.
2019-12-12 11:10:44 +01:00
Mati Shabtay
9045f1b343
info.c: Set hidef Remote App flag on info packet read
2019-12-12 11:10:44 +01:00
Mati Shabtay
8e4a88d955
update.c: Implement rail server altsec window orders
2019-12-12 11:10:44 +01:00
Martin Fleisz
71feb974ac
Merge pull request #5739 from akallabeth/improve_function_hiding
...
Improve function hiding
2019-12-02 11:31:35 +01:00
Armin Novak
7c243da6e1
Remove symbols exported by accident.
2019-12-02 10:57:31 +01:00
David Fort
22f954970a
primitives: use host pointers for openCL
...
Using host pointers may skip the need for copying buffers.
2019-11-29 11:59:09 +01:00
Armin Novak
c7337f4b6b
Added data length check for RDP_CODEC_ID_NONE
2019-11-28 08:08:30 +01:00
Armin Novak
c5e261e066
Added new command line swith for automatich assistance control.
2019-11-25 10:32:55 +01:00
Armin Novak
3aa6047b3a
Updated primitive function const correctness.
2019-11-22 13:21:39 +01:00
Armin Novak
e347c7b3de
Added YUV444 kernel
2019-11-22 13:21:39 +01:00
Armin Novak
b3a3a6b9c2
Fixed intialization of opencl primitives and warnings.
2019-11-22 13:21:39 +01:00
David Fort
6123920a2e
opencl: inline the openCL program in the source code
2019-11-22 13:21:39 +01:00
Armin Novak
00e9efd189
Fixed init code.
2019-11-22 13:21:39 +01:00
Armin Novak
733c70cd25
Fixed primitives cleanup code.
2019-11-22 13:21:39 +01:00
Armin Novak
0a3721587a
Cleaned up primitives code.
2019-11-22 13:21:39 +01:00
David Fort
5f0943f0fe
primitives: add openCL support
...
This patch adds the basic infrastructure to have openCL acceleration.
For now only YUV2RGB is implemented but other operations could be
implemented.
The primitives have been massively reworked so that we have an autodetect
mode that will pick the best implementation automatically by performing a
benchmark.
Sponsored-by: Rangee Gmbh(http://www.rangee.com )
2019-11-22 13:21:39 +01:00
David Fort
7b743b3199
rails: shorten logs
2019-11-22 13:21:39 +01:00
Armin Novak
210b40a54f
Removed msusb from library.
2019-11-22 10:33:39 +01:00
Martin Fleisz
b97c6d87c3
Merge pull request #5706 from akallabeth/tcp_keepalive
...
Configurable Tcp keepalive
2019-11-19 10:03:00 +01:00
Armin Novak
6e1a396aa4
rdpNineGridCache now opaque
2019-11-14 15:16:36 +01:00