You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pageant MemoryMap always fail in cargo build --release mode if pass the security_attributes argument in MemoryMap::new, I don't know why, but pass None can fix it.
On a non-domain Windows 11 account, the WM_COPYDATA transport fails with 0x80070519 (ERROR_UNKNOWN_REVISION) out of the security descriptor setup in query_pageant_direct (debug build, pageant 0.2.1). The cause looks like a lifetime bug in get_current_process_user: it returns TOKEN_USER by value, but the Sid field inside it is a pointer into the local buffer Vec, which is dropped when the function returns. SetSecurityDescriptorOwner then receives a dangling pointer, which is undefined behavior, hence the build-mode-dependent failures. So removing the security attributes, as this PR does, is the correct fix and not just a workaround: the code being removed was handing Windows a pointer to freed memory.
For reference, connecting to Pageant's own named pipe (\\.\pipe\pageant.<user>.<hash>) with connect_named_pipe works cleanly as an alternative transport, standard agent protocol.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.