pe: initialize the default x64 security cookie before startup #892
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/899"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T16:28:02Z.
Refs #870.
On a CRT-free DLL and EXE, Windows 11 initializes the default x64 security cookie before guest entry. The original mapper left the file value in place. Initialize the eligible slot with the Windows system random generator after relocation and before callbacks or entry, and reject a destination outside an aligned writable image section.
The fixture checks both loaders on the default cookie, short load-config prefixes, an unused-cookie flag and a preinitialized value. It also checks the mapper's refusal of a read-only destination. Running the new fixture against the original mapper fails on the default cookie.
Windows x64, MSVC 19.51, Release:
7/7 passed with normal Windows process permissions. Documentation links, bidi controls and
git diff --checkpassed.