Repository navigation
Bind KdRelay to loopback - #41260
Merged
Ben Hillis (benhillis) merged 1 commit intoAug 6, 2026
Merged
Bind KdRelay to loopback#41260Ben Hillis (benhillis) merged 1 commit into
Ben Hillis (benhillis) merged 1 commit into
Conversation
Restrict the KdRelay listener to local connections. Co-authored-by: Copilot <[email protected]> Copilot-Session: d9d1a097-a7bc-4c1b-806b-d3778adfd23a
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens wslrelay’s KdRelay mode by limiting the TCP listener to local-only connections, binding the socket to the loopback interface instead of all interfaces. This reduces the exposed attack surface while keeping the relay behavior otherwise unchanged.
Changes:
- Bind the KdRelay
AF_INETlistening socket toINADDR_LOOPBACK(127.0.0.1) rather thanINADDR_ANY.
Blue (OneBlue)
approved these changes
Aug 5, 2026
Ben Hillis (benhillis)
added a commit
that referenced
this pull request
Sep 8, 2026
Restrict the KdRelay listener to local connections. Co-authored-by: Copilot <[email protected]> Co-authored-by: Ben Hillis <[email protected]> Copilot-Session: d9d1a097-a7bc-4c1b-806b-d3778adfd23a (cherry picked from commit 5eb2138)
Ben Hillis (benhillis)
added a commit
that referenced
this pull request
Sep 10, 2026
* Validate NUL-termination of flexible-array Buffer in interop messages (#40402) * Validate NUL-termination of flexible-array Buffer in interop messages Use string::FromMessageBuffer<T>() instead of directly accessing the Buffer[] flexible-array member in interop message structs. FromMessageBuffer validates that a NUL terminator exists within the span bounds, preventing out-of-bounds reads when a malformed message contains no Buffer data or lacks NUL termination. Affected message handlers: - LxInitMessageQueryEnvironmentVariable (config.cpp) - LxInitMessageCreateLoginSession (config.cpp) - LxMiniInitMessageUnmount (main.cpp) Co-authored-by: Copilot <[email protected]> * Remove unused Message parameter name in WSLC_UNMOUNT handler After switching to FromMessageBuffer, the Message parameter is no longer referenced directly. Remove the name to avoid -Wunused-parameter. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Ben Hillis <[email protected]> Co-authored-by: Copilot <[email protected]> (cherry picked from commit 909d5eb) * Bind KdRelay to loopback (#41260) Restrict the KdRelay listener to local connections. Co-authored-by: Copilot <[email protected]> Co-authored-by: Ben Hillis <[email protected]> Copilot-Session: d9d1a097-a7bc-4c1b-806b-d3778adfd23a (cherry picked from commit 5eb2138) * Update Microsoft.NETCore.App.Runtime to 10.0.11 (#41332) (cherry picked from commit 8edd976) * Fix unvalidated TerminalProfileSize during distribution import (#41495) * Fix unvalidated TerminalProfileSize when importing a distribution _ProcessImportResultMessage constructed the terminal profile string_view using the message-supplied TerminalProfileSize without validating it against the received buffer length. Use the bounds-checked two-argument span::subspan() overload (matching the existing ShortcutIconSize handling a few lines above) so an inconsistent size value throws instead of producing a string_view that runs past the end of the buffer. Co-authored-by: Copilot <[email protected]> Copilot-Session: 35281c30-3d08-4f05-8c84-2ce4711023d5 * format source --------- Co-authored-by: Ben Hillis <[email protected]> Co-authored-by: Copilot <[email protected]> Copilot-Session: 35281c30-3d08-4f05-8c84-2ce4711023d5 (cherry picked from commit f2d87e0) * Avoid stop service race window during uninstall (#40625) Disable service before stopping service during uninstall. (cherry picked from commit c28bd15) --------- Co-authored-by: Ben Hillis <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Blue <[email protected]> Co-authored-by: Feng Wang <[email protected]> Copilot-Session: d9d1a097-a7bc-4c1b-806b-d3778adfd23a Copilot-Session: 35281c30-3d08-4f05-8c84-2ce4711023d5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restrict the KdRelay listener to local connections by binding to the loopback address instead of the wildcard address.