Repository navigation
fix(profiler): win_symbol only from an ET_EXEC module (absolute addresses) - #12
Merged
Merged
Conversation
…ute space The win_symbol fact carries the address a [qword win] payload jumps to: it is only usable when the module is ET_EXEC (the address is absolute). An ET_DYN module's symbol address is module-relative and a companion library's win is not in the binary's address space - the merged fact base must not carry an address the runtime never maps at that value. Measured: the emporium libret2csu.so DEFINES its own ret2win at 0x2515 (module-relative), the lib-companion merge in lictor carried it into the fact base and the build produced a payload jumping to 0x2515, an address the runtime never maps for the binary. A PIE binary keeps the honest silence (a win there needs a leak anyway).
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.
Found through the lictor lib-companion merge (PR log0u7/lictor#22): the emporium libret2csu.so defines its own ret2win at 0x2515, module-relative. The merged fact base carried win_symbol(ret2win, 2515) and the build produced a payload jumping to an address the runtime never maps. The win fact is now emitted only when the module is ET_EXEC: the address is absolute, usable in a chain. A PIE binary keeps the honest silence (its win needs a leak anyway). Specs 166/0, parity 8/8, concordance 33/33.