Bug 187618 - elf_update generates corrupt objects
elf_update generates corrupt objects
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: elfutils (Show other bugs)
5
All Linux
medium Severity high
: ---
: ---
Assigned To: Roland McGrath
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-01 17:53 EST by Nicholas Miell
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.121-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-15 19:54:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
simple test usage of elf_update which damages the object file. (1.17 KB, text/x-csrc)
2006-04-01 17:53 EST, Nicholas Miell
no flags Details
eu-readelf -a output from a victim object file, before being run through the test program (6.52 KB, text/plain)
2006-04-01 17:54 EST, Nicholas Miell
no flags Details
eu-readelf -a output from the victim object file, after being run through the test program (6.27 KB, text/plain)
2006-04-01 17:57 EST, Nicholas Miell
no flags Details
eu-readelf -a output from the victim object file, before being run through the test program with elfutils 0.120 (6.75 KB, text/plain)
2006-04-07 18:33 EDT, Nicholas Miell
no flags Details
eu-readelf -a output from the victim object file, after being run through the test program with elfutils 0.120 (6.43 KB, text/plain)
2006-04-07 18:37 EDT, Nicholas Miell
no flags Details

  None (edit)
Description Nicholas Miell 2006-04-01 17:53:51 EST
The attached simple test case damages the target object file. AFAIK, it should
make no changes whatsoever. All the documentation I've found (for either the SCO
version or the Sun version) suggest that this is a perfectly valid use of
elf_flagdata() and elf_update().

This is elfutils-0.119-1.2.1.
Comment 1 Nicholas Miell 2006-04-01 17:53:51 EST
Created attachment 127186 [details]
simple test usage of elf_update which damages the object file.
Comment 2 Nicholas Miell 2006-04-01 17:54:55 EST
Created attachment 127187 [details]
eu-readelf -a output from a victim object file, before being run through the test program
Comment 3 Nicholas Miell 2006-04-01 17:57:27 EST
Created attachment 127188 [details]
eu-readelf -a output from the victim object file, after being run through the test program
Comment 4 Roland McGrath 2006-04-07 02:16:03 EDT
This is fixed in version 0.120 now in rawhide.
Comment 5 Nicholas Miell 2006-04-07 18:33:33 EDT
Created attachment 127487 [details]
eu-readelf -a output from the victim object file, before being run through the test program with elfutils 0.120

I'm including this again because I lost the original test object.
Comment 6 Nicholas Miell 2006-04-07 18:37:51 EDT
Created attachment 127488 [details]
eu-readelf -a output from the victim object file, after being run through the test program with elfutils 0.120

Looking at a comparison of the before & after, it appears that the contents of
.shstrtab is getting lost.

(There's also differences in object layout, but I think that's purely a "libelf
does things differently than libbfd" issue.)
Comment 7 Ulrich Drepper 2006-05-28 03:44:15 EDT
The development version of the code has no such problem anymore.  The package
maintainer will make a new release sometime soon but it'll be at least a week, I
guess.
Comment 8 Roland McGrath 2006-06-15 05:00:10 EDT
We think this is fixed in 0.121, which will appear in rawhide as soon as it
percolates through, and can already be found at
ftp://sources.redhat.com/pub/systemtap/elfutils/ to try it out now.
Please verify that your bug no longer occurs.
Comment 9 Nicholas Miell 2006-06-15 19:05:03 EDT
It's fixed. Thanks.

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