-
-
Notifications
You must be signed in to change notification settings - Fork 494
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
PT_NOTE logic in normalizeNoteSegments
causes .dynstr
not to be contained fully in a segment
#403
Labels
Comments
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 10, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 10, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 10, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 10, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 10, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 12, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 13, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 13, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 13, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 13, 2022
Bo98
added a commit
to Bo98/patchelf
that referenced
this issue
Oct 13, 2022
rcoup
added a commit
to koordinates/vcpkg
that referenced
this issue
Apr 15, 2023
Fixes occasional lib corruption: NixOS/patchelf#403
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When the
.dynstr
section is expanded due to a longer rpath, and the binary has aPT_NOTE
segment, the program headers get updated in a way that's causing the.dynstr
section to overlap twoPT_LOAD
segments.I'm not sure what the implications are, but on a particular filesystem I've been using patchelf on, binaries are broken (mmap/mprotect errors in the dynamic loader or even segfaults). The above issue stands out.
gdb
warns about this:Steps To Reproduce
Run patchelf on itself:
Notice:
-no-pie
and-fno-pic
is required for me to trigger it.Full details, see the binaries here https://github.com/NixOS/patchelf/files/9633732/bin.tar.gz.
Notice that the
.dynstr
section is not listed in the bottom "Section to Segment mapping"Before:
After:
The text was updated successfully, but these errors were encountered: