Skip to content

fix(windows): accept a private DACL when the user is SYSTEM - #14769

Merged
morluto merged 1 commit into
morluto:mainfrom
Adolanium:fix/private-dacl-system-user
Nov 26, 2026
Merged

morluto merged 1 commit into
morluto:mainfrom
Adolanium:fix/private-dacl-system-user

Conversation

@Adolanium

Copy link
Copy Markdown
Contributor

Summary

No linked issue. This pull request is the report and the fix.

private DACL trustees: current user, then SYSTEM
- else-if: a SYSTEM user ACE sets only the user flag
- the second SYSTEM ACE does the same
- require(user && system) fails
+ each ACE is compared with both SIDs
+ a SYSTEM user ACE sets both flags
+ an unrelated SID is still rejected

Closed pulls #10318 and #10319 only add diagnostic text to this check. They do not change the comparison.

Problem and expected behavior

verifyPrivate in native/windows/src/filesystem.cc and _verify_windows_private_path in bridge/cutter/rea_bridge.py require the current user and NT AUTHORITY\SYSTEM. The creator writes both ACEs. When the process user SID is SYSTEM (S-1-5-18), those ACEs are the same SID. The old else if counts each one as the user and never sets the SYSTEM flag, so a DACL this code just created fails its own check.

A distinct user SID still needs one user ACE and one SYSTEM ACE. An unrelated SID is still rejected. The ACE count stays two.

Change and scope

Each ACE is tested against the user SID and against SYSTEM independently. One ACE may set both flags. Creation of the DACL is unchanged.

Not included: accepting a different ACE count, printing SIDs, or the diagnostic sentences from #10318 and #10319.

Contribution scope: not applicable. This stays inside the existing private-object check. No new provider, execution, injection, mutation, or protection recovery.

Contract and boundary impact

  • Semantic owner and earliest changed stage: verifyPrivate and the Cutter bridge path check, at trustee classification.
  • Contribution scope fit and linked maintainer decision: ordinary fix inside the existing check. Maintainer scope decision: not applicable.
  • CLI and MCP/tool-catalog contract: none. A process running as SYSTEM can pass the existing private-object self-test.
  • Provider, bridge, target-format, or platform compatibility: Windows private DACL check and the Cutter bridge verifier. A published addon must be rebuilt before an installed host uses the native change.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): none. The guard still requires the current user and SYSTEM, a present protected DACL on the root, and exactly two allow-all ACEs.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

The change accepts a private DACL whose trustees are the current user and SYSTEM when those SIDs are the same. It does not read a target, launch a process, inject, mutate a target, contact a network, or recover protected code.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: bridge/cutter/test_private_acl.py. A SYSTEM user SID sets both flags. A distinct user and SYSTEM stay separate. An unrelated SID is rejected.
  • Base reproduction or other evidence: source inspection of the else if on upstream/main at 331808dcd. The creator in Security::Security adds userSid() and the local SYSTEM SID. The verifier used else if, so the second comparison never ran when the SIDs were equal.
  • User-visible CLI/MCP output (if applicable): none. The failure sentences are unchanged. The SYSTEM-user case no longer fails.
  • Remaining proof gaps: the Windows addon was not compiled here. npm run build:windows-native needs Linux and MinGW-w64. The native check was not executed. The Python classification is the same comparison and was executed.

Boundary and lifecycle regressions: not applicable. This is trustee classification inside an existing check.

Validation performed

  • python bridge/cutter/test_private_acl.py — 3 passed.
  • Native addon build and verify:windows-native — not run. This host has no MinGW-w64 or MSVC toolchain for that lane.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. A non-SYSTEM user still needs both trustees. An unrelated principal is still rejected.
  • Real Hopper/Ghidra, browser, or OS coverage: the check was not run as NT AUTHORITY\SYSTEM. The Python classification of that SID was executed.
  • Package or release metadata impact: none. A published rea-windows-x64.node does not include the native change until that addon is rebuilt.
  • Security, privacy, process, or containment review: the accepted DACL is still only the current user and SYSTEM. When those are the same SID, one ACE satisfies both requirements. No SID is logged. No additional principal is allowed.

Author readiness

Human owner: @Adolanium

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Author checklist (completed by the PR author before requesting review)

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.
  • I ran every test, build, or measurement needed to validate this change, reported a browser, GPU, or environment gap only when that runtime or hardware is unavailable, and reported the checks I ran and their results without presenting inferred correctness or speedups as measured.
  • Comments explain constraints or non-obvious decisions; task history and conversations stay out of code and docs.
  • Documentation is concise and factual, without punchy slogans or promotional language.
  • This change fixes the root cause and follows the engineering rules in AGENTS.md.
  • Formatted input is interpreted once at the owning boundary, and consumers use the owner's parsed facts. See Interpret boundary facts once.
  • Combined failures preserve partial observations, remaining resources, and cleanup facts. See Own the lifecycle.
  • A hardcoded limit is an REA_ runtime setting with a default, floor, and maximum, unless a fixed ceiling has a stated reason. See Adding a runtime setting.

The trustee check treated the user SID and SYSTEM as exclusive. When the process user is SYSTEM, both ACEs match the user and the SYSTEM flag stays unset. Compare the two SIDs independently.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T16:07:00.662534Z
We couldn’t complete this review. Comment @codex review to try again.
3f485f9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The trustee fix appears safe to merge; no actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The trustee fix appears safe to merge; no actionable issues were found.

Summary

Fixes both Windows private-access verifiers so SYSTEM can satisfy the current-user and SYSTEM checks when those identities match.

  • Windows private DACL checks accept SYSTEM as both trustees when it is the user.

Reviews (1) · Last reviewed commit: "fix(windows): accept a private DACL when..." · Reviewed by Greptile

@morluto
morluto merged commit 62a4bee into morluto:main Nov 26, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants