What does NTSTATUS 0xC000A202 (STATUS_INVALID_PACKAGE_SID_LENGTH) mean?

 
Previous Next
STATUS_NOT_SUPPORTED_IN_APPCONTAINER STATUS_LPAC_ACCESS_DENIED

STATUS_INVALID_PACKAGE_SID_LENGTH

The package identity SID is malformed or from the wrong SID class

Package and AppContainer SIDs use a defined application-package authority and subauthority layout. This status indicates that the SID buffer supplied to an AppContainer operation does not have the required size or structure. A syntactically valid Windows SID can still be the wrong kind of SID for this purpose.

Manual SID construction is error-prone because callers must allocate the complete variable-length SID and preserve its revision, authority, and subauthority count. Deriving the SID from the exact AppContainer profile name or package family name avoids treating a user SID, capability SID, truncated buffer, or string representation as a package SID.

What to inspect

  • Validate the binary SID with IsValidSid and record GetLengthSid, identifier authority, and subauthority count.
  • Confirm that the input is the package/AppContainer SID rather than a user, group, or capability SID.
  • Derive the SID from the canonical profile or package family name and compare it byte-for-byte.
  • Check marshalling boundaries for a size calculated from a pointer size instead of the SID length.

References


Looking for a different code? Search another status or error code.