Commit Graph

18678 Commits

Author SHA1 Message Date
Armin Novak
c2e899b6df [core,fuzzer] fix testcases
rdp_recv_save_session_info is a client side only function, remove from
server side tests
2024-04-24 15:55:30 +02:00
Armin Novak
b757276034 [core,redirection] fix reading of TargetNetAddressesCount
read to local variable first, check for validity and only after
allocation update the settings value.
2024-04-24 15:55:30 +02:00
Armin Novak
4ce4a6d3fb [codec,clear] check destination offsets
clear_decompress_subcodecs_data might have inavlid offsets, check if
they fit the destination buffers
2024-04-24 15:55:30 +02:00
Armin Novak
c172713c41 [client,sdl] handle dialog on key up event
Handle keyboard input dialog status change on key up event. If handled
on key down event the dialog closes and the key up event is handled on
the next SDL event queue (usually connection dialog cancel)
Fixes #10133
2024-04-24 10:35:22 +02:00
akallabeth
3fe9363592 [core,capabilities] abort on invalid protocolVersion
* TS_GENERAL_CAPABILITYSET::protocolVersion must be
  TS_CAPS_PROTOCOLVERSION(0x200) see [MS-RDPBCGR] 2.2.7.1.1
  General Capability Set (TS_GENERAL_CAPABILITYSET)
* Default value of FreeRDP_CapsProtocolVersion must be
  TS_CAPS_PROTOCOLVERSION(0x200)
2024-04-23 17:13:13 +02:00
Мартынов Максим Сергеевич
890d87f81a Fix protocolVersion capability reset 2024-04-23 16:03:30 +02:00
Mariusz Bialonczyk
839f3e8408 uwac: fix window handling/viewport
Parameters passed to wp_viewport_set_destination was scaled instead of
the actual window size. In fact I noticed this problem when I was
testing the initial change (c29ba7985) but was not sure about how to fix
this and moreover, the tiling manager which I am using (sway) is
immediatelly tiling the window and all seems fine in day-to-day use
with tiled window.
The problem was only visible when the window was changed to floating:
the window content was scaled properly but the viewport was twice as
big (thus a whole window). What is worse it seems that the scaling was
done multiple times making a huge window size in some circumstances.

Now in new sway version 1.9 authors added an assert which prevents from
having a window which overlaps different renderers and this also trigger
this problem in FreeRDP, because when starting the window size was too
big.
This was leading to:
wp_viewport@31: error 2: source rectangle out of buffer bounds
or even sway crash

This commit is fixing this problem by using a proper window size values
(initially passed to a function and saved to additional variables before
scaling calculation).
Window size is now correct even when changed to a floating window.
2024-04-23 12:19:00 +02:00
akallabeth
55bd1c2660 [ci,clang-tidy] add libssl-dev dependency 2024-04-23 09:54:52 +02:00
akallabeth
fc21b82880 [core,timezone] initialize ClientTimeZone early
Initialize ClientTimeZone in freerdp_settings_new to allow replacing the
default later on in command line parser or client connection callbacks
2024-04-23 09:54:52 +02:00
akallabeth
8b382c8cec [winpr,timezone] update
* update windowsZones.xml url
* update timezones
2024-04-23 09:54:52 +02:00
akallabeth
1d6460c5f7 [core,redirection] add sanity check for TargetNetAddress
Abort on implausible TargetNetAddressLength values. (check remaining
data length to determine that)
2024-04-23 09:40:36 +02:00
akallabeth
449e8b82f1 [core,capabilities] check TS_BITMAPCACHE_CAPABILITYSET_REV2
Check value of TS_BITMAPCACHE_CAPABILITYSET_REV2::numCellCaches for out
of range.
2024-04-23 09:40:36 +02:00
akallabeth
fed8943447 [pkcs11.h] remove extra-semi-stmt 2024-04-22 18:02:03 +02:00
Ondrej Holy
30aacc4aae [flatpak] fix typo in module name 2024-04-22 17:42:52 +02:00
Ondrej Holy
35d8bc1782 [winpr,ncrypt] use preferably p11-kit-proxy.so
Currently, the opensc-pkcs11.so library is used for ncrypt support.
However, the p11-kit-proxy.so library is able to aggregate more pkcs11
modules at runtime (OpenSC is one of them, but also some third party
modules that are not supported by OpenSC). Let's use preferably
p11-kit-proxy.so if available.
2024-04-22 17:42:52 +02:00
Ondrej Holy
5a28b046d5 [winpr,ncrypt] bundle pkcs11.h and drop pkcs11-helper dependency
The ncrypt implementation currently relies on the pkcs11-helper library.
That is not available on RHEL for example. Let's bundle the standardized
header file from https://github.com/latchset/pkcs11-headers to avoid the
need for extra dependency.

Related: https://github.com/FreeRDP/FreeRDP/discussions/9982
2024-04-22 17:42:52 +02:00
Ondrej Holy
cef3d5e9d4 [winpr,ncrypt] replace deprecated symbol
The CKK_ECDSA symbol is deprecated, it is recommended to use CKK_EC
instead. Let's do this as a preparation for the follow-up changes.
2024-04-22 17:42:52 +02:00
Ondrej Holy
73991c48ce [winpr,ncrypt] obtain module path from provider
Currently, the module path is hardcoded in the build_pkinit_args function.
Let's obtain the module path from provider as a preparation for the
follow-up changes.
2024-04-22 17:42:52 +02:00
Ondrej Holy
79975cfbe3 [winpr,ncrypt] drop redundant library paths
The pkcs11 implementaion contains a list of the standard library paths
for various architectures and distribution. But that list also contains
just the opensc-pkcs11.so basename without path. Therefor I am conviced
that all those other entries can be simply dropped. Let's do that as
a preparation for the follow-up changes.
2024-04-22 17:42:52 +02:00
akallabeth
a1a8f832f4 [winpr,synch] fix extra-semi warning 2024-04-22 17:41:46 +02:00
akallabeth
8b616f4fad [core,capabilities] ensure destination array exists
ensure the destination array in rdpSettings is large enough to hold the
copy.
2024-04-22 17:41:46 +02:00
akallabeth
1687a6424a start-3.5.2-dev0 2024-04-22 11:18:39 +02:00
akallabeth
eda5c99686 release-3.5.1 2024-04-22 11:18:39 +02:00
akallabeth
3a0ea08e05 changelog 2024-04-22 11:18:39 +02:00
akallabeth
c3376e24f4 [ci,fuzz] deactivate libusb, cups 2024-04-22 11:02:04 +02:00
akallabeth
703808591e [ci,fuzzer] split fastpath tests
use dedicated server and client context to test the functions
2024-04-22 11:02:04 +02:00
akallabeth
5b4e39fd7e [core,orders] shift unsigned value
The delta value read is signed, but the operations are done on an
unsigned.
2024-04-22 11:02:04 +02:00
akallabeth
cb15c1c78a [core,update] fix missing plausibility check
abort parsing of cache brush if not enough data is available.
2024-04-22 11:02:04 +02:00
akallabeth
626d10a94a [core,redirection] fix length of redirection strings
length field is in bytes, when converting from UCS-2 use size in WCHAR
2024-04-22 11:02:04 +02:00
akallabeth
a6320dc6b7 [ci,fuzzer] run read functions as client and server 2024-04-22 09:30:36 +02:00
akallabeth
71e463e31b [core,info] fix missing check in rdp_write_logon_info_v1 2024-04-21 14:28:24 +02:00
akallabeth
48013d75fc [core,test] add fuzzer for receive functions 2024-04-21 14:28:24 +02:00
akallabeth
a95426e7c4 [core,update] return if gdi is NULL 2024-04-21 14:28:24 +02:00
akallabeth
db09d1d7f8 [core,update] fix leak on error termination 2024-04-21 14:28:24 +02:00
akallabeth
7f9c5d84ad [core,peer] assert size of peer context 2024-04-21 14:28:24 +02:00
akallabeth
6430945ce0 [codec,color] fix out of bound read 2024-04-21 11:00:47 +02:00
akallabeth
4e756306b9 [winpr,timezone] fix unused result warnings 2024-04-21 11:00:47 +02:00
akallabeth
6ce8bc3e98 [channels,rdpdr] remove dead code. 2024-04-21 11:00:47 +02:00
akallabeth
5e5d27cf31 [codec,zgfx] allocate in segment steps
do not trust the uncompressedSize of a ZGFX_SEGMENTED_MULTIPART and
allocate the output buffer in steps after decoding a segment.
2024-04-20 21:20:44 +02:00
akallabeth
9314b5492b [codec,clear] use size_t types for sizes 2024-04-20 21:20:44 +02:00
akallabeth
0ca4973a67 [codec,clear] vBarShortEntry count check 2024-04-20 21:20:44 +02:00
akallabeth
b88c767603 [codec,color] use ssize_t/SSIZE_T for indices 2024-04-20 21:20:44 +02:00
akallabeth
1a755d898d [codec,interleaved] fix offset error 2024-04-20 21:20:44 +02:00
akallabeth
0b4db55707 [codec,nsc] check for valid ColorLossLevel 2024-04-20 21:20:44 +02:00
akallabeth
ae7b32db75 [ci] run oss-fuzz scheduled, undefined sanitizer 2024-04-20 21:20:44 +02:00
Mike Gilbert
445bd9a80c winpr: fix fallback timezone name
Populate StandardName and DaylightName with 2-byte WCHAR values instead
of 4-byte wchar_t values on Linux.
2024-04-20 21:19:59 +02:00
Mike Gilbert
ca8c71a208 winpr: improve timezone detection when TZ is set
The TZ variable may either contain a direct timezone representation, or
a reference to a file in tzfile(5) format. Mapping a direct timezone
representation to a Windows timezone would be difficult.

According to tzset(3), a file reference should start with a colon, though
glibc treats it as optional. It may be an absolute path or a path relative
to /usr/share/zoneinfo. Adjust winpr_detect_windows_time_zone to accept
either.
2024-04-20 21:19:59 +02:00
akallabeth
3cf4bac0e8 [client,sdl] implement key remapping 2024-04-19 12:59:01 +02:00
akallabeth
8779ebf8d4 [ci,oss-fuzz] run all codec tests 2024-04-19 11:26:47 +02:00
akallabeth
a1c373314e [codec,interleaved] fix bounds checks 2024-04-19 11:26:47 +02:00