New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run binaries compressed with UPX #330

Closed
nomisbeme opened this Issue May 7, 2016 · 17 comments

Comments

Projects
None yet
@nomisbeme

nomisbeme commented May 7, 2016

Build 14332:

apt install upx-ucl
upx-ucl -8 /bin/ls -o ./lscompressed
./lscompressed
bash: ./lscompressed: cannot execute binary file: Exec format error

The call to execve fails, output from strace attached.
screen shot 2016-05-06 at 5 59 38 pm

@Artoria2e5

This comment has been minimized.

Artoria2e5 commented May 8, 2016

// typo in title: s=UPC=UPX=g

This is what upx'ed programs look like in objdump:

objdump -x -f -h -p ./bash

./bash:     file format elf64-x86-64
./bash
architecture: i386:x86-64, flags 0x00000102:
EXEC_P, D_PAGED
start address 0x0000000000471eb0

Program Header:
    LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21
         filesz 0x00000000000726c4 memsz 0x00000000000726c4 flags r-x
    LOAD off    0x0000000000102878 vaddr 0x0000000000702878 paddr 0x0000000000702878 align 2**21
         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-

Sections:
Idx Name          Size      VMA               LMA               File off  Algn
SYMBOL TABLE:
no symbols

@nomisbeme nomisbeme changed the title from Can't run binaries compressed with UCX to Can't run binaries compressed with UPX May 9, 2016

@benhillis benhillis added the feature label May 27, 2016

@skochinsky

This comment has been minimized.

skochinsky commented Jul 25, 2017

why is this labeled "feature" and not "bug"? UPXed files are proper (if a little unusual) ELFs, they should at least start without issues. There are no errors in the file format.

@skochinsky

This comment has been minimized.

skochinsky commented Sep 18, 2017

@benhillis @ionescu007 (sorry Alex :)
Can someone confirm if this is caused by the absence of NT_GNU_ABI_TAG note (hinted by #2121)? And please retag it as a bug, not feature. Such files run fine on regular Linux.

@benhillis benhillis added fixinbound and removed feature labels Sep 19, 2017

@benhillis

This comment has been minimized.

Member

benhillis commented Sep 19, 2017

A fix for this issue has been checked in and will be available in a Windows Insider build soon.

@skochinsky - The bug versus feature tags are somewhat arbitrary, don't get too caught up on them.

@ionescu007

This comment has been minimized.

ionescu007 commented Sep 19, 2017

Great @benhillis, now you're training people that by CC'ing me, bugs get fixed instantly.

@nomisbeme

This comment has been minimized.

nomisbeme commented Oct 17, 2017

I can confirm that this was fixed in Build 17017. Is there a definitive source to check when the fix landed before that? I'm curious if it made the Creators Update.

@Herst

This comment has been minimized.

@nomisbeme

This comment has been minimized.

nomisbeme commented Oct 19, 2017

Thanks for the response Herst. I really appreciate the link to the detailed release notes.

adisbladis added a commit to trustedkey/tk-ssh-agent that referenced this issue Oct 25, 2017

Skip upx compression
This does not currently work on WSL Microsoft/WSL#330
@sunilmut

This comment has been minimized.

Member

sunilmut commented Oct 30, 2017

This should be fixed in the Insider build 17017.

@essbedev

This comment has been minimized.

essbedev commented Jan 31, 2018

I had issues installing PVRTexToolCLI on previous builds and it's actually been resolved from Insider build 17017. I still get the same error when I try to install the FBX SDK . I can't figure out if it's the same problem though.

@benhillis

This comment has been minimized.

Member

benhillis commented Jan 31, 2018

@essbedev - Might be hitting the same issue as #1884. The fix for that should be available soon.

@essbedev

This comment has been minimized.

essbedev commented Jan 31, 2018

@benhillis amazing ! thanks for the quick answer

@benhillis

This comment has been minimized.

Member

benhillis commented Jan 31, 2018

@essbedev - Downloaded the binary you attached and unfortunately it's not the same thing. Your binary is 32 bit which is not currently supported by WSL (#2468).

root@BENHILL-VM2:~# readelf -h fbx20151_fbxsdk_linux
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x80480f0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          466356 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         4
  Size of section headers:           40 (bytes)
  Number of section headers:         23
  Section header string table index: 20
@sayangel

This comment has been minimized.

sayangel commented Feb 25, 2018

Was also just trying to set up the FBX SDK on WSL and hit this issue. @essbedev were you able to figure out an alternative?

@therealkenc

This comment has been minimized.

Collaborator

therealkenc commented Feb 25, 2018

@sayangel Try 17093 or better per #1884. If your scenario still fails it would be worthy of a new ticket following CONTRIBUTING.md.

@essbedev

This comment has been minimized.

essbedev commented Feb 25, 2018

@sayangel, I created a topic on the Autodesk FBX forum but never got an answer... https://forums.autodesk.com/t5/fbx-forum/compatibility-with-wsl-x64/m-p/7739197/highlight/true#M9178

@therealkenc

This comment has been minimized.

Collaborator

therealkenc commented Feb 26, 2018

Ahh understood; if they only provide 32-bit binaries that's #2468 which is unrelated to "this issue" (which is about UPX). There is no work-around unfortunately (unless you work at Autodesk). There's a User Voice here for what it's worth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment