Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#5784: Mitigate drwrap retaddr transparency violation #5896

Merged
merged 5 commits into from Mar 7, 2023

Commits on Mar 7, 2023

  1. i#5784: Mitigate drwrap transparency violation

    Adds a new drwrap API, drwrap_replace_if_retaddr_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 modified the passed-in value to the actual return address of the
    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_replace_if_retaddr_sentinel() API
    on the mcontext PC before writing it out to the trace. 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
    abhinav92003 committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    db392c5 View commit details
    Browse the repository at this point in the history
  2. Minor comment fixes.

    abhinav92003 committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    7ec86ec View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a425924 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3505775 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0823251 View commit details
    Browse the repository at this point in the history