Bug 155605 - prelink segfaults when reading corrupted ELF files
prelink segfaults when reading corrupted ELF files
Product: Fedora
Classification: Fedora
Component: prelink (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
: 155607 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2005-04-21 14:59 EDT by Michal Marek
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 0.3.5-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-07-25 18:31:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch avoiding the segfault (1.03 KB, patch)
2005-04-21 15:03 EDT, Michal Marek
no flags Details | Diff
file causing the segfault (2.89 KB, application/octet-stream)
2005-04-21 15:08 EDT, Michal Marek
no flags Details

  None (edit)
Description Michal Marek 2005-04-21 14:59:17 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Fedora/1.7.6-1.3.2

Description of problem:
After building a custom Python RPM, the daily prelink run segfaulted when prelinking /usr/lib/debug/usr/bin/python.debug. It's nothing critical, since the python.debug file is probably broken anyway, but prelink should print a warning message and continue instead. I wrote a quick patch which just silently ignores it, will attach that.

Version-Release number of selected component (if applicable):
prelink-0.3.3, prelink-0.3.4 from devel too

How reproducible:

Steps to Reproduce:
1. Create a corrupted ELF file (will attach one)
2. run 'prelink /path/to/file' or 'prelink -a'


Actual Results:  Segmentation fault (core dumped)

Expected Results:  "File %s is corrupted, not prelinking" or something like that.

Additional info:

Only special configuration is that debug file I'll attach, everything else is a normal FC3 install.
Comment 1 Michal Marek 2005-04-21 15:03:43 EDT
Created attachment 113483 [details]
patch avoiding the segfault

This just avoids the segfault, ideally read_dynamic() should return int
indicating success/error.
Comment 2 Michal Marek 2005-04-21 15:08:53 EDT
Created attachment 113484 [details]
file causing the segfault

Don't know why I got such a file after building my Python RPM,
it looks like an ELF, but it crashes prelink :-(

PS: Sorry for the looong line in the bugreport, didn't realize
bugzilla doesn't break lines for me.
Comment 3 Michal Marek 2005-04-21 15:22:09 EDT
*** Bug 155607 has been marked as a duplicate of this bug. ***
Comment 4 Jakub Jelinek 2005-07-25 18:31:41 EDT
Forgot to close this, it has been fixed in 0.3.5-1.

Note You need to log in before you can comment on or make changes to this bug.