8000 Comparing serge1:main...keddad:main · serge1/ELFIO · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: serge1/ELFIO
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: keddad/ELFIO
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Mar 29, 2025

  1. Fix use-after-free when non-lazily processing corrupted sections

    Right now, return value of sec->load() is not checked on initial ELF load. However, if the stream is corrupt, it's load_data() call can fail, meaning that is_loaded flag will be left false. Despite that, problematic section will be left in the file.
    
    When reading sections after all (like in elfdump example), user might call get_data() on the section, which will in turn try to load_data() again. However, if the file was loaded non-lazily, the stream set in sec->load() will be freed by this point, thus causing a problem.
    
    Initially I wanted to just discard corrupted sections, however, since there are test cases for corrupted elf processing, I opted to add a can_be_loaded field to section object. If load_data failed, it is set to false, thus preventing any broken reads from occuring.
    keddad committed Mar 29, 2025
    5994
    Configuration menu
    Copy the full SHA
    a6a81e3 View commit details
    Browse the repository at this point in the history
Loading
0