Skip to content

fix(windows): report the DACL bits a private-object check observed - #10318

Closed
liziye627-design wants to merge 5 commits into
morluto:mainfrom
liziye627-design:fix/9182-dacl-readback
Closed

liziye627-design wants to merge 5 commits into
morluto:mainfrom
liziye627-design:fix/9182-dacl-readback

Conversation

@liziye627-design

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

Copy link
Copy Markdown
Contributor

Summary

Reports the DACL flags a private-object check actually read back, and compares them with a freshly built expected policy. The self-test still fails when the protected DACL is absent; this does not change creation, the guard, or Win32 5.

Related to #9182. This does not close it: the host failure remains, and the new text is only the diagnostic the report asked for.

Problem and expected behavior

On the reported Windows 10 host, doctor --provider ghidra stops in the native self-test with Private object requires a present protected DACL and Win32 5. That 5 is the constant passed with the failure, so a missing SE_DACL_PRESENT, a dropped SE_DACL_PROTECTED bit, and an unexpected ACE count look the same.

Change and scope

verifyPrivate keeps the same guard and the same ERROR_ACCESS_DENIED code. When the guard fails, the message now includes readback present, protected, ace_count (or absent), and root. It then includes expected_present, expected_protected, and differs_from_expected, or expected_control=unavailable when those expected flags cannot be read.

Those expected flags come from a new Security object built inside verifyPrivate. They are not the descriptor passed to NtCreateFile, and they are unknown for an object that is only reopened. No SIDs or ACE masks are added.

Not included: changing NtCreateFile security attributes, accepting an unprotected DACL, or treating this host report as reproduced. Contribution scope: not applicable. This stays inside the existing private-object check.

Contract and boundary impact

  • Semantic owner and earliest changed stage: native/windows verifyPrivate, at the existing readback guard. 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. doctor 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: the expected flags are labeled as expected policy. The creation descriptor stays unreported.
  • 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 this sentence.
  • Base reproduction or other evidence: source inspection of native/windows/src/filesystem.cc on 54906fdb1. The old require always attached ERROR_ACCESS_DENIED and did not record the control bits.
  • User-visible CLI/MCP output (if applicable): a failed self-test line gains readback present= protected= ace_count= root= and then either expected_control=unavailable or expected_present= expected_protected= differs_from_expected=.
  • Remaining proof gaps: the reported host was not re-run. Whether SE_DACL_PROTECTED is dropped at NtCreateFile is still unknown. 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 (typecheck cached, lint executed, 25.3s). That run did not compile the native addon.
  • GitHub Actions CI on 2e12ea5ee — 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 control bits and an ACE count only. It does not add SIDs, paths beyond the existing failure path, or a way to accept a different DACL. Expected flags are not described as the creation input.

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 self-test named a missing protected DACL and always attached Win32 5, so the readback flags could not be distinguished from the constant.

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:52.442717Z
We couldn’t complete this review. Comment @codex review to try again.
3c63d86 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; the added diagnostics do not weaken the private-object check.

Summary

Adds readback details to the existing Windows private-DACL failure message.

  • Windows private-object failures now show the DACL state the check read.

No new actionable issues were found. This review did not rebuild the Windows addon or reproduce the reported host failure. A check for replacement PRs was blocked by missing GitHub authentication.

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

Comment thread native/windows/src/filesystem.cc Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7cc61d3c6b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread native/windows/src/filesystem.cc Resolved
The diagnostic compared a newly built descriptor with the object and called those flags supplied, which made a reopen look like Windows had changed the creation input.

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

Closing because #9182 was resolved and closed, and to avoid overlapping verifyPrivate edits with #14450 (tracking open #5237).

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