Skip to content

fix(server): send RDP as the Demand Active source descriptor - #2119

Merged
Marc-André Moreau (mamoreau-devolutions) merged 2 commits into
Devolutions:masterfrom
pennycoders:fix/demand-active-source-descriptor
Oct 23, 2026
Merged

Marc-André Moreau (mamoreau-devolutions) merged 2 commits into
Devolutions:masterfrom
pennycoders:fix/demand-active-source-descriptor

Conversation

@pennycoders

Copy link
Copy Markdown
Contributor

The server Demand Active PDU used an empty source descriptor, which DemandActive encodes as a single NUL byte. Jump Desktop rejects it (bad packet - source Descriptor not set to RDP) and drops the connection right after the TLS upgrade.

Send RDP instead. It encodes as RDP\0, the same four bytes the FreeRDP server writes, and the value already used by the server Demand Active fixture in ironrdp-testsuite-core.

Fixes #2118

Copilot AI balanced review requested due to automatic review settings October 13, 2026 09:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The acceptor output needs a regression test asserting the emitted source descriptor.

1 open finding
What changed in this PR

Updates the acceptor’s Demand Active PDU for Jump Desktop compatibility.

Changes:

  • Sends RDP\0 instead of an empty source descriptor.
  • Aligns acceptor output with existing server fixtures.
File Description
crates/​ironrdp-acceptor/​src/​connection.rs Sets the server Demand Active source descriptor to RDP.

🧠 Review effort: Balanced

Comment thread crates/ironrdp-acceptor/src/connection.rs
@github-actions github-actions Bot added kind/protocol Affects RDP or related protocol behavior risk/medium Behavioral change that does not substantially alter a core public API size/XS Size: up to 49 counted lines and 2 files labels Oct 13, 2026
@github-actions github-actions Bot added the automation-failed Exact-head automated classification or review failed or was unavailable label Oct 19, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 One-line server fix: the acceptor's Demand Active PDU now carries source_descriptor "RDP" instead of an empty string, which some strict clients (e.g. Jump Desktop) reject. Encoded as RDP\0, it matches FreeRDP and the existing SERVER_DEMAND_ACTIVE fixture; the length field is derived from the descriptor length so no size regressions arise. A focused regression test drives the acceptor through LicensingExchange and MultitransportBootstrapping to CapabilitiesSendServer and asserts the emitted descriptor via the existing decode_share_control API, reusing file fixtures. Independently verified against pr-head: the change is confined to the sole Demand Active producer, all referenced helpers and imports exist, and no code or fixture depends on the prior empty value. Correct, minimal, and well-scoped.

@github-actions github-actions Bot added the ai-reviewed/1 One automated review completed label Oct 21, 2026
The server Demand Active PDU used an empty source descriptor, sent as a
single NUL byte. Jump Desktop rejects it ("bad packet - source Descriptor
not set to RDP") and drops the connection right after the TLS upgrade.
RDP encodes as RDP\0, the same four bytes the FreeRDP server sends.

Signed-off-by: Alex P <dtk077@gmail.com>
@github-actions github-actions Bot removed the automation-failed Exact-head automated classification or review failed or was unavailable label Oct 23, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR 2119 changes the acceptor's server Demand Active source descriptor from an empty string (encoded as a single NUL byte, rejected by Jump Desktop) to "RDP" (encoded as "RDP" plus a NUL, matching FreeRDP and the repo's own SERVER_DEMAND_ACTIVE fixture bytes) and adds a targeted regression test. The one-line production change at connection.rs:1386 was verified, as were the fixture bytes in capsets.rs already encoding "RDP" with a NUL and length 4. The change is minimal, protocol-conformant, and interop-motivated; no correctness or protocol defect was found. The sole publishable finding, from the test reviewer, is that the new test lacks an `// oracle:` marker tying its expected value to MS-RDPBCGR 2.2.1.13.1.1 and regression #2118; the value itself checks out independently, so this is a low-severity reviewability gap.

Push a commit after addressing these findings. If no code change is needed, you may resolve inline threads and comment @github-actions review-ready to request human review.

Comment thread crates/ironrdp-testsuite-core/tests/server/acceptor.rs
@github-actions github-actions Bot added ai-reviewed/2 Two automated reviews completed needs-author-action The pull request author is the current next actor and removed ai-reviewed/1 One automated review completed labels Oct 23, 2026
@mamoreau-devolutions
Marc-André Moreau (mamoreau-devolutions) merged commit d921607 into Devolutions:master Oct 23, 2026
44 checks passed
@github-actions github-actions Bot removed the needs-author-action The pull request author is the current next actor label Oct 23, 2026
Anton Mostovoy (antonmos) added a commit to antonmos/IronRDP that referenced this pull request Oct 26, 2026
…ktop-scale-factor

* upstream/master: (92 commits)
  fix(server): advertise horizontal mouse wheel input (Devolutions#2236)
  fix(pdu): reject RSA moduli below 512 bits (Devolutions#2225)
  ci(ffi): verify generated bindings (Devolutions#2166)
  build(ffi)!: move to Diplomat 0.16.1-devo.2 (Devolutions#2165)
  build: make the client's video, camera and decoder crates publishable (Devolutions#2239)
  ci(release): release the newly published crates (Devolutions#2218)
  perf(graphics): replace the RLGR decoder's bit reader (Devolutions#2150)
  chore(graphics): add RemoteFX decode benchmarks (Devolutions#2149)
  fix(server)!: pass a GfxContext to the GfxServerFactory build methods (Devolutions#2104)
  fix(pdu): check remaining length when skipping padding and reading client core data (Devolutions#2130)
  fix(session): avoid hang on empty QOIZ updates (Devolutions#2147)
  feat(session): expose EGFX compositing (Devolutions#2120)
  fix(server): send RDP as the Demand Active source descriptor (Devolutions#2119)
  feat(activex)!: broaden mstscax compatibility (Devolutions#2211)
  feat(viewer): run RemoteApp programs in native windows (Devolutions#2201)
  fix(graphics): reject RLGR3 values larger than their remainder (Devolutions#2132)
  feat(egfx)!: composite surfaces mapped to RemoteApp windows (Devolutions#2197)
  feat: redirect USB devices over URBDRC with nusb and RemoteFX USB backends (Devolutions#2181)
  build: mark exposed dependencies as public (Devolutions#2213)
  chore(release): prepare for publishing (Devolutions#2212)
  ...

# Conflicts:
#	crates/ironrdp-testsuite-extra/tests/e2e.rs

This branch was previously deployed

1 inactive deployment
llm-providers — bca3da4a Deployed Oct 23, 2026 by mamoreau-devolutions via Classify pull request #7850
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-reviewed/2 Two automated reviews completed kind/protocol Affects RDP or related protocol behavior risk/medium Behavioral change that does not substantially alter a core public API size/XS Size: up to 49 counted lines and 2 files

Development

Successfully merging this pull request may close these issues.

ironrdp-acceptor: empty Demand Active source descriptor is rejected by Jump Desktop

3 participants