Commit Graph

77 Commits

Author SHA1 Message Date
Armin Novak
135c4cc78c [core,gateway] try to parse remaining RPC PDU
if not all bytes have been parsed, try parsing again
2023-11-20 18:00:42 +01:00
Armin Novak
957ec80443 [core,gatewayay] improve rpc error logging 2023-11-20 18:00:42 +01:00
akallabeth
37d9c891b4 [core,gateway] fix return value checks 2023-06-29 14:30:09 +02:00
Armin Novak
970f0c54e8 [stream] use const correct Stream_Pointer access 2023-06-08 08:09:33 +02:00
Armin Novak
ca13987e84 [core,gateway] tighten checks for fault PDU 2023-04-28 10:16:49 +02:00
Armin Novak
aac0c0d01d [core,gateway] fix expected size for rts_read_auth_verifier_no_checks 2023-04-11 11:31:57 +02:00
Armin Novak
c638c51484 [core,gateway] fix expected length rts_read_auth_verifier_with_stub 2023-04-11 11:31:57 +02:00
Armin Novak
adc6b60bcf [core,gateway] silence rts_read_common_pdu_header
rts_read_common_pdu_header is used to determine if the packet was read
successfully. In that case it might fail but there should be no logging
done to not spam it with unnecessary warnings.
2023-04-11 11:31:57 +02:00
Armin Novak
2d1c56888d [core,gateway] log win32 error code of fault PDU 2023-04-05 10:02:27 +02: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
akallabeth
340f9dd775 Fixed conditional warnings 2022-04-28 12:37:19 +02:00
akallabeth
ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth
73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
Armin Novak
4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak
b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Armin Novak
85f5dbd4b5 Added missing static to internal functions 2022-02-10 12:49:00 +00:00
Armin Novak
3de6af34ed Removed unused module winhttp 2021-12-23 14:27:12 +01:00
akallabeth
07b789c880
Gateway legacy parser fix (#7362)
* Implemented missing TSG debug functions

* Refactored RPC gateway parser

Utilize wStream instead of custom binary parsing code, add proper
input validation.
Reported by Sunglin from the Knownsec 404 team & 0103 sec team
2021-10-15 11:45:08 +02:00
Armin Novak
5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +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
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Armin Novak
99eb9f7ec9 Refactored and simplified RPC signature functions. 2018-09-28 12:08:27 +02:00
Armin Novak
8a677d6cf2 Refactored rdg channel structs. 2018-09-27 16:05:14 +02:00
Armin Novak
33be80cb41 Removed unused variables. 2018-08-24 13:40:36 +02:00
Armin Novak
c3f008c36c Functions static where appropriate. 2018-01-15 13:22:01 +01:00
Armin Novak
99c45405cb Fixed GetEnvironmentVariable. 2017-03-03 12:43:00 +01:00
Armin Novak
b2c29158be Scanbuild warning, argument checks and leak fixes.
* Added Stream_GetRemainingCapacity to check remaining stream size
  before writes.
* Fixed shadow server memory leak.
* Fixed lots of scanbuild warnings
* Added missing argument checks in many functions
* Added missing static function declarations
2017-03-02 18:13:43 +01:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Armin Novak
4ca6b9bf10 Unified random functions and remaining MD5. 2016-02-24 20:41:01 +01:00
Marc-André Moreau
6202f48c12 libfreerdp-core: add configurable TSG/RGB fallback, fix edge cases 2015-03-19 11:44:47 -04:00
Denis Vincent
baab23fd14 libfreerdp-core: Make tsg out channel recycling event driven 2015-02-24 15:34:41 -05:00
Marc-André Moreau
65b2842792 libfreerdp-core: improve RTS PDU receiving 2015-02-19 16:06:20 -05:00
Marc-André Moreau
b5f1958b69 libfreerdp-core: cleanup channel recycling 2015-02-19 15:06:57 -05:00
Denis Vincent
3e90726bac libfreerdp-core: add TS Gateway out channel recycling support 2015-02-19 13:41:00 -05:00
Marc-André Moreau
4ecff39eb6 libfreerdp-core: more tsg in/out channel refactoring 2015-02-12 14:08:38 -05:00
Marc-André Moreau
8f2b2be9f2 libfreerdp-core: integrate new RTS pdu functions from denis 2015-02-12 13:14:43 -05:00
Marc-André Moreau
c92e82b3dc libfreerdp-core: improve TSG virtual connection and channel management 2015-02-12 12:03:15 -05:00
Marc-André Moreau
75cad064f1 libfreerdp-core: refactor tsg virtual connection, in/out channels 2015-02-11 15:26:22 -05:00
Marc-André Moreau
5fbcdf5b3d libfreerdp-core: make tsg rpc connection event-driven, fix race condition on connection 2015-02-04 11:18:27 -05:00
Marc-André Moreau
f8259f94c5 libfreerdp-core: add event-driven RTS connection code 2015-02-03 20:39:47 -05:00
Marc-André Moreau
1bf0e2ee03 libfreerdp-core: add more IN/OUT gateway channel states 2015-02-03 16:33:45 -05:00
Marc-André Moreau
7b25f9130b libfreerdp-core: improve error handling in ts gateway 2015-02-03 14:44:31 -05:00
Marc-André Moreau
5aea07d401 libfreerdp-core: add better state machine transitions to ts gateway 2015-02-02 18:50:26 -05:00
Marc-André Moreau
e0b0c77ecb libfreerdp-core: improve http parsing 2015-02-02 17:16:32 -05:00
Marc-André Moreau
4239a1d4f4 libfreerdp-core: remove TS Gateway send queue 2015-02-01 20:47:43 -05:00
Marc-André Moreau
4eeabba933 libfreerdp-core: restructure RPC connection sequence 2015-02-01 18:50:21 -05:00
Marc-André Moreau
0a97a5fc4e libfreerdp-core: fix possible lost signal in tsg_connect 2015-02-01 17:06:50 -05:00
Marc-André Moreau
85191391d5 libfreerdp-core: simplify TS Gateway RPC fragment receiving 2015-01-31 16:56:25 -05:00
Marc-André Moreau
f79deaff7b libfreerdp-core: partial OUT channel recycling support 2015-01-13 16:35:34 -05:00