Skip to content

isExecutable check for PHDR placement adjustment isn't reliable #165

Open

Description

@rcombs

See

if (isExecutable) {

This check is insufficient, as it only handles cases where the file has a PT_INTERP header, which means it won't run on static executables. Most static executables don't need to read AT_PHDR, but some do; e.g. static PIE executables.

This could alternately be handled by enforcing that PHDRs are always in the first page, which would also fix #153.

Activity

  1. rcombs commented on Mar 27, 2019

    @rcombs
    Author

    Actually, it looks like the #153 is already fixed in 63d0db9, so the impact of removing the isExecutable check altogether should be fairly minor at this point (barring other issues like #164).

  2. rcombs commented on Mar 30, 2019

    @rcombs
    Author

    The issue persists in master. I'll be sending a PR with a few relevant changes shortly.

  3. added a commit that references this issue on Mar 30, 2019
    7dc867a
  4. ararslan commented on Aug 9, 2019

    @ararslan

    Actually, it looks like the #153 is already fixed in 63d0db9

    Is it? I opened #153 a year after that commit. 🤔

  5. domenkozar commented on Jun 9, 2020

    @domenkozar
    Member

    The PR is at #166 but it would be great if someone can reproduce this on master (and ideally attach a binary to this issue and describe how to reproduce).

  6. added a commit that references this issue on Jun 16, 2020
    c3ffe62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions