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

Don't skip over symbol at start of file in _populate_symbols #2451

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from

Commits on Aug 28, 2024

  1. Don't skip over symbol at start of file in _populate_symbols

    Lets say we have an ELF with the following symbols
    
    ```
    Symbol table '.symtab' contains 5 entries:
       Num:    Value          Size Type    Bind   Vis      Ndx Name
         0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
         1: 0000000000000035     0 NOTYPE  LOCAL  DEFAULT    2 aaaa
         2: 0000000000000022     0 NOTYPE  LOCAL  DEFAULT    2 bbbb
         3: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    2 cccc
         4: 0000000000000054     0 NOTYPE  GLOBAL DEFAULT    2 dddd
    ```
    
    Then pwnlib's ELF(binary).symbols will be `{'aaaa': 53, 'bbbb': 34, 'dddd': 84}`.
    This is missing the symbol `cccc`, because its value is 0.
    
    This change checks the name instead of the value, because the value can
    be 0 if the symbol points to the beginning.
    
    The new and correct value of pwnlib's ELF(binary).symbols will be
    `{'aaaa': 53, 'cccc': 0, 'bbbb': 34, 'dddd': 84}`.
    ThijsRay committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    0829371 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

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