1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00
Commit Graph

4047 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer
d14fa5f8a4 all: prepare for release 2023-11-01 12:00:03 +01:00
Markus F.X.J. Oberhumer
79263a52ac submodules: update for new versions 2023-11-01 11:40:28 +01:00
Markus F.X.J. Oberhumer
ecb3f83e83 CI updates 2023-11-01 11:28:35 +01:00
Markus F.X.J. Oberhumer
f6aedb35ce CI updates 2023-11-01 10:06:27 +01:00
Markus F.X.J. Oberhumer
3b7d25ac49 CI updates 2023-11-01 08:48:27 +01:00
Markus F.X.J. Oberhumer
e964d4acf3 src/util: change TriBool logic to use a bool template parameter 2023-10-31 12:24:44 +01:00
Markus F.X.J. Oberhumer
e306085b81 CI updates 2023-10-31 11:49:18 +01:00
Markus F.X.J. Oberhumer
b094ad4f2b CI updates 2023-10-31 10:34:55 +01:00
Markus F.X.J. Oberhumer
19c6b969ab src/options: fix bad TriBool ThirdValue for pefile compress_resources 2023-10-30 21:36:36 +01:00
Markus F.X.J. Oberhumer
acfda848cd src/check: add some more tribool checks 2023-10-30 20:29:05 +01:00
John Reiser
52400e2561 /proc/self/exe now is optional
... for the benefit of 'unshare', 'chroot', etc.
If not present, then upx run-time stub unmaps all pages of original main program.
https://github.com/upx/upx/issues/721

	modified:   stub/src/amd64-linux.elf-entry.S
	modified:   stub/src/amd64-linux.elf-fold.S
	modified:   stub/src/arm.v4a-linux.elf-entry.S
	modified:   stub/src/arm.v4a-linux.elf-fold.S
	modified:   stub/src/arm64-linux.elf-entry.S
	modified:   stub/src/arm64-linux.elf-fold.S
	modified:   stub/src/i386-linux.elf-fold.S
	modified:   stub/src/mipsel.r3000-linux.elf-fold.S
	modified:   stub/src/powerpc-linux.elf-fold.S
	modified:   stub/src/powerpc64le-linux.elf-fold.S
	modified:   ../misc/testsuite/upx_testsuite_1-expected_sha256sums.sh

           ... plus all associaed *.h, *.map, *.dump in stub/
2023-10-30 08:23:52 -07:00
Markus F.X.J. Oberhumer
f62576a2be CI updates and minor cleanups 2023-10-30 14:15:35 +01:00
Markus F.X.J. Oberhumer
19bf9f59e9 src: clang-format stub/tools/armpe/armpe_tester.c 2023-10-30 13:07:20 +01:00
Markus F.X.J. Oberhumer
fadf7cfc7b src: work on packed_struct cleanup 2023-10-30 12:55:07 +01:00
Markus F.X.J. Oberhumer
ec0c9399fa src: clang-format conf.h 2023-10-30 12:30:58 +01:00
Markus F.X.J. Oberhumer
37b923245d all: various cleanups 2023-10-30 12:17:51 +01:00
Markus F.X.J. Oberhumer
38a676f6f7 src: introduce upx::ptr_reinterpret_cast 2023-10-29 16:52:24 +01:00
Markus F.X.J. Oberhumer
cd1df6f6b1 all: update version 2023-10-29 15:37:13 +01:00
Markus F.X.J. Oberhumer
4a24fe8c53 CI updates and cleanups 2023-10-29 15:12:33 +01:00
Markus F.X.J. Oberhumer
6dac3dd248 CI updates 2023-10-27 09:24:06 +02:00
Markus F.X.J. Oberhumer
37d393cbc8 src: prefer using SetFileTime() on Windows 2023-10-27 06:58:14 +02:00
Markus F.X.J. Oberhumer
27f155374a testsuite: update checksums caused by version bump 2023-10-26 12:28:52 +02:00
Markus F.X.J. Oberhumer
8102137ad7 all: post-release version bump 2023-10-26 12:25:13 +02:00
Markus F.X.J. Oberhumer
9c46f4653f all: prepare for release 2023-10-26 11:09:48 +02:00
Markus F.X.J. Oberhumer
29b4752d0e src: add some noexcept 2023-10-26 00:28:36 +02:00
Markus F.X.J. Oberhumer
2724039c09 submodules: update for new versions 2023-10-26 00:23:57 +02:00
Markus F.X.J. Oberhumer
6ae4e88475 cmake: fix Xcode generator build 2023-10-25 06:47:09 +02:00
Markus F.X.J. Oberhumer
facabd68d7 all: more minor cleanups 2023-10-24 23:56:55 +02:00
Markus F.X.J. Oberhumer
18f043015e all: minor cleanups 2023-10-24 22:54:54 +02:00
Markus F.X.J. Oberhumer
ab259a1af9 src/pefile: try to clean up reloc handling 2023-10-24 11:47:23 +02:00
Markus F.X.J. Oberhumer
1dd96a7628 src/pefile: stricter reloc checks; cleanups 2023-10-23 14:26:37 +02:00
Markus F.X.J. Oberhumer
1ee7ecb1f0 all: prefer using utimensat() 2023-10-22 13:29:26 +02:00
Markus F.X.J. Oberhumer
67548a4d9a src: minor cleanups 2023-10-22 00:45:06 +02:00
Markus F.X.J. Oberhumer
9fbe95ad48 all: cleanups 2023-10-21 11:22:18 +02:00
dependabot[bot]
91c15b2475
build(deps): bump crate-ci/typos from 1.16.19 to 1.16.20
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.16.19 to 1.16.20.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](35a8bc6787...c004e98018)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 16:00:48 +00:00
Markus F.X.J. Oberhumer
c9550b48d8 all: disable packing macOS binaries for now 2023-10-18 07:04:00 +02:00
Markus F.X.J. Oberhumer
a1d090a6fd src/stub: add a "clang-format off" directive 2023-10-15 10:55:15 +02:00
Markus F.X.J. Oberhumer
4870765e1b all: disable packing macOS binaries for now 2023-10-15 10:15:46 +02:00
Markus F.X.J. Oberhumer
d8be2ed276 src/pefile.cpp: cleanup reloc handling and add more checks 2023-10-14 19:24:44 +02:00
Markus F.X.J. Oberhumer
2b371e99bd src/util: minor xspan enhancements 2023-10-14 05:58:47 +02:00
Markus F.X.J. Oberhumer
005e39871b CI updates 2023-10-13 00:49:01 +02:00
Markus F.X.J. Oberhumer
96dd9eeb44 CI updates 2023-10-13 00:01:00 +02:00
John Reiser
65b06f6046 More LZMA inSize (srclen) defense
https://github.com/upx/upx/issues/717

	modified:   stub/src/amd64-darwin.dylib-entry.S  fixed
	modified:   stub/src/amd64-darwin.macho-entry.S  fixed
	modified:   stub/src/amd64-linux.elf-so_entry.S  comment-only
	modified:   stub/src/i386-linux.elf-so_entry.S  comment-only

	modified:   stub/amd64-darwin.dylib-entry.h
	modified:   stub/amd64-darwin.macho-entry.h
	modified:   stub/amd64-linux.elf-so_entry.h
	modified:   stub/tmp/amd64-darwin.dylib-entry.bin.dump
	modified:   stub/tmp/amd64-darwin.macho-entry.bin.dump
	modified:   stub/tmp/amd64-linux.elf-so_entry.bin.dump

Find+fix steps that were performed:
1. Find all 'add' instructions that compute "eof".
NRV run-time decompressors ignore srclen, so 'add' can be ignored for them.

$ cd upx-devel4/src/stub
$ grep -sr 'add.*eof' src  |  grep -v 'nrv2._d.*.S'  |  sort
src/amd64-darwin.dylib-entry.S:        addq src,lsrc; push lsrc  // &input_eof
src/amd64-darwin.macho-entry.S:        addq src,lsrc; push lsrc  // &input_eof
src/amd64-linux.elf-entry.S:        addq src,lsrc; push lsrc  // &input_eof
src/amd64-linux.elf-so_entry.S:        addq src,lsrc; push lsrc  // MATCH_05  &input_eof
src/amd64-linux.elf-so_main.c:            void *mfd_addr = Pmap(0, sizeof(code), PROT_READ|PROT_EXEC, MAP_PRIVATE, mfd, 0);
src/amd64-linux.shlib-init.S:        addq src,lsrc; push lsrc  // &input_eof
src/arch/amd64/lzma_d.S://      addq src,lsrc; push lsrc  // &input_eof
src/i386-expand.S:    add src,%ecx; push %ecx  // MATCH_52  eof_src
src/i386-linux.elf-so_entry.S:        add src,lsrc; push lsrc  // MATCH_05  &input_eof

2.  Case-by-case inspection

src/amd64-darwin.dylib-entry.S:        addq src,lsrc; push lsrc  // &input_eof
    restoring 'subq' is added in this commit

src/amd64-darwin.macho-entry.S:        addq src,lsrc; push lsrc  // &input_eof
    restoring 'subq' is added in this commit

src/amd64-linux.elf-entry.S:        addq src,lsrc; push lsrc  // &input_eof
    a restoring 'subq' is already next

src/amd64-linux.elf-so_entry.S:        addq src,lsrc; push lsrc  // MATCH_05  &input_eof
    lsrc is dead for inlined nrv2b

src/amd64-linux.elf-so_main.c:            void *mfd_addr = Pmap(0, sizeof(code), PROT_READ|PROT_EXEC, MAP_PRIVATE, mfd, 0);
    .c code

src/amd64-linux.shlib-init.S:        addq src,lsrc; push lsrc  // &input_eof
    restoring 'subq' is already next

src/arch/amd64/lzma_d.S://      addq src,lsrc; push lsrc  // &input_eof
    comment that explains preceding actions in ELFMAINX; a restoring 'subq' is already next

src/i386-expand.S:    add src,%ecx; push %ecx  // MATCH_52  eof_src
    %ecx is dead

src/i386-linux.elf-so_entry.S:        add src,lsrc; push lsrc  // MATCH_05  &input_eof
    lsrc is dead for inlined nrv2b
2023-10-12 10:41:13 -07:00
John Reiser
0515be4334 LZMA on AMD64 had bug in calling sequence, leading to random exit(127)
LzmaDecode randomly decided that the input had ended in the middle,
because of error in interface between ELFMAINX and the decoder.

Thanks to Kevin Gosse!
https://github.com/upx/upx/pull/716
https://github.com/MichalStrehovsky/PublishAotCompressed/issues/11
2023-10-06 14:14:32 -07:00
Markus F.X.J. Oberhumer
e32de83758 CI updates 2023-10-05 12:23:17 +02:00
Markus F.X.J. Oberhumer
e767461f65 src: more clang-format 2023-10-05 11:53:02 +02:00
Markus F.X.J. Oberhumer
632c7c4826 all: assorted cleanups; introduce undocumented '--sysinfo' option 2023-10-05 03:51:27 +02:00
Markus F.X.J. Oberhumer
7f9d381c7b CI updates 2023-09-30 10:46:39 +02:00
Markus F.X.J. Oberhumer
4d5d6661d5 submodules: update for new versions 2023-09-30 09:44:58 +02:00
John Reiser
b0b87eda02 check-whitespace
modified:   stub/src/upxfd_android.c
2023-09-28 12:49:14 -07:00