John Reiser
f9f28ff176
More work on "upx -d" de-compression
...
https://github.com/upx/upx/issues/629
https://github.com/upx/upx/issues/635
modified: p_elf_enum.h
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_unix.cpp
2022-12-19 13:49:43 -08:00
Markus F.X.J. Oberhumer
ce21254ed2
all: misc cleanups
2022-11-06 08:35:00 +01:00
Markus F.X.J. Oberhumer
d001a63bce
Welcome 2022.
2022-09-04 04:24:39 +02:00
John Reiser
e7ca5c54ff
Fix --brute for p_lx_elf.cpp, which compresses multiple pieces
...
Force all pieces to use the same de-compressor.
(Future: allow each PT_LOAD to choose its own.)
Has minor wobbles due to page alignment, and size of de-compressor.
64-bit only for now.
https://github.com/upx/upx/issues/570
https://github.com/upx/upx/issues/297
modified: p_lx_elf.cpp
modified: p_unix.cpp
modified: packer.cpp
modified: packer.h
2022-03-22 11:46:25 -07:00
John Reiser
076aaf829a
WIP: Elf64 shlib compress+decompress seems to work
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_unix.cpp
2021-07-05 13:47:19 -07:00
John Reiser
d5263a56ce
WIP: handling shared library
...
modified: p_lx_elf.cpp
modified: p_unix.cpp
modified: p_unix.h
2021-05-22 16:03:53 -07:00
John Reiser
35555bfb8a
WIP: PackLinuxElf64::unpack working for shared libraries (non-Android)
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_unix.cpp
2021-03-05 16:20:36 -08:00
John Reiser
fb844a8ed1
total_in, total_out move to PackUnix
...
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_lx_interp.cpp
modified: p_mach.cpp
modified: p_unix.cpp
modified: p_unix.h
2021-02-22 16:13:40 -08:00
John Reiser
23f63e4196
WIP unpacking ELF shared library
...
modified: Makefile
modified: lzma-sdk
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_mach.cpp
modified: p_unix.cpp
modified: p_unix.h
modified: packer.cpp
modified: packer.h
modified: stub/arm64-linux.elf-fold.h
modified: stub/src/arm64-linux.elf-fold.S
modified: stub/tmp/arm64-linux.elf-fold.map
2021-01-15 14:11:09 -08:00
Markus F.X.J. Oberhumer
9131d5216f
Welcome 2021.
2021-01-01 20:39:22 +01:00
Markus F.X.J. Oberhumer
f7e2266c3f
Start using some C++ 14 features.
2020-12-08 05:40:17 +01:00
John Reiser
972b670a64
Set .b_extra for hdr, especially for Mach-o for 'go'.
...
https://github.com/upx/upx/issues/222
modified: p_unix.cpp
2020-06-06 17:11:32 -07:00
John Reiser
4ae1576726
Mach-o LC_SEGMENTs not monotonic in file (__DWARF for 'go')
...
https://github.com/upx/upx/issues/222 go-1.14 (but not go-1.14.3 ?)
modified: ../p_mach.cpp
modified: ../p_mach.h
modified: ../p_unix.cpp
modified: ../p_unix.h
modified: ../stub/src/amd64-darwin.macho-main.c
modified: ../stub/amd64-darwin.macho-fold.h
modified: ../stub/arm.v5a-darwin.macho-fold.h
modified: ../stub/arm64-darwin.macho-fold.h
modified: ../stub/tmp/amd64-darwin.macho-fold.map
modified: ../stub/tmp/arm.v5a-darwin.macho-fold.map
modified: ../stub/tmp/arm64-darwin.macho-fold.map
2020-05-30 02:54:09 -07:00
Markus F.X.J. Oberhumer
ded07f8781
Revert "MSVC lacks S_IXUSR"
...
This reverts commit 62a07df45e
.
2020-01-08 05:38:44 +01:00
Markus F.X.J. Oberhumer
849bdd87e1
Revert "Option --assume-execute-permission"
...
This reverts commit 4484acf9d6
.
2020-01-08 05:38:19 +01:00
Markus F.X.J. Oberhumer
d1174385ef
Welcome 2020.
2020-01-08 04:13:28 +01:00
John Reiser
62a07df45e
MSVC lacks S_IXUSR
...
modified: p_unix.cpp
2019-07-14 13:38:51 -07:00
John Reiser
4484acf9d6
Option --assume-execute-permission
...
modified: main.cpp
modified: options.h
modified: p_unix.cpp
https://github.com/upx/upx/issues/256
2019-03-31 10:25:06 -07:00
John Reiser
a9c08c6f52
__MSYS2__ acts like UNIX but cannot handle --x permission
...
https://github.com/upx/upx/issues/256
modified: p_unix.cpp
2019-03-01 16:46:49 -08:00
Markus F.X.J. Oberhumer
3667fa4e44
Welcome 2019.
2019-02-15 11:04:09 +01:00
Markus F.X.J. Oberhumer
021c8db58a
Welcome 2018.
2018-01-19 10:55:32 +01:00
John Reiser
9e8de4abe5
i386: new stub strategy to avoid problems with early mmap layout
...
The stub occupies the same region that execve() would create
for the original progam. The stub copies everything to a new area,
erases the original region, replaces it with the de-compressed
program, and erases the copy of itself via the escape hatch.
The copy is inexpensive via mmap() of /proc/self/exe.
modified: stub/src/i386-linux.elf-entry.S
modified: stub/src/i386-linux.elf-fold.S
modified: stub/src/i386-linux.elf-main.c
modified: p_lx_elf.cpp
modified: p_lx_elf.h
modified: p_lx_interp.cpp
modified: p_lx_interp.h
modified: p_lx_sh.cpp
modified: p_lx_sh.h
modified: p_mach.cpp
modified: p_mach.h
modified: p_unix.cpp
modified: p_unix.h
modified: p_vmlinx.cpp
plus .h, .map, .dump
2017-10-01 15:56:34 -07:00
John Reiser
d8f47e248a
Handle old style 8-byte headers for version <= 11
...
https://github.com/upx/upx/issues/102
modified: p_unix.cpp
2017-05-26 13:05:12 -07:00
John Reiser
8232aedf78
unpackExtent() segregates rewrite() from write()
...
Fix the reported output file size when un-compressing.
Part of https://github.com/upx/upx/issues/60
modified: p_lx_elf.cpp
modified: p_unix.cpp
modified: p_unix.h
2017-02-11 15:26:27 -08:00
John Reiser
90fc018295
Avoid sigsegv after "patchelf --set-rpath"
...
https://github.com/upx/upx/issues/47
Enhancement not yet implemented: non-adjacent ElfXX_Ehdr and ElfXX_Phdr.
modified: p_unix.cpp
2017-01-29 14:01:56 +01:00
Markus F.X.J. Oberhumer
c4da5e81fa
Welcome 2017.
2017-01-03 12:02:07 +01:00
Markus F.X.J. Oberhumer
ed900b0476
More thorough use of O_BINARY.
2016-10-07 15:04:12 +02:00
Markus F.X.J. Oberhumer
f7554374ab
Update email address.
2016-09-28 12:25:01 +02:00
Markus F.X.J. Oberhumer
83828aa8a3
Update vim modelines.
2016-09-22 17:29:43 +02:00
Markus F.X.J. Oberhumer
96d9968db5
Welcome 2016.
2016-09-22 14:07:14 +02:00
Markus F.X.J. Oberhumer
b3121e4534
Use upx_uint16_t instead of unsigned short.
2016-09-21 17:40:11 +02:00
Markus F.X.J. Oberhumer
1bb0fa1809
Fix a few things spotted by the gcc-6 sanitizer. Needs review.
2016-09-21 00:35:51 +02:00
John Reiser
2238c99b61
another check on b_info in ::unpackExtent()
2015-05-16 15:18:28 -07:00
John Reiser
a8a3caed1c
Check blocksize
2015-05-09 20:29:56 -07:00
John Reiser
83ce7dc62f
Must not compare orig_file_size with fi->st_size() during ::unpack
2015-05-09 17:47:17 -07:00
John Reiser
2a79a69f59
PackUnix::unpack() is non-Elf. CERT-FI 829767
...
id:000057,sig:11,sync:upx-macho-crash-2,src:000108
id:000058,sig:11,sync:upx-macho-crash-2,src:000107
id:000059,sig:06,sync:upx-macho-crash-2,src:000106
id:000060,sig:06,sync:upx-macho-crash-2,src:000103
2015-05-09 05:14:12 -07:00
Markus F.X.J. Oberhumer
fb611a98f9
Welcome 2015.
2015-01-03 00:24:07 +01:00
Markus F.X.J. Oberhumer
a26c982e93
Welcome 2014.
2014-01-07 23:05:10 +01:00
Markus F.X.J. Oberhumer
36dd35f238
Silence some compilation warnings.
2013-02-18 11:01:30 +01:00
Markus F.X.J. Oberhumer
87a368a857
Welcome 2013.
2013-02-12 10:14:03 +01:00
John Reiser
89830a5ae0
Mac OS X codesign disallows overhang of vmsize.
2013-01-25 15:58:25 -08:00
John Reiser
1579182ed9
PackUnix::canUnpack() allows zero-filled last page
2012-08-03 13:19:28 -07:00
John Reiser
8a5d352733
Portability: fix "EOFException: premature end of file" doing ELF on Windows.
...
OutputFile::read() was bad news; fsync() should work, but was missing.
2012-07-12 14:25:28 -07:00
John Reiser
f383629282
compressWithFilters(..., inhibit_compression_check=0) // SourceForge bug 3541020
...
Not good to check compression ratio on every block when blocksize < file_size,
as when --force_execve of Elf > 0x80000 bytes.
2012-07-12 07:04:56 -07:00
Markus F.X.J. Oberhumer
43ce34d547
Welcome 2012.
2012-01-01 22:35:11 +01:00
John Reiser
54618064a1
l_info.l_lsize and .l_checksum are TargetEndian
2011-03-28 10:14:06 -07:00
Markus F.X.J. Oberhumer
9bf2b79d9e
Enter 2011.
2011-01-03 08:49:23 +01:00
Markus F.X.J. Oberhumer
6bc3197721
Enter 2010.
2010-02-06 17:15:49 +01:00
John Reiser
405abc4e95
::packExtent updates ph.u_adler to satisfy verifyOverlappingDecompression()
...
even when 0==hdr_u_len
2009-10-14 17:47:02 -07:00
Markus F.X.J. Oberhumer
5ed689ceb0
Enter 2009.
2008-12-31 17:07:18 +01:00