Skip to content

fix(egfx): tolerate unknown capability versions instead of failing decode#1298

Open
clintcan wants to merge 1 commit into
Devolutions:masterfrom
clintcan:fix/egfx-tolerate-unknown-capability-version
Open

fix(egfx): tolerate unknown capability versions instead of failing decode#1298
clintcan wants to merge 1 commit into
Devolutions:masterfrom
clintcan:fix/egfx-tolerate-unknown-capability-version

Conversation

@clintcan
Copy link
Copy Markdown

CapabilitySet::decode propagated CapabilityVersion::try_from's error via ?, so a single unrecognized capability version aborted decoding of the entire CapabilitiesAdvertise PDU during EGFX negotiation.

Some clients advertise a capset version outside the enumerated set — notably the macOS "Windows App" / Microsoft Remote Desktop client — which made the EGFX channel fail to negotiate and could prevent the connection from being established at all when the server enables EGFX.

The CapabilitySet::Unknown(Vec<u8>) variant already exists and round-trips raw bytes through encode/size. This routes the unrecognized-version case into it instead of erroring, so negotiation completes and the server can still select a mutually supported capability version.

Verified against a real macOS Windows App client connecting to an EGFX/AVC420 server: without this change the connection aborts during negotiation; with it, negotiation completes and H.264 renders.

…code

`CapabilitySet::decode` propagated `CapabilityVersion::try_from`'s error
via `?`, so a single unrecognized capability version aborted decoding of
the whole CapabilitiesAdvertise PDU during EGFX negotiation. Some clients
advertise a capset version outside the enumerated set — notably the macOS
"Windows App" / Microsoft Remote Desktop client — which made the EGFX
channel fail to negotiate and could prevent the connection from being
established at all.

The `CapabilitySet::Unknown(Vec<u8>)` variant already exists and round-
trips raw bytes through encode/size. Route the unrecognized-version case
into it instead of erroring, so negotiation completes and the server can
still select a mutually supported capability version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant