Skip to content
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

UPX (Linux amd64) doesn't run in WSL #3846

Closed
kumarharsh opened this issue Feb 13, 2019 · 6 comments
Closed

UPX (Linux amd64) doesn't run in WSL #3846

kumarharsh opened this issue Feb 13, 2019 · 6 comments
Labels

Comments

@kumarharsh
Copy link

kumarharsh commented Feb 13, 2019

  • Your Windows build number: Version 10.0.17763.253

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)

> wget https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz
> tar -xf upx-3.95-amd64_linux.tar.xz
> mv upx-3.95-amd64_linux upx64
> ./upx64/upx
  • What's wrong / what should be happening instead:
    UPX doesn't run.
Failed to execute process './upx64/upx'. Reason:
exec: Exec format error
The file './upx64/upx' is marked as an executable but could not be run by the operating system.

> readelf -h ./upx64/upx
ELF Header:
  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF64
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Advanced Micro Devices X86-64
...


> objdump -x -f -h -p ./upx64/upx | clip.exe

./upx64/upx:     file format elf64-x86-64
./upx64/upx
architecture: i386:x86-64, flags 0x00000102:
EXEC_P, D_PAGED
start address 0x0000000000465d10

Program Header:
    LOAD off    0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21
         filesz 0x0000000000066f5e memsz 0x0000000000066f5e flags r-x
    LOAD off    0x0000000000000000 vaddr 0x0000000000467000 paddr 0x0000000000467000 align 2**12
         filesz 0x0000000000000000 memsz 0x000000000038af30 flags rw-
   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**4
         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-

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

I see that #330 was closed some releases ago, but I'm still facing this issue.

@craigloewen-msft
Copy link
Member

I was able to reproduce this issue on Windows 10 Version 18837.

@kspalaiologos
Copy link

Flat Assembler doesn't work too (installed using sudo apt-get install fasm).
obraz

@sein-tao
Copy link

this problem can also be reproduced on Windows 10 1903/version 18362, with wsl Ubuntu 18.04 LTS.

@moralrebuild
Copy link

Hit the same issue today on Windows 10 WSL Debian.

@casept
Copy link

casept commented Aug 23, 2019

Also facing this issue. Seems like it affects all binaries compressed with UPX, not just UPX itself.

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants