-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#5784: Mitigate drwrap retaddr transparency violation (#5896)
Adds a new drwrap API, drwrap_get_retaddr_if_sentinel(), that allows mitigation of a transparency violation under the DRWRAP_REPLACE_RETADDR drwrap strategy where the return address on the stack is replaced with the address of the internal replace_retaddr_sentinel() routine. This API modifies the passed-in value to the actual return address of the inner-most nested wrapped function if the passed-in value is replace_retaddr_sentinel() itself. Fixes the value of the marker written by the kernel xfer event in drmemtrace by using the new drwrap_get_retaddr_if_sentinel() API on the mcontext PC before writing it out to the trace. Before, this caused many invariant errors of type 'Signal handler return point incorrect' in traces collected on proprietary apps. Verified on a large proprietary app that this error due to drwrap is fixed now, whereas there were a few hundred instances before. Fixes: #5784
- Loading branch information
1 parent
3e74d80
commit 04dfa77
Showing
3 changed files
with
45 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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