Skip to content

fix(windows): report the ACE count a private DACL check observed - #10319

Closed
liziye627-design wants to merge 5 commits into
morluto:mainfrom
liziye627-design:fix/5237-dacl-trustee-count
Closed

liziye627-design wants to merge 5 commits into
morluto:mainfrom
liziye627-design:fix/5237-dacl-trustee-count

Conversation

@liziye627-design

@liziye627-design liziye627-design commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reports the ACE count, protected bit, and whether the process token user is SYSTEM when a private DACL trustee check fails. The check still requires exactly two ACEs and still fails closed. It does not print SIDs.

Related to #5237. This does not close it: the host failure is not reproduced or repaired, and the installed addon digest is not added.

Problem and expected behavior

inspect-android-package on the reported Windows host stops in the native self-test with Private DACL contains unexpected trustees and Win32 5. That 5 is the constant passed with the failure. At the 6.5.0 source, that sentence is only the AceCount != 2 guard, before any SID is compared. A later SID mismatch uses a different sentence. Neither sentence records the count, the protected bit, or whether the token user is SYSTEM.

Change and scope

The three existing trustee failures now append ace_count, protected, and token_user_equals_system. The helper takes Security& so EqualSid can read the system SID under MinGW without dropping const. The pass/fail conditions and ERROR_ACCESS_DENIED stay the same. No SID, ACE mask, or path beyond the existing failure path is added.

Not included: changing DACL creation, accepting another ACE count, hashing the installed .node, or the separate protected-DACL sentence tracked by #9182. Contribution scope: not applicable. That sentence is #10318 and edits the same function, so the two pulls will conflict.

Contract and boundary impact

  • Semantic owner and earliest changed stage: native/windows verifyPrivate, at the existing trustee guards. Consumers see a longer failure string and the same Win32 code.
  • Contribution scope fit and linked maintainer decision: ordinary diagnostic inside the existing check. No new provider, execution, injection, or protection recovery. Maintainer scope decision: not applicable.
  • CLI and MCP/tool-catalog contract: none. inspect-android-package can surface the longer native self-test line.
  • Provider, bridge, target-format, or platform compatibility: Windows native self-test text only. A published addon must be rebuilt before an installed host sees it.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): none. The guard and cleanup path are unchanged.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Evidence and regression coverage

  • Tests added or updated: none. No test pins these sentences.
  • Base reproduction or other evidence: source inspection of native/windows/src/filesystem.cc on 54906fdb1. The old require for AceCount == 2 always attached ERROR_ACCESS_DENIED and did not record the count.
  • User-visible CLI/MCP output (if applicable): a failed trustee line gains ace_count= protected= token_user_equals_system=.
  • Remaining proof gaps: the reported host was not re-run. The reason an ACE count would differ from two is still unknown. The installed addon digest requested in the issue is not part of this failure string. This machine did not rebuild the addon locally.

Boundary and lifecycle regressions: not applicable. The check's pass/fail outcome is unchanged.

Validation performed

  • npm run check:fast during the first push — passed from cache in 316ms. That cache does not compile the native addon.
  • GitHub Actions CI on 6df0f31ea — conclusion success. Build bundled Windows x64 native controls passed, and Windows capability and package lane passed. Source tests, static checks, and all eight test shards passed. PR readiness failed because the three author declarations below are unchecked.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Callers that match the old sentence as a prefix still match. Callers that require the old sentence to be the entire message will see extra fields.
  • Real Hopper/Ghidra, browser, or OS coverage: the reported host was not re-run. CI built the Windows addon for this commit; a published rea-windows-x64.node does not include this string until that addon is rebuilt for release.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: the message adds a count, one control bit, and a boolean. It does not add SIDs or a way to accept a different DACL.

Author readiness

Human owner: @liziye627-design

  • 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.

Before merge

  • 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.

The trustee failure always attached Win32 5, so a count other than two could not be told apart from a later SID mismatch.

Co-authored-by: Cursor <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

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-25T05:19:46.761736Z
We couldn’t complete this review. Comment @codex review to try again.
7b50012 New commits
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; it adds failure details without weakening the private-DACL checks.

Summary

Adds ace_count, protected, and token_user_equals_system to three Windows private-DACL trustee failures.

  • Windows private-access checks now show more detail when trustees fail.

Reviews (5) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

Comment thread native/windows/src/filesystem.cc Resolved
EqualSid cannot accept the const SID bytes from a const security object, so the addon build stopped before it could report the ACE count.

Co-authored-by: Cursor <[email protected]>
@morluto morluto added the bug Something isn't working label Nov 22, 2026
@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.

@liziye627-design

Copy link
Copy Markdown
Contributor Author

Superseded by #14450 on a clean single-commit branch over current main.

@morluto morluto added the area: runtime Process capture and runtime observation label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants