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

Add check for Arm64 DWARF Expressions #2452

Closed
wants to merge 3 commits into from
Closed

Add check for Arm64 DWARF Expressions #2452

wants to merge 3 commits into from

Commits on Jan 26, 2024

  1. arm64/DWARF: Add check for Arm64 DWARF Expressions

    DWARF Expressions are encoded with a `DW_CFA_def_cfa_expression` or
    `DW_CFA_expression` (as per aarch64 DWARF ABI). However
    grepping for either in `.eh_frame` debug information did not show any
    results (including hardcoded PLT patter heuristics) unlike in x86.
    (See #1058 for the x86 implementation).
    
    Tested on system binaries and libc in multiple distros:
    Debian, Fedora, Centos, Ubuntu
    
    Workflow:
    ```
    `docker run -it --network=host arm64v8/fedora bash`
    `docker cp 0693985d3bba:/ ./fedrepo`
    
    `sudo readelf -wf ./fedrepo/bin/* 2>/dev/null | grep
    DW_CFA_cfa_def_expression`
    `sudo readelf -wF ./centos-repo/bin/* 2>/dev/null | grep exp`
    
    ```
    Return an error for now if we come across an expression in Arm64 binaries.
    
    Signed-off-by: Sumera Priyadarsini <[email protected]>
    Sylfrena committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    764a0de View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e96fdef View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. Configuration menu
    Copy the full SHA
    54eba51 View commit details
    Browse the repository at this point in the history