Modify

Opened 7 years ago

Closed 7 years ago

#6847 closed defect (fixed)

sstrip bug

Reported by: castet.matthieu@… Owned by: nbd
Priority: normal Milestone:
Component: toolchain Version: Trunk
Keywords: Cc:

Description

sstrip corrupt the dynamic entry in program header (readelf -D -s doesn't work).

This is a bug when rewriting program header newsize is modified, but it should as the original http://www.muppetlabs.com/~breadbox/software/elfkickers.html one.

original
Program Headers:

Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4
INTERP 0x000114 0x08048114 0x08048114 0x00013 0x00013 R 0x1

[Requesting program interpreter: /lib/ld-linux.so.2]

LOAD 0x000000 0x08048000 0x08048000 0x13f8c 0x13f8c R E 0x1000
LOAD 0x014000 0x0805c000 0x0805c000 0x003a4 0x02b6c RW 0x1000
DYNAMIC 0x014014 0x0805c014 0x0805c014 0x000d0 0x000d0 RW 0x4
NOTE 0x000128 0x08048128 0x08048128 0x00044 0x00044 R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4

unpatched version
Program Headers:

Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4
INTERP 0x000114 0x08048114 0x08048114 0x00013 0x00013 R 0x1

[Requesting program interpreter: /lib/ld-linux.so.2]

LOAD 0x000000 0x08048000 0x08048000 0x13f8c 0x13f8c R E 0x1000
LOAD 0x014000 0x0805c000 0x0805c000 0x00385 0x02b6c RW 0x1000
DYNAMIC 0x000385 0x0805c014 0x0805c014 0x00000 0x000d0 RW 0x4
NOTE 0x000128 0x08048128 0x08048128 0x00044 0x00044 R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4

patched version
Program Headers:

Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4
INTERP 0x000114 0x08048114 0x08048114 0x00013 0x00013 R 0x1

[Requesting program interpreter: /lib/ld-linux.so.2]

LOAD 0x000000 0x08048000 0x08048000 0x13f8c 0x13f8c R E 0x1000
LOAD 0x014000 0x0805c000 0x0805c000 0x00385 0x02b6c RW 0x1000
DYNAMIC 0x014014 0x0805c014 0x0805c014 0x000d0 0x000d0 RW 0x4
NOTE 0x000128 0x08048128 0x08048128 0x00044 0x00044 R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x4

Attachments (1)

sstrip.diff (509 bytes) - added by castet.matthieu@… 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by castet.matthieu@…

comment:1 Changed 7 years ago by thepeople

  • Owner changed from developers to nbd
  • Status changed from new to assigned

comment:2 Changed 7 years ago by nbd

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in r20154, thanks

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.