Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !5466

i#5455 path-ignore-directory: Do not try to execute directories

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/derchr/i5455-path-ignore-directory into master Apr 16, 2022
  • Overview 11
  • Commits 6
  • Pipelines 0
  • Changes 2

Created by: derchr

I changed the required access mode to DRFRONT_EXEC to ciruumvent trying to execute files that aren't executable. A new check in drfront_searchenv() is introduced to determine if the path in option is in fact a directory and should not be executed.

In this implementiation we are in the akward situation of calling stat() twice (first time in drfront_access() and then in drfront_searchenv()). An alternative approach would be to add a new variant for drfront_access_mode_t called DRFRONT_ISDIR. Though ISDIR isn't really an access mode.

So what would the preferable method be?

Fixes a bug where DynamoRIO tries to execute a directory or a file that
is not marked as executable when it is present in a directory contained
in the PATH environment variable.

Fixes #5455
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/derchr/i5455-path-ignore-directory