{"action":"created","issue":{"url":"https://api.github.com/repos/upx/upx/issues/53","repository_url":"https://api.github.com/repos/upx/upx","labels_url":"https://api.github.com/repos/upx/upx/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/upx/upx/issues/53/comments","events_url":"https://api.github.com/repos/upx/upx/issues/53/events","html_url":"https://github.com/upx/upx/issues/53","id":200778142,"number":53,"title":"linux debain 2.6.32-5-amd64, shell script be compress to  ELF 32-bit.","user":{"login":"zsmsky","id":25113620,"avatar_url":"https://avatars.githubusercontent.com/u/25113620?v=3","gravatar_id":"","url":"https://api.github.com/users/zsmsky","html_url":"https://github.com/zsmsky","followers_url":"https://api.github.com/users/zsmsky/followers","following_url":"https://api.github.com/users/zsmsky/following{/other_user}","gists_url":"https://api.github.com/users/zsmsky/gists{/gist_id}","starred_url":"https://api.github.com/users/zsmsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsmsky/subscriptions","organizations_url":"https://api.github.com/users/zsmsky/orgs","repos_url":"https://api.github.com/users/zsmsky/repos","events_url":"https://api.github.com/users/zsmsky/events{/privacy}","received_events_url":"https://api.github.com/users/zsmsky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jreiser","id":21363917,"avatar_url":"https://avatars.githubusercontent.com/u/21363917?v=3","gravatar_id":"","url":"https://api.github.com/users/jreiser","html_url":"https://github.com/jreiser","followers_url":"https://api.github.com/users/jreiser/followers","following_url":"https://api.github.com/users/jreiser/following{/other_user}","gists_url":"https://api.github.com/users/jreiser/gists{/gist_id}","starred_url":"https://api.github.com/users/jreiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreiser/subscriptions","organizations_url":"https://api.github.com/users/jreiser/orgs","repos_url":"https://api.github.com/users/jreiser/repos","events_url":"https://api.github.com/users/jreiser/events{/privacy}","received_events_url":"https://api.github.com/users/jreiser/received_events","type":"User","site_admin":false},"assignees":[{"login":"jreiser","id":21363917,"avatar_url":"https://avatars.githubusercontent.com/u/21363917?v=3","gravatar_id":"","url":"https://api.github.com/users/jreiser","html_url":"https://github.com/jreiser","followers_url":"https://api.github.com/users/jreiser/followers","following_url":"https://api.github.com/users/jreiser/following{/other_user}","gists_url":"https://api.github.com/users/jreiser/gists{/gist_id}","starred_url":"https://api.github.com/users/jreiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreiser/subscriptions","organizations_url":"https://api.github.com/users/jreiser/orgs","repos_url":"https://api.github.com/users/jreiser/repos","events_url":"https://api.github.com/users/jreiser/events{/privacy}","received_events_url":"https://api.github.com/users/jreiser/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-01-14T03:51:24Z","updated_at":"2017-01-16T23:46:22Z","closed_at":null,"body":"how  can I do? \r\nThe following is my operation process！\r\n\r\nroot@debian:/home/upx-3.92-amd64_linux# \r\nroot@debian:/home/upx-3.92-amd64_linux# \r\nroot@debian:/home/upx-3.92-amd64_linux# uname -r\r\n2.6.32-5-amd64\r\nroot@debian:/home/upx-3.92-amd64_linux# ll\r\ntotal 568\r\n-rw-r--r-- 1 root root   1750 Dec 12 00:52 BUGS\r\n-rw-r--r-- 1 root root  18092 Dec 12 00:52 COPYING\r\n-rw-r--r-- 1 root root   5448 Dec 12 00:52 LICENSE\r\n-rw-r--r-- 1 root root  22006 Dec 12 00:52 NEWS\r\n-rw-r--r-- 1 root root   4587 Dec 12 00:52 README\r\n-rw-r--r-- 1 root root    800 Dec 12 00:52 README.1ST\r\n-rwxr-xr-x 1 root root  17078 Jan 13 16:06 test.sh\r\n-rw-r--r-- 1 root root   2198 Dec 12 00:52 THANKS\r\n-rwxr-xr-x 1 root root 354984 Dec 12 00:52 upx\r\n-rw-r--r-- 1 root root  43059 Dec 12 00:52 upx.1\r\n-rw-r--r-- 1 root root  37211 Dec 12 00:52 upx.doc\r\n-rw-r--r-- 1 root root  39111 Dec 12 00:52 upx.html\r\nroot@debian:/home/upx-3.92-amd64_linux# ./upx -o test.run test.sh\r\n                       Ultimate Packer for eXecutables\r\n                          Copyright (C) 1996 - 2016\r\nUPX 3.92        Markus Oberhumer, Laszlo Molnar & John Reiser   Dec 11th 2016\r\n\r\n        File size         Ratio      Format      Name\r\n   --------------------   ------   -----------   -----------\r\n     17078 ->      6479   37.94%  linux.sh/i386  test.run                      \r\n\r\nPacked 1 file.\r\nroot@debian:/home/upx-3.92-amd64_linux# \r\nroot@debian:/home/upx-3.92-amd64_linux# \r\nroot@debian:/home/upx-3.92-amd64_linux# ./test.run \r\nSegmentation fault\r\nroot@debian:/home/upx-3.92-amd64_linux# \r\nroot@debian:/home/upx-3.92-amd64_linux# \r\nroot@debian:/home/upx-3.92-amd64_linux# file test.run \r\ntest.run: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, corrupted section header size\r\nroot@debian:/home/upx-3.92-amd64_linux# \r\nroot@debian:/home/upx-3.92-amd64_linux# \r\n\r\nps:\r\nI make sure that the script(test.sh) is executed correctly\r\n\r\n<!---\r\n\r\nIF YOU REMOVE THIS TEMPLATE WE WILL CLOSE YOUR ISSUE WITHOUT RESPONSE.\r\nJust read it and fill in the details we're asking, it saves so much of our time. Thanks!\r\n\r\n-->\r\n\r\n## What's the problem (or question)?\r\n<!--- If describing a bug, tell us what happens instead of the expected behavior -->\r\n<!--- If suggesting a change/improvement, explain the difference from current behavior -->\r\n\r\n## What should have happened?\r\n<!--- If you're describing a bug, tell us what should happen -->\r\n<!--- If you're suggesting a change/improvement, tell us how it should work -->\r\n\r\n## Do you have an idea for a solution?\r\n<!--- Not obligatory, but suggest a fix/reason for the bug, -->\r\n<!--- or ideas how to implement the addition or change -->\r\n\r\n## How can we reproduce the issue?\r\n<!--- Provide unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant -->\r\n1.\r\n2.\r\n3.\r\n4.\r\n\r\n## Please tell us details about your environment.\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n* UPX version used (`upx --version`):\r\n* Operating System and version:\r\n* CPU architecture:\r\n"},"comment":{"url":"https://api.github.com/repos/upx/upx/issues/comments/272987073","html_url":"https://github.com/upx/upx/issues/53#issuecomment-272987073","issue_url":"https://api.github.com/repos/upx/upx/issues/53","id":272987073,"user":{"login":"jreiser","id":21363917,"avatar_url":"https://avatars.githubusercontent.com/u/21363917?v=3","gravatar_id":"","url":"https://api.github.com/users/jreiser","html_url":"https://github.com/jreiser","followers_url":"https://api.github.com/users/jreiser/followers","following_url":"https://api.github.com/users/jreiser/following{/other_user}","gists_url":"https://api.github.com/users/jreiser/gists{/gist_id}","starred_url":"https://api.github.com/users/jreiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreiser/subscriptions","organizations_url":"https://api.github.com/users/jreiser/orgs","repos_url":"https://api.github.com/users/jreiser/repos","events_url":"https://api.github.com/users/jreiser/events{/privacy}","received_events_url":"https://api.github.com/users/jreiser/received_events","type":"User","site_admin":false},"created_at":"2017-01-16T23:46:22Z","updated_at":"2017-01-16T23:46:22Z","body":"The result is a statically-linked i386-elf32 binary.  Executing that binary attempts a \"user-mode execve()\" of \"/bin/sh\" which fails on x86_64 because there is no way for user-mode code to switch from i386 to x86_64.  Actually there is a bug in the UPX stub for linux.sh/i386 because /bin/sh having .e_machine != EM_386 was not detected.\r\n\r\nI have a fix for the bug: detect that \"/bin/sh\" is non-EM_386, then do an actual execve() system call.  Integrating the fix is hung-up with the fix for #43."}}
{"actor":{"display_login":"jreiser"}}