Skip to content

fix(agent): support app execution aliases for elevated broker executions - #1907

Merged
Vladyslav Nikonov (vnikonov-devolutions) merged 2 commits into
masterfrom
fix-broker-app-exec-alias
Aug 4, 2026
Merged

fix(agent): support app execution aliases for elevated broker executions#1907
Vladyslav Nikonov (vnikonov-devolutions) merged 2 commits into
masterfrom
fix-broker-app-exec-alias

Conversation

@vnikonov-devolutions

Copy link
Copy Markdown
Contributor

Fixes elevated package broker executions failing with 'failed to open elevated package-manager executable' when the package manager resolves to a Microsoft Store app execution alias, such as the per-user winget.exe under %LOCALAPPDATA%\Microsoft\WindowsApps.

Alias reparse points cannot be opened for read, so the anti-tampering verification could never pin them. Verification now resolves the alias to the real Store binary and verifies and executes that instead, keeping the full owner/DACL/ancestor-directory checks on the actual image that is loaded.

Resolving the alias also surfaced two DACL patterns on Store binaries that the fail-closed ACE walk rejected; both are now handled:

  • Conditional (callback) allow ACEs are treated as unconditional allows, since their condition can only narrow the grant.
  • Process trust-label SIDs (S-1-19-*), which the kernel only assigns to Windows-signed protected processes, are trusted for the executable check only (not for the policy file).

The per-user winget.exe under %LOCALAPPDATA%\Microsoft\WindowsApps is an
APPEXECLINK reparse point that cannot be opened for read, so the broker's
elevated-executable verification failed with 'failed to open elevated
package-manager executable'. Verification now resolves the alias to its
real target and verifies/pins that instead.

The resolved Store binaries under Program Files\WindowsApps also exposed
two DACL patterns the fail-closed ACE walk rejected: conditional
(callback) allow ACEs and process trust-label SIDs (S-1-19-*). Callback
allow ACEs share the allow-ACE layout and their condition can only narrow
the grant, so they are treated as unconditional allows; trust-label SIDs
are only ever held by Windows-signed protected processes, so they are
trusted for the executable check (not the policy file).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 4, 2026 14:30
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

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.

Pull request overview

Adds secure resolution of Microsoft Store app execution aliases for elevated broker operations.

Changes:

  • Resolves AppExecLink aliases to their Store executable targets.
  • Supports callback ACEs and process trust-label SIDs.
  • Adds alias parsing and security verification tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
devolutions-agent/src/broker/policy_security.rs Implements alias resolution and expands executable ACL verification.
devolutions-agent/Cargo.toml Enables required Windows IO APIs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread devolutions-agent/src/broker/policy_security.rs Outdated
…ackage identity

The alias reparse data lives in user-writable %LOCALAPPDATA%, so its target
is untrusted: validate the package family, executable name, and package
directory before substituting the target for elevated verification.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@CBenoit Benoît Cortier (CBenoit) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) merged commit d45b176 into master Aug 4, 2026
42 checks passed
@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) deleted the fix-broker-app-exec-alias branch August 4, 2026 14:57
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.

5 participants