Commit Graph

285 Commits

Author SHA1 Message Date
akallabeth
4461219497 [core,rdp] make monitor layout PDU optional
the PDU might arrive or not, do not get stuck if not.
2023-09-02 07:56:21 +02:00
akallabeth
feb5ab52cb [core,rdp] add log messages for unexpected data 2023-08-25 08:42:31 +02:00
akallabeth
e18918356f [core,rdp] set logger context 2023-07-06 15:51:56 +02:00
akallabeth
e03b6596c6 [build] fix unused but set variable warnings 2023-06-29 18:34:51 +02:00
akallabeth
4d350978dd [core] assert rdp->context 2023-06-26 10:53:43 +02:00
akallabeth
45a54b1883 [core] fix typo in debug string 2023-06-12 11:13:43 +02:00
Armin Novak
970f0c54e8 [stream] use const correct Stream_Pointer access 2023-06-08 08:09:33 +02:00
Armin Novak
a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
Armin Novak
9a7aa8dbac [core,rdp] log rdp_read_share_control_header
in rdp_read_share_control_header read and log all available header data
before checking remaining length.
2023-06-05 11:07:30 +02:00
Armin Novak
a433e1b761 [core,rdp] use a dynamic logger for rdpRdp 2023-05-23 05:04:55 +02:00
akallabeth
00572768b9 [core,rdp] fixed wrong format string 2023-03-15 08:22:23 +01:00
Armin Novak
f26dc59a9d [core,aad] make AAD optional
* make cJSON an optional dependency
* disable AAD if cJSON was not compiled in
2023-03-10 16:38:07 +01:00
fifthdegree
4cbfa006f2 Implement support for RDS AAD
Have a working implementation of the RDS AAD enhanced security mechanism
for Azure AD logons
2023-03-10 16:38:07 +01:00
akallabeth
3293d0d06a [core] add log for experimental settings
Too often experimental flags had been used without the user noticing
that. As bug reports are hard to analyze without proper information take
this approach and inform about experimental flags in use by logging
these.
2023-02-27 11:44:10 +01:00
akallabeth
00f2679eda [core,security] refactor functions to check lengths 2023-02-03 11:09:59 +01:00
akallabeth
da5080e557 [core] refactor rdp encryption lock 2023-02-03 11:09:59 +01:00
akallabeth
a082f2b78a [core] improve logging 2023-02-03 11:09:59 +01:00
akallabeth
644870934e [core,server] do not rely on EarlyCapabilitiesFlags
Check settings that have been agreed upon by client and server and do
not directly use the flags.
2023-01-27 16:01:33 +01:00
akallabeth
04ede67940 [core,fastpath] unify fastpath stream decryption 2023-01-27 10:07:01 +01:00
Armin Novak
bea41877ba [core] add logging
* Log rdp_write_security_header flags
* Log rpd_read_security_header flags
2023-01-27 10:07:01 +01:00
Armin Novak
641022b795 [logging] remove __FUNCTION__ from actual message
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
akallabeth
075506f6c8 [winpr,stream] use new Stream_CheckAndLogRequiredLength* 2023-01-25 14:27:32 +01:00
akallabeth
8ed37e68d2 [stream] use logging capacity checks 2023-01-25 14:27:32 +01:00
Armin Novak
d639702bed [core] check return of rdp_write_header 2023-01-25 09:37:40 +01:00
akallabeth
033ffff428 [core] initialize stack variables, improve logging 2023-01-24 10:16:55 +01:00
Armin Novak
d4d2b4403c [core] Improve redirection logging 2023-01-23 11:37:44 +01:00
Armin Novak
d8a6166e67 [core] improve rdp_security_flag_string 2023-01-23 11:37:44 +01:00
akallabeth
23281121bf [core] implement skip channel join 2023-01-20 11:19:18 +01:00
Armin Novak
78b8df86bc [core] unify settings copy set/reset 2023-01-18 09:55:06 +01:00
Armin Novak
6ff458bb34 [core] Make remote rdpSettings* context wide
The settings struct containing the data sent by the remote is now
context wide. This way it is always possible to retrieve the data.
2023-01-18 09:55:06 +01:00
David Fort
a1febe11f0 multi-transport: refactor multi-transport handling
Prepare the parts of the code that handle multi-transport to really establish
UDP connections and manage alternative transports.
2022-12-13 15:54:33 +01:00
akallabeth
37ab25e19d Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
Armin Novak
917e392f1e [client] fix connection active checks
* use freerdp_is_active_state for session active checks
* fix state transitions
2022-12-12 12:59:32 +01:00
Armin Novak
a14c75a3a2 [core,client] handle optional monitor layout PDU
The monitor layout PDU is optional. If that was not received assume it
will not be sent and continue in next state.
2022-12-12 12:59:32 +01:00
Armin Novak
358ac53b66 [core,license] print a warning on invalid packet
* add stringify function for securityFlags
* print a error message on unexpected packet
2022-12-03 00:13:27 +01:00
Armin Novak
6f2250ff4a [core] improve finalize flag log messages 2022-12-02 15:08:34 +01:00
David Fort
9db032f326 rdp: notify the Activate state as soon as it happens
Without the patch, we parse more packets and the calling code doesn't have the
opportunity to invoke PostConnect callback (make the connection not work in the proxy)
2022-11-30 08:41:22 +01:00
Armin Novak
ff2509bbc4 [core,client] relax sc flags state checks 2022-11-29 22:29:29 +01:00
Armin Novak
43571a3e34 [core,client] Added logging for finalize flags
Log an error if expected finalize flags did not match what we got.
2022-11-29 22:29:29 +01:00
akallabeth
1304af4748 [core,rdp] Refactor rdp security encryption
Unify rc4 encryption key handling, use common free and reset functions
2022-11-25 12:35:14 +01:00
akallabeth
94072dc64a [core,client] Fix transitions, improve logging 2022-11-22 15:30:31 +01:00
akallabeth
4284d67088 [core,state] fix state transitions, added logging 2022-11-22 15:30:31 +01:00
Armin Novak
f5e4ca6f6a [core] Log data not processed in event loop 2022-11-22 15:30:31 +01:00
Armin Novak
ab5858376a [core] fixed CONNECTION_STATE_MCS_CREATE_REQUEST parsing 2022-11-22 15:30:31 +01:00
akallabeth
d83f70bc32 [core,transport] event handle for transportIO
With the latest client changes the internal event loop requires a handle
to wait on. Add a new function to (re)set the newly added transport event handle.
2022-11-16 15:32:32 +01:00
akallabeth
4ccb38aa13 [core] Check return value of *_transition_to_state
The state transition might not be allowed, so abort if that fails.
2022-11-16 15:32:32 +01:00
David Fort
4461144031 autodetect: prepare for multi-transport
Autodetect packets can be transported either in TCP TPKT packets or be contained
in multi-transport subheaders (transported on UDP). These changes do the appropriate
modifications so that in further developments we can take the transport type in account
when treating / writing these packets.
2022-11-16 11:50:46 +01:00
akallabeth
bc31bae2b5 [core] Unify RDP state machine
Up to this commit the client and server state machine handling used
different return values for state machine changes.
This is fixed with this commit:
* Use common enum return values
* Use common helper functions
2022-11-15 09:57:46 +01:00
akallabeth
4ef72bbe14 Cleanup of client RDP state machine
* Use enum for most common return types
* Add success/failed check functions
* Add a function creating a string from the return value
2022-11-11 11:51:27 +01:00
akallabeth
872f52c014 [core] properly pass redirection return code
If a redirection packet is receivet pass the appropriate return
code through the call stack to let the client take action
2022-11-11 11:51:27 +01:00