Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR attempts to mitigate the existing “heap signature scan” exploit by storing the benchmark authentication signature inside an obfuscated, page-backed buffer on the C++ side, and adds a new exploit that recovers the signature by scanning the stack for pointers into anonymous mappings.
Changes:
- Introduce
ObfuscatedHexDigest/ProtectablePageto store the signature at a random in-page offset and stop keeping it as astd::string. - Change the input/output signature handling to read/write the 32-byte signature without constructing a C++ string.
- Add a new “stack sig scan” exploit and wire it into the exploit runner.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| exploits/submission_stack_sig_scan.py | New exploit scanning stack for pointers into anonymous regions to recover signature and forge output |
| exploits/submission_heap_sig_scan.py | Adds kernel() stub to keep module valid when exploit doesn’t early-exit |
| exploits/run_all.py | Registers the new exploit and fixes list formatting |
| csrc/obfuscate.h | Adds obfuscation/“protectable page” types for signature storage |
| csrc/obfuscate.cpp | Implements the mmap-backed page and random-hex filler |
| csrc/manager.h | Replaces std::string signature with ObfuscatedHexDigest; updates parameter parsing signature |
| csrc/manager.cpp | Reads signature bytes directly into ObfuscatedHexDigest storage; writes signature via fwrite |
| csrc/binding.cpp | Allocates obfuscated signature storage and passes buffer to parameter reader |
| CMakeLists.txt | Adds csrc/obfuscate.cpp to the build |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
bury the real signature in a bunch of noise.
add a new exploit that explicitly looks for a pointer on the stack that points to hexdigest-like data, bypassing the mitigation.