Skip to content

PSEC 1.0: Undocumented prerequisites for 0x80070002 under session-0 batch logon #1631

Open

Description

@T3xM3XShuffl3

Brief description of your issue

Request for documentation: Windows PSEC creation prerequisites and diagnostics

I'm investigating a native CreateProcessSecurityEnvironment failure on Windows 11 Home 25H2, build 26200.9711, x64.

After extensive diagnostic work, the underlying cause remains unidentified. I'm requesting clarification of the supported Windows PSEC contract and available diagnostic interfaces, rather than reporting a confirmed Microsoft defect.

1. Verified native failure

A non-elevated, medium-integrity, restricted batch-logon process in session 0 attempted to create a PSEC environment.

The result was:

  • Native HRESULT: 0x80070002 (ERROR_FILE_NOT_FOUND)

  • Returned PSEC handle: null

  • API-set discovery: passed

  • System32 DLL loading: passed

  • Required export resolution: passed

  • Startup-attribute preparation: not reached

  • Child process: not created

Exact input specification:

  • PSEC schema version: 1.0

  • FlatBuffer identifier: PSEC

  • Serialized size: 88 bytes

  • SHA-256: 0ef0db0a4e179cd22ba3468431a85499fde979247075ae2b6e726ef8910c8e92

  • Creation flags: 0, verified from frozen source

  • Win32k system calls: disallowed

  • UI restriction mask: 0x3ff

  • Network egress: default deny

  • No explicit filesystem grants, denied paths, profile paths or named capabilities

The serialized specification was independently reconstructed and matched the retained historical evidence.

2. Caller context

The failing process had:

  • Session and token session: 0

  • Logon type: 4 (batch)

  • Integrity: medium

  • Elevation: disabled

  • Restricted-token indicator: enabled

  • Restricting SID count: 0

  • AppContainer: disabled

  • Loaded user-profile hive: absent

A previous interactive, medium-integrity maintenance-account diagnostic on the same reported Windows build accepted the same serialized specification hash and returned a non-null PSEC handle.

However, the account, logon type, session, profile state, helper build and other circumstances differed. This observation does not establish which difference caused the failure.

3. Windows component observations

The current Windows installation reports:

Component | File version -- | -- processmodel.dll | 10.0.26100.9711 appinfo.dll | 10.0.26100.9549 bfs.sys | 10.0.26100.9711

AppInfo and BFS registrations exist. AppInfo declares dependencies on RpcSs and ProfSvc.

The operational health of these services, BFS filter attachment and volume configuration remain unknown.

A later non-elevated inventory was executed in a separate low-integrity AppContainer context. Service-status, minifilter-enumeration and drive-mapping queries were denied. Those access denials cannot be attributed to the earlier medium-integrity PSEC failure.

Historical loaded DLL hashes were not retained, so current disk-file hashes do not prove exact binary equivalence at the time of the original call.

4. Questions for the MXC/Windows maintainers

A. Supported caller context

Does the native PSEC 1.0 creation contract support a medium-integrity, restricted, non-AppContainer caller using a session-0 batch logon without a loaded user-profile hive?

If support is conditional, where are the required token, logon, profile and session prerequisites documented?

B. Error 2 interpretation

Which documented creation-time prerequisite or internal operation can return 0x80070002 when API/DLL/export resolution succeeds and the PSEC specification contains no explicit filesystem grants?

Does the API require any AppInfo, ProfSvc, BFS, system-volume or other host-resource initialization even for this policy?

C. Non-invasive diagnostics

Is there a supported diagnostic interface capable of identifying the originating Windows operation and status without:

  • Modifying the original PSEC specification

  • Loading or creating a user profile

  • Changing the caller's security context

  • Relaxing security policies

  • Enabling permissive learning mode

  • Performing broad filesystem or kernel tracing

D. OS-side ETW events

The pinned Microsoft MXC source references OS TraceLogging provider:

{f6ec123e-314e-400b-9e0a-151365e23083}

Pinned source revision:

b21120168d70befe12356411423266bfef168446

On Windows build 26200.9711, does this provider emit an event specifically for unsuccessful CreateProcessSecurityEnvironment initialization?

If so, could you identify its authoritative event name, descriptor/version, typed originating operation/status fields, emitting process and documented per-invocation or caller/service correlation mechanism?

If the provider does not expose this information, that clarification would also be useful.

5. Related issues and source references

Public MXC documentation:

https://github.com/microsoft/mxc/blob/b21120168d70befe12356411423266bfef168446/docs/development/guides/process-container-adding-os-features.md

These references provide context, but none independently establishes the root cause of the precise no-grants PSEC failure described here.

6. Requested outcome

A version-specific prerequisite contract, confirmed implementation guidance, or supported narrow diagnostic method would be greatly appreciated.

We have deliberately avoided modifying Windows services, filesystem filters, user profiles, security settings or the protected execution context while the cause remains unverified.

Thank you for any clarification the MXC or Windows engineering team can provide.

Activity

  1. added
    Issue-Docs
    Needs-Triage
    on Nov 2, 2026
  2. added
    Backend-ProcessContainer
    Area-Question
    and removed
    Needs-Triage
    on Nov 2, 2026
  3. T3xM3XShuffl3 commented on Nov 12, 2026

    @T3xM3XShuffl3
    Author

    Hello, I wanted to follow up on this issue, as the underlying PSEC creation failure remains unresolved.

    Our investigation has reached the limit of what we can establish using documented public interfaces and non-invasive diagnostics.

    To briefly reiterate the central finding:

    • Windows 11 25H2, build 26200.9711
    • CreateProcessSecurityEnvironment returns 0x80070002 with a null handle
    • PSEC 1.0 specification, 88 bytes, creation flags 0
    • No explicit filesystem grants or paths
    • Medium-integrity, non-AppContainer, restricted session-0 batch-logon caller
    • API/DLL/export resolution succeeds; failure occurs before startup attributes or child-process creation
    • An earlier interactive-account test accepted the same specification hash, although multiple execution-context differences remain unresolved

    We have not modified the caller's profile, Windows security configuration, services, filesystem filters or PSEC specification to work around the failure.

    Could someone familiar with the Windows ProcessContainer/PSEC implementation help clarify three questions?

    1. Caller support: Is this particular session-0 batch-logon context supported for native PSEC environment creation, including when the user-profile hive is not loaded?

    2. Error interpretation: Are there documented internal prerequisites that can produce 0x80070002 during environment creation even when the PSEC policy contains no explicit filesystem grants?

    3. Supported diagnostics: Is there a narrowly scoped, documented diagnostic interface that identifies the underlying failing operation without changing the security context, relaxing the policy or enabling learning mode?

    If these questions fall outside the MXC team's ownership because the relevant implementation resides within Windows, could you point us toward the appropriate Windows engineering team, documentation or support channel?

    We are deliberately keeping protected execution disabled until we can identify a justified corrective action.

    Any guidance, even clarification of which team owns this API behavior, would be greatly appreciated.

    Thank you for your time.

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-QuestionBackend-ProcessContainerIssue-Docs

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions