Timo Juhani Lindfors wrote:
> Hi,
> 
> On Wed, Jul 26, 2006 at 01:42:46AM +0100, Thiemo Seufer wrote:
> > Can an i386 elfsh load any big endian binary successfully?
> 
> I copied /bin/ls from a sparc computer to a i386 system and elfsh
> seems to segfault for that too:
> 
> [EMAIL PROTECTED] file ls
> ls: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), dynamically linked 
> (uses shared libs), stripped
> 
> [EMAIL PROTECTED]:~$ elfsh
> 
> 
>          Welcome to The ELF shell 0.51b3 .::.
> 
>          .::. This software is under the General Public License
>          .::. Please visit http://www.gnu.org to know about Free Software
> 
> 
> [ELFsh-0.51b3]$ load ls
> 
> Segmentation fault

Same for elfsh/powerpc loading a /bin/ls from i386. So I guess there
are two bugs in elfsh:
  - The endianness swapping of the ELF header goes wrong.
  - The resulting offsets aren't checked for plausibility, IOW, some
    randomly broken ELF binary can crash it.


Thiemo


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to