Skip to content

[Windows 10 x64] Native self-test fails at protected DACL verification (Ghidra/JADX providers unavailable) #9182

Closed

Description

@lbchs5343

Environment

  • OS: Windows 10 Pro x64, build 19045 (22H2), NTFS
  • rea-agents 6.8.0 (installed addon native/windows/build/rea-windows-x64.node, 929,696 bytes)
  • Node.js 24.22.1
  • JDK 21 (Microsoft OpenJDK)
  • Ghidra 12.1.4 — support/analyzeHeadless.bat runs fine standalone
  • JADX CLI 1.5.6 — runs fine standalone
  • Process runs at Medium integrity; not elevated (whoami /groups shows Mandatory Label\Medium Mandatory Level, no Group owner marker on BUILTIN\Administrators)

Note: I first added context to #5237 and stated Windows 11 there. That was wrong — this host is Windows 10 build 19045. This issue is the corrected version.

Symptom

doctor --provider ghidra fails the native self-test before any Ghidra or JADX call is made:

REA Windows native self-test failed: Private object requires a present protected DACL
[%TEMP%\rea-native-probe-...] (Win32 5): Access is denied.

ghidra-java is the only failing check; everything else passes (Ghidra 12.1.4 detected, analyzeHeadless resolves, decompile.exe x86_64, JDK 21). Changing TEMP/TMP to a second location on another drive produces the exact same error, so the Temp directory itself does not appear to be the variable.

Where it actually fails

Reading verifyPrivate in native/windows/src/filesystem.cc:

if (code != ERROR_SUCCESS) throw Failure("Read private DACL by handle failed", path, code);
// owner check …
require(acl != nullptr && (control & SE_DACL_PRESENT) != 0 &&
        (!root || (control & SE_DACL_PROTECTED) != 0),
        "Private object requires a present protected DACL", path, ERROR_ACCESS_DENIED);
require(acl->AceCount == 2, "Private DACL contains unexpected trustees", ...);
  1. This is not the Delete owned object by handle failed signature from [Bug] Windows native authority self-test fails on real Windows: "Delete owned object by handle failed" (Win32 5), and leaves probe directories behind #1701 / [Windows x64] Every provider-backed operation fails with "Delete owned object by handle failed (Win32 5)" #2196. On 6.8.0 the self-test reaches verifyPrivate before cleanup runs.
  2. GetSecurityInfo appears to succeed; otherwise the first line would raise Read private DACL by handle failed. The failure is the SE_DACL_PROTECTED guard, and the Win32 5 in the message is the constant passed to Failure(...), not a return value from the failing API.
  3. The earlier delete-path fixes (fix(windows): retain failed native inspection ownership #1826, merged 2026-10-11; fix(native/windows): share FILE_SHARE_DELETE so owned objects can be marked delete-pending #2445, merged 2026-10-13) are already included in 6.8.0 (published 2026-10-25), and the local addon binary contains all six native failure strings.

Host-side experiments

Both run on this host, same user, same TEMP location; no residual objects left behind.

A — create a directory, then apply a protected DACL through Win32 ACL APIs

SET_ACL_OK
Protected=True
ACE: NT AUTHORITY\SYSTEM | FullControl
ACE: <current-user> | FullControl

B — create the directory with a protected DACL at creation time, mirroring the shape of createRelative (SECURITY_ATTRIBUTES + D:P(...) SDDL), then read the descriptor back immediately with GetNamedSecurityInfo, no delay:

SDDL_CONVERT=True
CREATE_WITH_DACL=True
READBACK_IMMEDIATE_rc=0    (ERROR_SUCCESS, no delay)
READBACK_DELAYED_rc=0
PROTECTED=True

So on this Windows 10 host a directory created with a protected DACL keeps SE_DACL_PROTECTED and is readable back immediately. I could not reproduce the guard failure through the documented Win32 path, so this is offered as a host-comparison data point rather than a claim about the cause.

Open question

createRelative builds an absolute security descriptor (InitializeSecurityDescriptor / SetSecurityDescriptorDacl / SetSecurityDescriptorControl) and passes it via OBJECT_ATTRIBUTES.SecurityDescriptor to NtCreateFile. If the descriptor format expected at that boundary differs from what this host accepts, SE_DACL_PROTECTED could be dropped while the create still reports FILE_CREATED. I have not verified this and am not claiming it is the cause.

Impact

On this host the Ghidra and JADX providers are both unusable because of this guard. The IDA provider works, since it does not go through the Windows native runtime.

Request

Sanitized diagnostics for the readback: AceCount, whether SE_DACL_PRESENT / SE_DACL_PROTECTED were observed, and whether the created descriptor differs from the supplied one. That would let this be resolved with host-specific data rather than guesswork.

Activity

  1. liziye627-design commented on Nov 13, 2026

    @liziye627-design
    Contributor

    Diagnostic only, in #10318. When the existing protected-DACL guard fails, the message now includes the readback present/protected bits, ACE count, root flag, and whether those two bits differ from the descriptor setup supplies. The guard, Win32 5, and creation path are unchanged, so this does not make the self-test pass. The addon was not rebuilt here.

  2. lbchs5343 commented on Nov 15, 2026

    @lbchs5343
    Author

    Correction from the reporter: this is not fixed by 6.9.0.

    Before writing this, I re-ran both versions on the same host, same environment (same TEMP, same JDK/Ghidra paths, non-elevated Medium integrity). Both pass now:

    version ghidra-native_authority detail
    6.8.0 ok Verified Windows native Job Object, private DACL, and reparse-safe handle controls; local NTFS only.
    6.9.0 ok Verified Windows native Job Object, private DACL, and reparse-safe handle controls; local NTFS/ReFS only.

    The differing detail strings confirm each run used its own version's doctor code rather than a shared install. The packaged addons also differ (929,696 vs 930,723 bytes). So 6.8.0, which failed on 2026-11-12/13 with Private object requires a present protected DACL, now passes unchanged.

    What changed on the host

    • LastBootUpTime is 2026-11-14 11:26 — a reboot happened after the failing reports.
    • No OS update: newest hotfix is 2026-10-16 (KB5126657 / KB5127308 / KB5127689); ntoskrnl.exe and kernel32.dll are dated 2026-10-16.
    • Process is still non-elevated (Medium integrity; BUILTIN\Administrators shows deny-only, not group owner).
    • TEMP is still D:\tools\rea\temp on NTFS, with inherited Authenticated Users:(OI)(CI)(M).

    The reboot is the only delta I can observe. That is consistent with your "host-dependent" framing: some state persisted across the earlier runs and was cleared by the reboot. I could not identify which state, and it is gone now, so I can no longer capture the readback bits #10318 would print.

    Two consequences

    1. Please don't attribute this to 6.9.0 in the changelog. Between rea-agents-6.8.0 and rea-agents-6.9.0, the only native/windows/src/filesystem.cc changes are ReFS authority admission (feat(native): support ReFS filesystem authority #10086) and the runtime_write_transient operation. verifyPrivate and the private-DACL creation path are identical in both tags.
    2. fix(windows): report the DACL bits a private-object check observed #10318 still looks worth shipping. Hosts that still fail are the only ones that can produce the readback values, and without them the report stays ambiguous. This host can no longer reproduce it.

    Should this stay open as a host-state report, or would you rather close it and keep the remaining unknown tracked in #8700? I can keep this host available for a specific probe if that helps.

  3. added
    area: tests
    provider: ghidra
    provider: jadx
    on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: testsprovider: ghidraprovider: jadx

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions