FreeRDP/libfreerdp/core
Pascal Nowack 8d02a07974 core/server: Ignore data PDUs for DVCs that were not opened successfully
When a FreeRDP-based server tried to open a DVC, but the client answered
the DVC create request with a negative CreationStatus in the DVC create
response PDU, the server can then assume that no actual PDUs can be
received for that channel.
However, as long as the channel handle exists, FreeRDP happily forwards
any potential PDU for that handle disregarding the CreationStatus.
This is problematic, since the channel handling usually runs in its own
thread and as a result, the channel may not be destructed yet, when
receiving such stray PDU.
The PDU may be processed, even though it is not expected to be.

A situation, where this becomes problematic is the AUDIO_PLAYBACK_DVC
channel.
It may be the case, that the client answered the DVC create request
with a negative result, the server may try to close the handle and open
the static channel (RDPSND) instead, but before the server can close the
channel handle, the client actually sends PDUs regarding the format
negotiation.
In this case, the server may unintentionally already set things up,
which was not desired (the DVC is about to be closed anyway).

While this specific situation is hypothetical, since it would depend on
a malicious client, it is still possible to happen, especially since the
server implementation does not invoke the format negotiation, but
FreeRDP does it automatically, as soon as the DVC create request is
sent.

Fix this issue by discarding any data PDUs (DYNVC_DATA_FIRST and
DYNVC_DATA) of channels, that were not opened successfully.
2022-12-31 10:14:17 +01:00
..
gateway Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
test [transport] remove polling loop 2022-12-12 12:59:32 +01:00
CMakeLists.txt [core] Removed unused krb5 include 2022-12-09 12:36:12 +01:00
activation.c Fixed Wsign-compare warnings 2022-12-09 15:58:26 +01:00
activation.h Renamed rdp_recv_server_synchronize_pdu 2022-11-03 11:56:12 +01:00
autodetect.c autodetect: prepare for multi-transport 2022-11-16 11:50:46 +01:00
autodetect.h autodetect: prepare for multi-transport 2022-11-16 11:50:46 +01:00
capabilities.c Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
capabilities.h Refactored capability parsing 2022-11-03 17:02:15 +01:00
certificate.c Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
certificate.h Logging and parser fixes (#7796) 2022-04-19 14:29:17 +02:00
channels.c [channel] Fixed broken length check 2022-11-03 21:11:29 +01:00
channels.h Raw channel send (#7255) 2021-08-26 16:17:51 +02:00
client.c [core,client] fix channel error check 2022-12-09 11:11:40 +01:00
client.h Unify struct definitions (#7633) 2022-02-14 14:59:22 +01:00
codecs.c Code cleanups 2022-11-04 14:46:58 +01:00
connection.c core: in connection.c use constant instead of raw value 2022-12-23 08:42:45 +01:00
connection.h [core,client] handle optional monitor layout PDU 2022-12-12 12:59:32 +01:00
credssp_auth.c [core,credssp] fix conversion from unicode 2022-12-15 14:57:29 +01:00
credssp_auth.h nla: Fix unicode issues with gateway code 2022-11-03 15:01:39 +01:00
display.c reformatted 2022-06-23 08:48:39 +02:00
display.h Reformatted to new style 2019-11-07 10:53:54 +01:00
errbase.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
errconnect.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
errinfo.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
errinfo.h Unify struct definitions (#7633) 2022-02-14 14:59:22 +01:00
fastpath.c [core,input] Fixed API for KBD_FLAGS_DOWN use 2022-12-13 14:37:05 +01:00
fastpath.h Unify struct definitions (#7633) 2022-02-14 14:59:22 +01:00
freerdp.c [core] added freerdp_is_active_state 2022-12-12 12:59:32 +01:00
gcc.c gcc: fix handling of multi-transport flags 2022-12-13 15:54:33 +01:00
gcc.h [core,gcc] use mcs_get_settings, make const correct 2022-12-12 13:33:47 +01:00
graphics.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
graphics.h Fixed use of reserved keywords for include guards. 2017-07-20 09:35:41 +02:00
heartbeat.c [core] Unify RDP state machine 2022-11-15 09:57:46 +01:00
heartbeat.h [core] Unify RDP state machine 2022-11-15 09:57:46 +01:00
info.c core: Fix handling of alternate shell if set to an empty string 2022-12-15 11:56:05 +01:00
info.h Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
input.c [core,input] Fixed API for KBD_FLAGS_DOWN use 2022-12-13 14:37:05 +01:00
input.h Remove async-input from clients 2022-03-08 15:37:19 +01:00
license.c Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
license.h [core] Unify RDP state machine 2022-11-15 09:57:46 +01:00
listener.c Fixed format strings to match arguments (#8254) 2022-09-29 14:55:27 +02:00
listener.h Reformatted to new style 2019-11-07 10:53:54 +01:00
mcs.c Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
mcs.h proxy: fix channel shift between front and back 2022-11-30 11:38:08 +01:00
message.c Fix #7793: Do not expose internal input API (#7794) 2022-04-13 09:34:05 +02:00
message.h Remove async-input from clients 2022-03-08 15:37:19 +01:00
metrics.c Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
multitransport.c multi-transport: refactor multi-transport handling 2022-12-13 15:54:33 +01:00
multitransport.h multi-transport: refactor multi-transport handling 2022-12-13 15:54:33 +01:00
nego.c Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
nego.h Unify struct definitions (#7633) 2022-02-14 14:59:22 +01:00
nla.c Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
nla.h Support spnego authentication for gateway 2022-10-06 21:33:01 +02:00
orders.c reformatted 2022-06-23 08:48:39 +02:00
orders.h Removed internal members of rdpAltSecUpdate from API header 2022-01-18 11:24:23 +01:00
peer.c [server,shadow] do treat deactivate/reactivate 2022-12-22 15:09:03 +01:00
peer.h [server] Fix rdp_peer_handle_state_demand_active 2022-11-22 15:30:31 +01:00
proxy.c fix HTTP proxy CONNECT header 2022-11-05 09:01:17 +01:00
proxy.h Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
rdp.c multi-transport: refactor multi-transport handling 2022-12-13 15:54:33 +01:00
rdp.h [client] fix connection active checks 2022-12-12 12:59:32 +01:00
redirection.c Replace ConvertFromUnicode and ConvertToUnicode 2022-11-28 10:42:36 +01:00
redirection.h [core] Unify RDP state machine 2022-11-15 09:57:46 +01:00
security.c [core,rdp] Refactor rdp security encryption 2022-11-25 12:35:14 +01:00
security.h Reformatted to new style 2019-11-07 10:53:54 +01:00
server.c core/server: Ignore data PDUs for DVCs that were not opened successfully 2022-12-31 10:14:17 +01:00
server.h wtsapi: add new kind of query to retrieve the open status 2022-12-27 11:02:29 +01:00
settings.c [transport] remove polling loop 2022-12-12 12:59:32 +01:00
settings.h [settings] Fixed UTF16 helpers 2022-12-02 15:08:09 +01:00
smartcardlogon.c Fixed Wsign-compare warnings 2022-12-09 15:58:26 +01:00
state.c [core] add state_run_continue function 2022-12-18 15:14:30 +01:00
state.h [core] add state_run_continue function 2022-12-18 15:14:30 +01:00
streamdump.c Improved streamdump file format 2022-10-07 10:38:03 +02:00
streamdump.h Improved streamdump file format 2022-10-07 10:38:03 +02:00
surface.c Fixed bug with SurfaceFrameMarker callback 2022-11-04 14:46:58 +01:00
surface.h Fix sending/receiving surface bits command. 2020-04-03 12:00:53 +02:00
tcp.c clear openssl error queue after nla_client_begin 2022-07-02 16:32:50 +02:00
tcp.h transport: Set server socket as keepalive in transport_default_attach() 2022-05-06 12:31:35 +02:00
timezone.c [core,info] ensure stream length 2022-12-14 11:52:00 +01:00
timezone.h Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
tpdu.c Add return values to TPDU functions 2022-10-13 13:57:11 +02:00
tpdu.h Add return values to TPDU functions 2022-10-13 13:57:11 +02:00
tpkt.c Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
tpkt.h Fixed return of tpkt_verify_header 2022-11-04 14:46:58 +01:00
transport.c [transport] remove polling loop 2022-12-12 12:59:32 +01:00
transport.h [core,transport] event handle for transportIO 2022-11-16 15:32:32 +01:00
update.c [core,update] do not require EndPaint callback 2022-11-30 11:44:15 +01:00
update.h Fixed proxy compilation issues after rdpUpdate refactoring 2022-01-18 11:24:23 +01:00
utils.c core: Preserve user provided credentials when being redirected 2022-11-18 14:01:13 +01:00
utils.h Logging and parser fixes (#7796) 2022-04-19 14:29:17 +02:00
window.c Replace ConvertFromUnicode and ConvertToUnicode 2022-11-28 10:42:36 +01:00
window.h Reformatted to new style 2019-11-07 10:53:54 +01:00