Skip to content

fix: list dependencies by invoking the interpreter on a binary#4

Merged
creslinux merged 5 commits intocreslinux:mainfrom
lavafroth:safe-ldd
Apr 30, 2025
Merged

fix: list dependencies by invoking the interpreter on a binary#4
creslinux merged 5 commits intocreslinux:mainfrom
lavafroth:safe-ldd

Conversation

@lavafroth
Copy link
Copy Markdown
Contributor

Fixes #3

Changes

  • Creates a new module called ldd
  • Parses the target binary's ELF headers
  • Extracts the interpreter from the .interp section
  • Calls the interpreter on the binary with the --list flag to query shared object dependencies
  • Recursively parses the entire dependency tree

@lavafroth lavafroth marked this pull request as ready for review April 30, 2025 04:17
Copy link
Copy Markdown
Owner

@creslinux creslinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great - its definitely better then using the systems linker, thank you. If can remove the now defunct fn in exec we can merge

I'll update the docu/site this week to reflect the change to the helper.

Copy link
Copy Markdown
Owner

@creslinux creslinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you for the change

@creslinux creslinux merged commit f42d69f into creslinux:main Apr 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ldd potentially runs a binary outside the sandbox

2 participants