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

Do not let modifyRPath taint shared strings in strtab. Fix #315 #481

Merged
merged 4 commits into from
Apr 23, 2023

Conversation

brenoguim
Copy link
Collaborator

@brenoguim brenoguim commented Mar 17, 2023

In this PR I add a method to iterate over all fields of the ELF file (as best as we can) that represent indexes in strtable.

I use this method to check if the RPATH string being changed in modifyRPATH is shared among multiple fields. If it's shared, don't let patchelf taint the field.

We hope that patchelf continues to taint the vast majority of rpaths (as needed by Nix) but only refrain from doing so when it will break the binary.

Note: The first commit changes the section tainting from X to Z so I can look for the Xs in my tests.

@brenoguim brenoguim changed the title Do not let modifyRPath taint shared strings in strtab Do not let modifyRPath taint shared strings in strtab. Fix #315 Mar 17, 2023
@Mic92
Copy link
Member

Mic92 commented Apr 23, 2023

bors merge

@bors bors bot merged commit 6e7b82e into NixOS:master Apr 23, 2023
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.

None yet

2 participants