| Previous | Next |
| ERROR_NOT_SUPPORTED_IN_APPCONTAINER | ERROR_INVALID_MEDIA |
ERROR_INVALID_PACKAGE_SID_LENGTH
The identifier has the wrong binary shape for an AppContainer SID
ERROR_INVALID_PACKAGE_SID_LENGTH means code supplied a SID buffer whose length cannot represent the package or AppContainer SID expected by the API. Package SIDs are structured security identifiers derived from package or AppContainer names; they should not be constructed by truncating text, copying a string SID into a fixed buffer, or treating an ordinary account SID as interchangeable.
Use the documented SID derivation or conversion APIs, allocate the size returned by SID helpers, and validate the SID before passing it onward. Log both the SID string and GetLengthSid result. If the value came from serialization or IPC, verify architecture-independent length fields and reject partial buffers before security APIs inspect them.
What to inspect
- Generate package SIDs through supported derivation APIs.
- Validate SID structure and exact byte length at the boundary.
- Do not substitute a user, service, or capability SID.
References
- Microsoft: deriving an AppContainer SID from its name
- Microsoft: package and capability SIDs in access tokens
- Microsoft: AppContainer profile and SID creation
Looking for a different code? Search another status or error code.