Skip to content

fix(agent): trust LOCAL SERVICE writes on broker security checks - #1906

Merged
Vladyslav Nikonov (vnikonov-devolutions) merged 2 commits into
masterfrom
fix-broker-trust-local-service
Aug 4, 2026
Merged

fix(agent): trust LOCAL SERVICE writes on broker security checks#1906
Vladyslav Nikonov (vnikonov-devolutions) merged 2 commits into
masterfrom
fix-broker-trust-local-service

Conversation

@vnikonov-devolutions

Copy link
Copy Markdown
Contributor

Fixes the package broker policy file failing to load on stock installations.

The Agent installer creates C:\ProgramData\Devolutions\Agent with write access granted to LOCAL SERVICE, and the broker's anti-tampering verification rejected that DACL, preventing the policy from loading. LOCAL SERVICE already holds elevated rights on the host, so trusting it does not extend the attack surface. NETWORK SERVICE remains untrusted (covered by a regression test).

Copilot AI balanced review requested due to automatic review settings August 4, 2026 14:27
@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

Updates broker security checks to accept LOCAL SERVICE writes required by stock Agent installations.

Changes:

  • Adds LOCAL SERVICE as a trusted SID.
  • Adds regression tests for LOCAL SERVICE and NETWORK SERVICE.
  • Updates security documentation.

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

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

@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

The Devolutions Agent installer creates C:\ProgramData\Devolutions\Agent
with write access granted to LOCAL SERVICE. The broker's anti-tampering
verification rejected such a DACL, so the policy file failed to load on
stock installations. LOCAL SERVICE already holds elevated rights on the
host, so trusting it does not extend the attack surface.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
LOCAL SERVICE is a low-privilege shared service identity, so it is only
trusted for the policy file (AdminOnly mode), not for elevated
executables where accepting it would open a privilege-escalation path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) merged commit 88799db into master Aug 4, 2026
42 checks passed
@vnikonov-devolutions
Vladyslav Nikonov (vnikonov-devolutions) deleted the fix-broker-trust-local-service branch August 4, 2026 15:26
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.

4 participants