Bug 72705
| Summary: | Segfault from prelink | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Owen Taylor <otaylor> | ||||
| Component: | prelink | Assignee: | Jakub Jelinek <jakub> | ||||
| Status: | CLOSED RAWHIDE | QA Contact: | |||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 8.0 | CC: | drepper | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | i386 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2003-08-29 20:31:42 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Owen Taylor
2002-08-26 19:26:07 UTC
Created attachment 73164 [details]
gnome-terminal binary reproducing the problem
The binary is in fact broken, sh_link member of .gnu.liblist Shdr has completely bogus value. Not segfaulting on it will be trivial, will try to look where it might come from too. --- exec.c~ 2002-08-27 16:35:51.000000000 +0200
+++ exec.c 2002-08-27 16:35:51.000000000 +0200
@@ -793,7 +793,7 @@ prelink_exec (struct prelink_info *info)
Elf_Data *data;
dso->shdr[i].sh_link
- = new_dynstr ? new[new_dynstr] : move->old_to_new[dynstrndx];
+ = new_dynstr != -1 ? new[new_dynstr] : move->old_to_new[dynstrndx];
data = elf_getdata (dso->scn[i], NULL);
data->d_type = ELF_T_WORD;
data->d_size = (ndeps - 1) * sizeof (Elf32_Lib);
seems like the candidate why sh_link was garbage (new[-1]).
I've added checks so that prelink -u wouldn't segfault on bogus sh_link or
sh_info fields too.
Will be soon in prelink-0.2.0-8.
Assuming fixed in current versions. |