Commit Graph

4257 Commits

Author SHA1 Message Date
Markus F.X.J. Oberhumer
6fc0a00ac8 all: update for clang-tidy-18 2024-05-06 05:40:22 +02:00
Markus F.X.J. Oberhumer
3e5ba5c064 CI updates 2024-05-05 09:35:35 +02:00
John Reiser
4c32a8e3d4 Fix attempted recovery from corrupted b_info
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66271&q=label%3AProj-upx
	modified:   p_lx_elf.cpp
2024-05-04 10:35:39 -07:00
John Reiser
2ea316d754 Detect sizeofcmds too small
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66330&q=label%3AProj-upx
	modified:   p_mach.cpp
2024-05-04 10:10:37 -07:00
John Reiser
548227a55b mb_dt_offsets.clear() prevents undef from corrupted input
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66344&q=label%3AProj-upx
	modified:   p_lx_elf.cpp
2024-05-04 09:56:34 -07:00
John Reiser
a831a20910 unpackExtent detects corrupted compression method
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66338&q=label%3AProj-upx
	modified:   p_unix.cpp
2024-05-04 09:43:47 -07:00
John Reiser
811f66de84 Check gnu_shift during unpack
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66273&q=label%3AProj-upx
	modified:   p_lx_elf.cpp
2024-05-04 09:05:48 -07:00
Markus F.X.J. Oberhumer
84d806328b CI updates 2024-05-02 23:31:10 +02:00
Markus F.X.J. Oberhumer
285d4c4c65 submodules: update for new versions 2024-05-02 19:41:50 +02:00
Markus F.X.J. Oberhumer
8506f5b17c testsuite: update checksums caused by version change 2024-05-02 19:38:46 +02:00
Markus F.X.J. Oberhumer
a87fd56b3e all: update version 2024-05-02 18:51:55 +02:00
Markus F.X.J. Oberhumer
f0cb30e2b9 all: minor cleanups 2024-05-02 18:50:23 +02:00
Markus F.X.J. Oberhumer
038743c694 CI updates 2024-05-02 03:21:27 +02:00
John Reiser
0e6cef99a0 Guard against empty PT_NOTE
https://github.com/upx/upx/issues/817
	modified:   p_lx_elf.cpp
2024-05-01 10:09:52 -07:00
John Reiser
92c925fe95 New i386/lzma-multi_d.S enables unpacking more than one block
Used by p_lx_exe.cpp; others keep old i386/lzma_d.S
which allows only one block, but avoids trouble with
anti-virus utilities for some OS.
	modified:   misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
	new file:   src/stub/src/arch/i386/lzma-multi_d.S
	modified:   src/stub/src/arch/i386/lzma_d.S
	modified:   src/stub/src/i386-bsd.elf.execve-entry.S
	modified:   src/stub/src/i386-linux.elf.execve-entry.S
    plus stub/*.h, *.dump

    Notable:
	modified:   src/stub/i386-dos32.djgpp2.h
	modified:   src/stub/i386-dos32.tmt.h
	modified:   src/stub/i386-dos32.watcom.le.h
	modified:   src/stub/i386-win32.pe.h
2024-05-01 10:09:52 -07:00
John Reiser
4562d5459d Some non-ELF --lzma stubs assumed only one block, and <= 0.5MiB
Fixed for p_lx_exc.cpp; others remain a mystery.
https://github.com/upx/upx/issues/816
2024-05-01 10:09:52 -07:00
Markus F.X.J. Oberhumer
8393ded1b3 CI updates 2024-05-01 13:11:12 +02:00
Markus F.X.J. Oberhumer
b0dc483165 CI updates 2024-04-29 07:53:21 +02:00
Markus F.X.J. Oberhumer
3c0ca81311 CI updates 2024-04-29 06:24:45 +02:00
Markus F.X.J. Oberhumer
157a63a023 CI updates 2024-04-28 22:18:47 +02:00
John Reiser
80e22a7e38 Fix --preserve-build-id
https://github.com/upx/upx/issues/815
	modified:   p_lx_elf.cpp
2024-04-27 08:21:48 -07:00
Markus F.X.J. Oberhumer
ddf2da3d76 cmake: run tests in parallel; misc/podman: add 30-rebuild-stubs.sh 2024-04-26 10:36:01 +02:00
Markus F.X.J. Oberhumer
0e6478a60f submodules: update for new versions 2024-04-26 09:51:10 +02:00
Markus F.X.J. Oberhumer
aed2c085b8 misc: update mimic_ctest.sh 2024-04-25 10:56:24 +02:00
Markus F.X.J. Oberhumer
a7592b2ca2 all: enhance tests 2024-04-25 03:19:59 +02:00
John Reiser
265c100845 PowerPC64 nrv2d decompressor
https://github.com/upx/upx/issues/813
	modified:   misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
	modified:   src/stub/src/arch/powerpc/64le/nrv2d_d.S

	modified:   src/stub/powerpc64-darwin.dylib-entry.h
	modified:   src/stub/powerpc64-darwin.macho-entry.h
	modified:   src/stub/powerpc64-linux.elf-entry.h
	modified:   src/stub/powerpc64le-linux.elf-entry.h
	modified:   src/stub/powerpc64le-linux.kernel.vmlinux.h
2024-04-24 14:37:09 -07:00
John Reiser
84e8288f61 Propagate yesterday's fix to stub decoding on PowerPC
https://github.com/upx/upx/issues/813
	modified:   misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
	modified:   src/stub/src/arch/powerpc/32/nrv2d_d.S
	modified:   src/stub/src/arch/powerpc/32/nrv2e_d.S
	modified:   src/stub/src/arch/powerpc/64le/nrv2b_d.S
	modified:   src/stub/src/arch/powerpc/64le/nrv2d_d.S

	modified:   src/stub/powerpc-darwin.dylib-entry.h
	modified:   src/stub/powerpc-darwin.macho-entry.h
	modified:   src/stub/powerpc-linux.elf-entry.h
	modified:   src/stub/powerpc-linux.kernel.vmlinux.h
	modified:   src/stub/powerpc64-darwin.dylib-entry.h
	modified:   src/stub/powerpc64-darwin.macho-entry.h
	modified:   src/stub/powerpc64-linux.elf-entry.h
	modified:   src/stub/powerpc64le-linux.elf-entry.h
	modified:   src/stub/powerpc64le-linux.kernel.vmlinux.h
	modified:   src/stub/tmp/powerpc-darwin.dylib-entry.bin.dump
	modified:   src/stub/tmp/powerpc-darwin.macho-entry.bin.dump
	modified:   src/stub/tmp/powerpc-linux.elf-entry.bin.dump
	modified:   src/stub/tmp/powerpc-linux.kernel.vmlinux.bin.dump
	modified:   src/stub/tmp/powerpc64-darwin.dylib-entry.bin.dump
	modified:   src/stub/tmp/powerpc64-darwin.macho-entry.bin.dump
	modified:   src/stub/tmp/powerpc64-linux.elf-entry.bin.dump
	modified:   src/stub/tmp/powerpc64le-linux.elf-entry.bin.dump
	modified:   src/stub/tmp/powerpc64le-linux.kernel.vmlinux.bin.dump
2024-04-24 10:36:55 -07:00
Markus F.X.J. Oberhumer
c69b4561fb src: initialize some fields to suppress harmless valgrind errors 2024-04-24 12:36:22 +02:00
John Reiser
6db0af8d04 PowerPC cannot branch on CArry; requires contortions
https://github.com/upx/upx/issues/813
	modified:   src/stub/src/arch/powerpc/32/nrv2b_d.S
	modified:   misc/testsuite/upx_testsuite_1-expected_sha256sums.sh

	modified:   src/stub/powerpc-darwin.dylib-entry.h
	modified:   src/stub/powerpc-darwin.macho-entry.h
	modified:   src/stub/powerpc-linux.elf-entry.h
	modified:   src/stub/powerpc-linux.kernel.vmlinux.h
	modified:   src/stub/src/i386-linux.elf-main.c
	modified:   src/stub/tmp/powerpc-darwin.dylib-entry.bin.dump
	modified:   src/stub/tmp/powerpc-darwin.macho-entry.bin.dump
	modified:   src/stub/tmp/powerpc-linux.elf-entry.bin.dump
	modified:   src/stub/tmp/powerpc-linux.kernel.vmlinux.bin.dump
2024-04-23 17:40:07 -07:00
Markus F.X.J. Oberhumer
842d2cbb0d testsuite: update checksums 2024-04-21 19:46:05 -07:00
John Reiser
9fb64ded10 Syscall on powerpc linux wipes arg registers, unlike x86_64
Also squeaky-clean 'get_page_mask' for I/D cache consistency.
https://github.com/upx/upx/issues/813

	modified:   stub/powerpc-linux.elf-entry.h
	modified:   stub/powerpc-linux.elf-fold.h
	modified:   stub/src/powerpc-linux.elf-entry.S
	modified:   stub/src/powerpc-linux.elf-fold.S
	modified:   stub/tmp/powerpc-linux.elf-entry.bin.dump
	modified:   stub/tmp/powerpc-linux.elf-fold.map
2024-04-21 19:46:05 -07:00
Markus F.X.J. Oberhumer
9d26713b1a Add experimental (and undocumented) --help-verbose and --help-short options. 2024-04-21 14:20:18 +02:00
Markus F.X.J. Oberhumer
eb3c55b5cb all: add more tests 2024-04-21 12:17:38 +02:00
Markus F.X.J. Oberhumer
896596f672 cmake update 2024-04-20 21:08:09 +02:00
Markus F.X.J. Oberhumer
e4de14612f CI updates 2024-04-20 12:29:32 +02:00
Markus F.X.J. Oberhumer
1d2b276425 all: improve tests 2024-04-16 15:20:56 +02:00
Markus F.X.J. Oberhumer
35c6a200ad CI updates 2024-04-14 02:15:26 +02:00
Markus F.X.J. Oberhumer
90a7faa15e CI updates 2024-04-10 10:52:48 +02:00
John Reiser
91f5fe1c0e arm64 --nrv2d instruction confusion
https://github.com/upx/upx/issues/806

ARM Architecture Reference Manual
    ARMv8, for ARMv8-A architecture profile
Section C6.2.47, page C6-595 (note the 'invert'!)
    CINC <Wd>, <Wn>, <cond>
    is equivalent to
    CSINC <Wd>, <Wn>, <Wn>, invert(<cond>)

	modified:   src/stub/src/arch/arm64/v8/nrv2d_d32.S
	modified:   misc/testsuite/upx_testsuite_1-expected_sha256sums.sh

	modified:   src/stub/arm64-darwin.macho-entry.h
	modified:   src/stub/arm64-linux.elf-entry.h
	modified:   src/stub/arm64-linux.elf-so_fold.h
	modified:   src/stub/arm64-linux.shlib-init.h
	modified:   src/stub/arm64-win64.pe.h
2024-04-07 14:01:19 -07:00
John Reiser
d48a7d303d Sync checksums for testsuite_1 (-release)
modified:   misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
2024-04-06 18:37:34 -07:00
John Reiser
bb816f0c74 arm64 --nrv2d preserve sign when decoding offset
https://github.com/upx/upx/issues/806
	modified:   src/stub/arm64-darwin.macho-entry.h
	modified:   src/stub/arm64-linux.elf-entry.h
	modified:   src/stub/arm64-linux.elf-so_fold.h
	modified:   src/stub/arm64-linux.shlib-init.h
	modified:   src/stub/arm64-win64.pe.h
	modified:   src/stub/src/arch/arm64/v8/nrv2d_d32.S
2024-04-06 16:16:28 -07:00
John Reiser
93abe97ea5 powerpc64le --nrv2d register conflict
modified:   stub/powerpc64-darwin.dylib-entry.h
	modified:   stub/powerpc64-darwin.macho-entry.h
	modified:   stub/powerpc64-linux.elf-entry.h
	modified:   stub/powerpc64le-linux.elf-entry.h
	modified:   stub/powerpc64le-linux.kernel.vmlinux.h
	modified:   stub/src/arch/powerpc/64le/nrv2d_d.S
	modified:   stub/src/arch/powerpc/64le/nrv2e_d.S

https://github.com/upx/upx/issues/806
2024-04-06 16:16:28 -07:00
Markus F.X.J. Oberhumer
97cf29ffbb all: enhance CMake tests; assorted updates 2024-04-06 15:47:46 +02:00
Markus F.X.J. Oberhumer
ed35613d64 misc/podman/rebuild-stubs: upgrade to ubuntu-24.04 2024-04-05 20:04:23 +02:00
Markus F.X.J. Oberhumer
f5ec8363b4 CI updates 2024-04-05 18:16:29 +02:00
Markus F.X.J. Oberhumer
87956de092 CI updates 2024-04-04 03:01:03 +02:00
Markus F.X.J. Oberhumer
0f9315383c cmake: only enable UBSAN for clang versions >= 9 2024-04-02 09:21:56 +02:00
Markus F.X.J. Oberhumer
3538d796a7 CI updates 2024-04-02 08:05:43 +02:00
Markus F.X.J. Oberhumer
24f3824524 CI updates and minor cleanups 2024-04-01 20:31:05 +02:00
Markus F.X.J. Oberhumer
70b20d7d89 CI updates 2024-03-29 12:11:41 +01:00