From 16c208fea3f7c60ed94072bafa12d929a32d9add Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 00:27:26 +0000 Subject: [PATCH 01/39] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- upx.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/upx.spec b/upx.spec index 853e3ba..ad838f8 100644 --- a/upx.spec +++ b/upx.spec @@ -12,6 +12,7 @@ Patch1: upx-nohtml.patch Patch2: dadfd43ecb9909b0fab18e77753953a91322c628.patch Patch3: 2fcaa16c13eda34307ccceea2263e474c54ee075.patch +BuildRequires: make BuildRequires: gcc-c++ BuildRequires: ucl-devel >= 1.01 BuildRequires: zlib-devel From 843cf457e1d087821888f3e40313ff9fe32380e6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 22:44:40 +0000 Subject: [PATCH 02/39] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index ad838f8..5544a4c 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 3.96 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain @@ -58,6 +58,9 @@ install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 3.96-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Aug 10 2020 Gwyn Ciesla - 3.96-6 - Make PE load config directory address dword aligned From ff44aec67926ea706289f77f3468ea926724f9ad Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 11 Mar 2021 09:18:43 -0600 Subject: [PATCH 03/39] Patch for CVE-2021-20285 --- ...df9da23840e596d5e9e8493f22666802fe6c.patch | 76 +++++++++++++++++++ upx.spec | 5 ++ 2 files changed, 81 insertions(+) create mode 100644 3781df9da23840e596d5e9e8493f22666802fe6c.patch diff --git a/3781df9da23840e596d5e9e8493f22666802fe6c.patch b/3781df9da23840e596d5e9e8493f22666802fe6c.patch new file mode 100644 index 0000000..1d47b2a --- /dev/null +++ b/3781df9da23840e596d5e9e8493f22666802fe6c.patch @@ -0,0 +1,76 @@ +From 3781df9da23840e596d5e9e8493f22666802fe6c Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Fri, 11 Dec 2020 13:38:18 -0800 +Subject: [PATCH] Check DT_REL/DT_RELA, DT_RELSZ/DT_RELASZ + +https://github.com/upx/upx/issues/421 + modified: p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 34 +++++++++++++++++++++++++++++----- + 1 file changed, 29 insertions(+), 5 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index 182db192..3a4101cf 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -2222,8 +2222,20 @@ bool PackLinuxElf32::canPack() + int z_rsz = dt_table[Elf32_Dyn::DT_RELSZ]; + if (z_rel && z_rsz) { + unsigned rel_off = get_te32(&dynseg[-1+ z_rel].d_val); ++ if ((unsigned)file_size <= rel_off) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf32_Dynamic[DT_REL] %#x\n", ++ rel_off); ++ throwCantPack(msg); ++ } + Elf32_Rel *rp = (Elf32_Rel *)&file_image[rel_off]; + unsigned relsz = get_te32(&dynseg[-1+ z_rsz].d_val); ++ if ((unsigned)file_size <= relsz) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf32_Dynamic[DT_RELSZ] %#x\n", ++ relsz); ++ throwCantPack(msg); ++ } + Elf32_Rel *last = (Elf32_Rel *)(relsz + (char *)rp); + for (; rp < last; ++rp) { + unsigned r_va = get_te32(&rp->r_offset); +@@ -2562,14 +2574,26 @@ PackLinuxElf64::canPack() + int z_rel = dt_table[Elf64_Dyn::DT_RELA]; + int z_rsz = dt_table[Elf64_Dyn::DT_RELASZ]; + if (z_rel && z_rsz) { +- unsigned rel_off = get_te64(&dynseg[-1+ z_rel].d_val); ++ upx_uint64_t rel_off = get_te64(&dynseg[-1+ z_rel].d_val); ++ if ((u64_t)file_size <= rel_off) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf64_Dynamic[DT_RELA] %#llx\n", ++ rel_off); ++ throwCantPack(msg); ++ } + Elf64_Rela *rp = (Elf64_Rela *)&file_image[rel_off]; +- unsigned relsz = get_te64(&dynseg[-1+ z_rsz].d_val); ++ upx_uint64_t relsz = get_te64(&dynseg[-1+ z_rsz].d_val); ++ if ((u64_t)file_size <= relsz) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf64_Dynamic[DT_RELASZ] %#llx\n", ++ relsz); ++ throwCantPack(msg); ++ } + Elf64_Rela *last = (Elf64_Rela *)(relsz + (char *)rp); + for (; rp < last; ++rp) { +- unsigned r_va = get_te64(&rp->r_offset); ++ upx_uint64_t r_va = get_te64(&rp->r_offset); + if (r_va == user_init_ava) { // found the Elf64_Rela +- unsigned r_info = get_te64(&rp->r_info); ++ upx_uint64_t r_info = get_te64(&rp->r_info); + unsigned r_type = ELF64_R_TYPE(r_info); + if (Elf64_Ehdr::EM_AARCH64 == e_machine + && R_AARCH64_RELATIVE == r_type) { +@@ -2581,7 +2605,7 @@ PackLinuxElf64::canPack() + } + else { + char msg[50]; snprintf(msg, sizeof(msg), +- "bad relocation %#x DT_INIT_ARRAY[0]", ++ "bad relocation %#llx DT_INIT_ARRAY[0]", + r_info); + throwCantPack(msg); + } diff --git a/upx.spec b/upx.spec index 5544a4c..c80b108 100644 --- a/upx.spec +++ b/upx.spec @@ -11,6 +11,7 @@ Patch0: upx-whitespace.patch Patch1: upx-nohtml.patch Patch2: dadfd43ecb9909b0fab18e77753953a91322c628.patch Patch3: 2fcaa16c13eda34307ccceea2263e474c54ee075.patch +Patch4: 3781df9da23840e596d5e9e8493f22666802fe6c.patch BuildRequires: make BuildRequires: gcc-c++ @@ -35,6 +36,7 @@ tar xfz %{SOURCE1} --strip-components=1 -C src/lzma-sdk/ %patch1 -p0 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build export CXX="g++" @@ -58,6 +60,9 @@ install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx %changelog +* Thu Mar 11 2021 Gwyn Ciesla - 3.96-8 +- PAtch for CVE-2021-20285 + * Wed Jan 27 2021 Fedora Release Engineering - 3.96-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 696239700f0bb46467fb9667aeb2dd1ddc45f5d5 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 11 Mar 2021 09:22:13 -0600 Subject: [PATCH 04/39] Bump release. --- upx.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index c80b108..a15940a 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 3.96 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain From 58900bc63b3a23295ec04bfb0186772c7984a8e1 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 18 May 2021 08:46:16 -0500 Subject: [PATCH 05/39] Patch for CVE-2020-24119. --- ...3e5cfdc12da94c251b2cd83bb01c7d9f616c.patch | 34 +++++++++++++++++++ upx.spec | 9 +++-- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch diff --git a/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch b/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch new file mode 100644 index 0000000..7e6de04 --- /dev/null +++ b/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch @@ -0,0 +1,34 @@ +From 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Wed, 22 Jul 2020 19:34:27 -0700 +Subject: [PATCH] Unpack: Phdrs must be within expansion of first compressed + block + +https://github.com/upx/upx/issues/388 + modified: p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index cd9e4ec97..453d5c457 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -4550,7 +4550,7 @@ void PackLinuxElf64::unpack(OutputFile *fo) + unsigned c_adler = upx_adler32(NULL, 0); + unsigned u_adler = upx_adler32(NULL, 0); + #define MAX_ELF_HDR 1024 +- if ((MAX_ELF_HDR - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { ++ if ((umin64(MAX_ELF_HDR, ph.u_len) - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { + throwCantUnpack("bad compressed e_phnum"); + } + #undef MAX_ELF_HDR +@@ -5617,7 +5617,7 @@ void PackLinuxElf32::unpack(OutputFile *fo) + unsigned c_adler = upx_adler32(NULL, 0); + unsigned u_adler = upx_adler32(NULL, 0); + #define MAX_ELF_HDR 512 +- if ((MAX_ELF_HDR - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { ++ if ((umin(MAX_ELF_HDR, ph.u_len) - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { + throwCantUnpack("bad compressed e_phnum"); + } + #undef MAX_ELF_HDR diff --git a/upx.spec b/upx.spec index a15940a..afee1db 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 3.96 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain @@ -12,6 +12,7 @@ Patch1: upx-nohtml.patch Patch2: dadfd43ecb9909b0fab18e77753953a91322c628.patch Patch3: 2fcaa16c13eda34307ccceea2263e474c54ee075.patch Patch4: 3781df9da23840e596d5e9e8493f22666802fe6c.patch +Patch5: 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch BuildRequires: make BuildRequires: gcc-c++ @@ -37,6 +38,7 @@ tar xfz %{SOURCE1} --strip-components=1 -C src/lzma-sdk/ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build export CXX="g++" @@ -60,8 +62,11 @@ install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx %changelog +* Tue May 18 2021 Gwyn Ciesla - 3.96-9 +- Patch for CVE-2020-24119 + * Thu Mar 11 2021 Gwyn Ciesla - 3.96-8 -- PAtch for CVE-2021-20285 +- Patch for CVE-2021-20285 * Wed Jan 27 2021 Fedora Release Engineering - 3.96-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 763324f50511fe564bee6c4aadb543c799edc68f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 20:07:07 +0000 Subject: [PATCH 06/39] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index afee1db..2671f30 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 3.96 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain @@ -62,6 +62,9 @@ install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 3.96-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue May 18 2021 Gwyn Ciesla - 3.96-9 - Patch for CVE-2020-24119 From 30855e38bd27f361c5f145cbea2b3de96042204f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 03:36:08 +0000 Subject: [PATCH 07/39] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index 2671f30..05590d8 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 3.96 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain @@ -62,6 +62,9 @@ install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 3.96-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 3.96-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From dcc0cc48eacdb6f8390479a9dd3c1497db1c7b0c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 11:28:57 +0000 Subject: [PATCH 08/39] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index 05590d8..b263122 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 3.96 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain @@ -62,6 +62,9 @@ install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 3.96-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Jan 22 2022 Fedora Release Engineering - 3.96-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From cb1480fa2291e8144c15ba1491c73433b08a5006 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Wed, 12 Oct 2022 11:06:46 -0500 Subject: [PATCH 09/39] Licensing issues, see BZ 2133058 --- .gitignore | 13 - ...a16c13eda34307ccceea2263e474c54ee075.patch | 22 -- ...df9da23840e596d5e9e8493f22666802fe6c.patch | 76 ------ ...3e5cfdc12da94c251b2cd83bb01c7d9f616c.patch | 34 --- ...d43ecb9909b0fab18e77753953a91322c628.patch | 127 --------- dead.package | 1 + sources | 2 - upx-nohtml.patch | 52 ---- upx-whitespace.patch | 11 - upx.spec | 256 ------------------ 10 files changed, 1 insertion(+), 593 deletions(-) delete mode 100644 .gitignore delete mode 100644 2fcaa16c13eda34307ccceea2263e474c54ee075.patch delete mode 100644 3781df9da23840e596d5e9e8493f22666802fe6c.patch delete mode 100644 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch delete mode 100644 dadfd43ecb9909b0fab18e77753953a91322c628.patch create mode 100644 dead.package delete mode 100644 sources delete mode 100644 upx-nohtml.patch delete mode 100644 upx-whitespace.patch delete mode 100644 upx.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 954d913..0000000 --- a/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -upx-3.04-src.tar.bz2 -lzma465.tar.bz2 -/upx-3.07-src.tar.bz2 -/lzma465.tar.bz2 -/upx-3.08-src.tar.bz2 -/upx-3.09-src.tar.bz2 -/upx-3.91-src.tar.bz2 -/upx-3.93-src.tar.xz -/upx-3.94-src.tar.xz -/upx-3.95.tar.gz -/upx-lzma-sdk-3.95.tar.gz -/upx-3.96-src.tar.xz -/upx-lzma-sdk-3.96.tar.gz diff --git a/2fcaa16c13eda34307ccceea2263e474c54ee075.patch b/2fcaa16c13eda34307ccceea2263e474c54ee075.patch deleted file mode 100644 index 30a7615..0000000 --- a/2fcaa16c13eda34307ccceea2263e474c54ee075.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 2fcaa16c13eda34307ccceea2263e474c54ee075 Mon Sep 17 00:00:00 2001 -From: Mattiwatti -Date: Tue, 21 Jan 2020 16:03:40 +0100 -Subject: [PATCH] Make PE load config directory address dword aligned - ---- - src/pefile.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pefile.cpp b/src/pefile.cpp -index 7bf66cbe..d957886f 100644 ---- a/src/pefile.cpp -+++ b/src/pefile.cpp -@@ -2427,7 +2427,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, - processTls(&rel,&tlsiv,ic); - ODADDR(PEDIR_TLS) = sotls ? ic : 0; - ODSIZE(PEDIR_TLS) = sotls ? (sizeof(LEXX) == 4 ? 0x18 : 0x28) : 0; -- ic += sotls; -+ ic = ALIGN_UP(ic + sotls, 4u); - - processLoadConf(&rel, &loadconfiv, ic); - ODADDR(PEDIR_LOADCONF) = soloadconf ? ic : 0; diff --git a/3781df9da23840e596d5e9e8493f22666802fe6c.patch b/3781df9da23840e596d5e9e8493f22666802fe6c.patch deleted file mode 100644 index 1d47b2a..0000000 --- a/3781df9da23840e596d5e9e8493f22666802fe6c.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 3781df9da23840e596d5e9e8493f22666802fe6c Mon Sep 17 00:00:00 2001 -From: John Reiser -Date: Fri, 11 Dec 2020 13:38:18 -0800 -Subject: [PATCH] Check DT_REL/DT_RELA, DT_RELSZ/DT_RELASZ - -https://github.com/upx/upx/issues/421 - modified: p_lx_elf.cpp ---- - src/p_lx_elf.cpp | 34 +++++++++++++++++++++++++++++----- - 1 file changed, 29 insertions(+), 5 deletions(-) - -diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp -index 182db192..3a4101cf 100644 ---- a/src/p_lx_elf.cpp -+++ b/src/p_lx_elf.cpp -@@ -2222,8 +2222,20 @@ bool PackLinuxElf32::canPack() - int z_rsz = dt_table[Elf32_Dyn::DT_RELSZ]; - if (z_rel && z_rsz) { - unsigned rel_off = get_te32(&dynseg[-1+ z_rel].d_val); -+ if ((unsigned)file_size <= rel_off) { -+ char msg[70]; snprintf(msg, sizeof(msg), -+ "bad Elf32_Dynamic[DT_REL] %#x\n", -+ rel_off); -+ throwCantPack(msg); -+ } - Elf32_Rel *rp = (Elf32_Rel *)&file_image[rel_off]; - unsigned relsz = get_te32(&dynseg[-1+ z_rsz].d_val); -+ if ((unsigned)file_size <= relsz) { -+ char msg[70]; snprintf(msg, sizeof(msg), -+ "bad Elf32_Dynamic[DT_RELSZ] %#x\n", -+ relsz); -+ throwCantPack(msg); -+ } - Elf32_Rel *last = (Elf32_Rel *)(relsz + (char *)rp); - for (; rp < last; ++rp) { - unsigned r_va = get_te32(&rp->r_offset); -@@ -2562,14 +2574,26 @@ PackLinuxElf64::canPack() - int z_rel = dt_table[Elf64_Dyn::DT_RELA]; - int z_rsz = dt_table[Elf64_Dyn::DT_RELASZ]; - if (z_rel && z_rsz) { -- unsigned rel_off = get_te64(&dynseg[-1+ z_rel].d_val); -+ upx_uint64_t rel_off = get_te64(&dynseg[-1+ z_rel].d_val); -+ if ((u64_t)file_size <= rel_off) { -+ char msg[70]; snprintf(msg, sizeof(msg), -+ "bad Elf64_Dynamic[DT_RELA] %#llx\n", -+ rel_off); -+ throwCantPack(msg); -+ } - Elf64_Rela *rp = (Elf64_Rela *)&file_image[rel_off]; -- unsigned relsz = get_te64(&dynseg[-1+ z_rsz].d_val); -+ upx_uint64_t relsz = get_te64(&dynseg[-1+ z_rsz].d_val); -+ if ((u64_t)file_size <= relsz) { -+ char msg[70]; snprintf(msg, sizeof(msg), -+ "bad Elf64_Dynamic[DT_RELASZ] %#llx\n", -+ relsz); -+ throwCantPack(msg); -+ } - Elf64_Rela *last = (Elf64_Rela *)(relsz + (char *)rp); - for (; rp < last; ++rp) { -- unsigned r_va = get_te64(&rp->r_offset); -+ upx_uint64_t r_va = get_te64(&rp->r_offset); - if (r_va == user_init_ava) { // found the Elf64_Rela -- unsigned r_info = get_te64(&rp->r_info); -+ upx_uint64_t r_info = get_te64(&rp->r_info); - unsigned r_type = ELF64_R_TYPE(r_info); - if (Elf64_Ehdr::EM_AARCH64 == e_machine - && R_AARCH64_RELATIVE == r_type) { -@@ -2581,7 +2605,7 @@ PackLinuxElf64::canPack() - } - else { - char msg[50]; snprintf(msg, sizeof(msg), -- "bad relocation %#x DT_INIT_ARRAY[0]", -+ "bad relocation %#llx DT_INIT_ARRAY[0]", - r_info); - throwCantPack(msg); - } diff --git a/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch b/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch deleted file mode 100644 index 7e6de04..0000000 --- a/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c Mon Sep 17 00:00:00 2001 -From: John Reiser -Date: Wed, 22 Jul 2020 19:34:27 -0700 -Subject: [PATCH] Unpack: Phdrs must be within expansion of first compressed - block - -https://github.com/upx/upx/issues/388 - modified: p_lx_elf.cpp ---- - src/p_lx_elf.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp -index cd9e4ec97..453d5c457 100644 ---- a/src/p_lx_elf.cpp -+++ b/src/p_lx_elf.cpp -@@ -4550,7 +4550,7 @@ void PackLinuxElf64::unpack(OutputFile *fo) - unsigned c_adler = upx_adler32(NULL, 0); - unsigned u_adler = upx_adler32(NULL, 0); - #define MAX_ELF_HDR 1024 -- if ((MAX_ELF_HDR - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { -+ if ((umin64(MAX_ELF_HDR, ph.u_len) - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { - throwCantUnpack("bad compressed e_phnum"); - } - #undef MAX_ELF_HDR -@@ -5617,7 +5617,7 @@ void PackLinuxElf32::unpack(OutputFile *fo) - unsigned c_adler = upx_adler32(NULL, 0); - unsigned u_adler = upx_adler32(NULL, 0); - #define MAX_ELF_HDR 512 -- if ((MAX_ELF_HDR - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { -+ if ((umin(MAX_ELF_HDR, ph.u_len) - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { - throwCantUnpack("bad compressed e_phnum"); - } - #undef MAX_ELF_HDR diff --git a/dadfd43ecb9909b0fab18e77753953a91322c628.patch b/dadfd43ecb9909b0fab18e77753953a91322c628.patch deleted file mode 100644 index 1143325..0000000 --- a/dadfd43ecb9909b0fab18e77753953a91322c628.patch +++ /dev/null @@ -1,127 +0,0 @@ -From dadfd43ecb9909b0fab18e77753953a91322c628 Mon Sep 17 00:00:00 2001 -From: John Reiser -Date: Fri, 17 Apr 2020 16:17:29 -0700 -Subject: [PATCH] --preserve-build-id for ET_EXEC - -https://github.com/upx/upx/issues/371 - modified: p_lx_elf.cpp ---- - src/p_lx_elf.cpp | 50 +++++++++++++++++++++++++++++++----------------- - 1 file changed, 32 insertions(+), 18 deletions(-) - -diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp -index 6b5b4295..725f68f4 100644 ---- a/src/p_lx_elf.cpp -+++ b/src/p_lx_elf.cpp -@@ -3386,26 +3386,33 @@ void PackLinuxElf32::pack1(OutputFile *fo, Filter & /*ft*/) - if (opt->o_unix.preserve_build_id) { - // set this so we can use elf_find_section_name - e_shnum = get_te16(&ehdri.e_shnum); -+ MemBuffer mb_shdri; - if (!shdri) { -- shdri = (Elf32_Shdr *)&file_image[get_te32(&ehdri.e_shoff)]; -+ mb_shdri.alloc(e_shnum * sizeof(Elf32_Shdr)); -+ shdri = (Elf32_Shdr *)mb_shdri.getVoidPtr(); -+ e_shoff = get_te32(&ehdri.e_shoff); -+ fi->seek(e_shoff, SEEK_SET); -+ fi->readx(shdri, e_shnum * sizeof(Elf32_Shdr)); - } - //set the shstrtab - sec_strndx = &shdri[get_te16(&ehdri.e_shstrndx)]; - -- char *strtab = New(char, sec_strndx->sh_size); -+ unsigned sh_size = get_te32(&sec_strndx->sh_size); -+ char *strtab = New(char, sh_size); - fi->seek(0,SEEK_SET); - fi->seek(sec_strndx->sh_offset,SEEK_SET); -- fi->readx(strtab,sec_strndx->sh_size); -+ fi->readx(strtab, sh_size); - - shstrtab = (const char*)strtab; - - Elf32_Shdr const *buildid = elf_find_section_name(".note.gnu.build-id"); - if (buildid) { -- unsigned char *data = New(unsigned char, buildid->sh_size); -- memset(data,0,buildid->sh_size); -+ unsigned bid_sh_size = get_te32(&buildid->sh_size); -+ unsigned char *data = New(unsigned char, bid_sh_size); -+ memset(data,0,bid_sh_size); - fi->seek(0,SEEK_SET); - fi->seek(buildid->sh_offset,SEEK_SET); -- fi->readx(data,buildid->sh_size); -+ fi->readx(data, bid_sh_size); - - buildid_data = data; - -@@ -3414,12 +3421,12 @@ void PackLinuxElf32::pack1(OutputFile *fo, Filter & /*ft*/) - - //setup the build-id - memcpy(&shdrout.shdr[1], buildid, sizeof(shdrout.shdr[1])); -- shdrout.shdr[1].sh_name = 1; -+ set_te32(&shdrout.shdr[1].sh_name, 1); - - //setup the shstrtab - memcpy(&shdrout.shdr[2], sec_strndx, sizeof(shdrout.shdr[2])); -- shdrout.shdr[2].sh_name = 20; -- shdrout.shdr[2].sh_size = 29; //size of our static shstrtab -+ set_te32(&shdrout.shdr[2].sh_name, 20); -+ set_te32(&shdrout.shdr[2].sh_size, 29); //size of our static shstrtab - } - } - } -@@ -3790,26 +3797,33 @@ void PackLinuxElf64::pack1(OutputFile *fo, Filter & /*ft*/) - if (opt->o_unix.preserve_build_id) { - // set this so we can use elf_find_section_name - e_shnum = get_te16(&ehdri.e_shnum); -+ MemBuffer mb_shdri; - if (!shdri) { -- shdri = (Elf64_Shdr *)&file_image[get_te32(&ehdri.e_shoff)]; -+ mb_shdri.alloc(e_shnum * sizeof(Elf64_Shdr)); -+ shdri = (Elf64_Shdr *)mb_shdri.getVoidPtr(); -+ e_shoff = get_te64(&ehdri.e_shoff); -+ fi->seek(e_shoff, SEEK_SET); -+ fi->readx(shdri, e_shnum * sizeof(Elf64_Shdr)); - } - //set the shstrtab - sec_strndx = &shdri[get_te16(&ehdri.e_shstrndx)]; - -- char *strtab = New(char, sec_strndx->sh_size); -+ upx_uint64_t sh_size = get_te64(&sec_strndx->sh_size); -+ char *strtab = New(char, sh_size); - fi->seek(0,SEEK_SET); - fi->seek(sec_strndx->sh_offset,SEEK_SET); -- fi->readx(strtab,sec_strndx->sh_size); -+ fi->readx(strtab, sh_size); - - shstrtab = (const char*)strtab; - - Elf64_Shdr const *buildid = elf_find_section_name(".note.gnu.build-id"); - if (buildid) { -- unsigned char *data = New(unsigned char, buildid->sh_size); -- memset(data,0,buildid->sh_size); -+ unsigned bid_sh_size = get_te32(&buildid->sh_size); -+ unsigned char *data = New(unsigned char, bid_sh_size); -+ memset(data,0,bid_sh_size); - fi->seek(0,SEEK_SET); - fi->seek(buildid->sh_offset,SEEK_SET); -- fi->readx(data,buildid->sh_size); -+ fi->readx(data,bid_sh_size); - - buildid_data = data; - -@@ -3818,12 +3832,12 @@ void PackLinuxElf64::pack1(OutputFile *fo, Filter & /*ft*/) - - //setup the build-id - memcpy(&shdrout.shdr[1], buildid, sizeof(shdrout.shdr[1])); -- shdrout.shdr[1].sh_name = 1; -+ set_te32(&shdrout.shdr[1].sh_name, 1); - - //setup the shstrtab - memcpy(&shdrout.shdr[2], sec_strndx, sizeof(shdrout.shdr[2])); -- shdrout.shdr[2].sh_name = 20; -- shdrout.shdr[2].sh_size = 29; //size of our static shstrtab -+ set_te32(&shdrout.shdr[2].sh_name, 20); -+ set_te32(&shdrout.shdr[2].sh_size, 29); //size of our static shstrtab - } - } - } diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..b31a40c --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Licensing issues, see BZ 2133058 diff --git a/sources b/sources deleted file mode 100644 index 96ff364..0000000 --- a/sources +++ /dev/null @@ -1,2 +0,0 @@ -SHA512 (upx-3.96-src.tar.xz) = 2d4d1be21d274d9bfdee9b9815396f5e5ff0bcdfb781b7be5fafa4d1e224028e412ec5f5ba607c482671aae27ccf9069abb2db0fb58f78f3a102a51897df2b11 -SHA512 (upx-lzma-sdk-3.96.tar.gz) = 9690a1dfabf8bcb161b26761556a390aa354b633914254b29e36246fe11f9c3e905dafa916d0d52300bd418e2bddedd4122027e447fc87183bce4479e771c7df diff --git a/upx-nohtml.patch b/upx-nohtml.patch deleted file mode 100644 index b50f935..0000000 --- a/upx-nohtml.patch +++ /dev/null @@ -1,52 +0,0 @@ -*** doc/Makefile~ 2018-08-25 21:58:09.000000000 -0500 ---- doc/Makefile 2018-08-27 10:24:23.304422432 -0500 -*************** -*** 26,33 **** - RTRIM := sed -e 's/[ $(tab)]*$$//' - DETAB2 := sed -e 's/$(tab)/ /g' - -! BUILT_SOURCES = upx.1 upx.doc upx.html upx.man upx.ps upx.tex -! BUILT_SOURCES = upx.1 upx.doc upx.html - - - ### ---- 26,33 ---- - RTRIM := sed -e 's/[ $(tab)]*$$//' - DETAB2 := sed -e 's/$(tab)/ /g' - -! BUILT_SOURCES = upx.1 upx.doc upx.man upx.ps upx.tex -! BUILT_SOURCES = upx.1 upx.doc - - - ### -*************** -*** 46,52 **** - ### rules - ### - -! .SUFFIXES: .1 .doc .html .man .pod .ps .tex - - %.1 : %.pod - pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@ ---- 46,52 ---- - ### rules - ### - -! .SUFFIXES: .1 .doc .man .pod .ps .tex - - %.1 : %.pod - pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@ -*************** -*** 56,66 **** - pod2text < $< | $(RTRIM) > $@ - test -s $@ - -- %.html : %.pod -- pod2html --noindex $< | $(RTRIM) | $(DETAB2) > $@ -- @rm -f pod2htm* -- test -s $@ -- - %.man : %.1 - nroff -man $< | $(RTRIM) > $@ - test -s $@ ---- 56,61 ---- diff --git a/upx-whitespace.patch b/upx-whitespace.patch deleted file mode 100644 index 9657b2b..0000000 --- a/upx-whitespace.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/Makefile~ 2017-01-29 10:53:00.000000000 -0600 -+++ src/Makefile 2017-03-30 10:03:12.447172055 -0500 -@@ -86,7 +86,7 @@ - $($(notdir $@).PRE_LINK_STEP) - $(strip $(CXXLD) $(call ee,CXXFLAGS) $(call ee,LDFLAGS) -o $@ $(upx_OBJECTS) $(call ee,LDADD) $(call ee,LIBS)) - $($(notdir $@).POST_LINK_STEP) -- $(CHECK_WHITESPACE) -+# $(CHECK_WHITESPACE) - - %.o : %.cpp | ./.depend - $(strip $(CXX) $(call ee,CPPFLAGS) $(call ee,CXXFLAGS) -o $@ -c $<) diff --git a/upx.spec b/upx.spec deleted file mode 100644 index b263122..0000000 --- a/upx.spec +++ /dev/null @@ -1,256 +0,0 @@ -Name: upx -Version: 3.96 -Release: 12%{?dist} -Summary: Ultimate Packer for eXecutables - -License: GPLv2+ and Public Domain -URL: http://upx.sourceforge.net/ -Source0: http://upx.sourceforge.net/download/%{name}-%{version}-src.tar.xz -Source1: https://github.com/upx/upx-lzma-sdk/archive/v%{version}/upx-lzma-sdk-%{version}.tar.gz -Patch0: upx-whitespace.patch -Patch1: upx-nohtml.patch -Patch2: dadfd43ecb9909b0fab18e77753953a91322c628.patch -Patch3: 2fcaa16c13eda34307ccceea2263e474c54ee075.patch -Patch4: 3781df9da23840e596d5e9e8493f22666802fe6c.patch -Patch5: 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch - -BuildRequires: make -BuildRequires: gcc-c++ -BuildRequires: ucl-devel >= 1.01 -BuildRequires: zlib-devel -BuildRequires: perl-podlators - -%description -UPX is a free, portable, extendable, high-performance executable -packer for several different executable formats. It achieves an -excellent compression ratio and offers very fast decompression. Your -executables suffer no memory overhead or other drawbacks. - - -%prep -%setup -qn %{name}-%{version}-src -sed -i -e 's/ -O2/ /' -e 's/ -Werror//' src/Makefile - -tar xfz %{SOURCE1} --strip-components=1 -C src/lzma-sdk/ - -%patch0 -p0 -%patch1 -p0 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 - -%build -export CXX="g++" -export CXXFLAGS="$RPM_OPT_FLAGS" # export, not to make so it won't trump all -export UPX_LUADIR=/usr/include -export UPX_UCLDIR=/usr/include/ucl -make %{?_smp_mflags} -C src -make -C doc - - -%install -install -Dpm 644 doc/upx.1 $RPM_BUILD_ROOT%{_mandir}/man1/upx.1 -install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx - - -%files -%license COPYING LICENSE -%doc BUGS NEWS PROJECTS README README.1ST THANKS -%{_bindir}/upx -%{_mandir}/man1/upx.1* - - -%changelog -* Sat Jul 23 2022 Fedora Release Engineering - 3.96-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 3.96-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 3.96-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue May 18 2021 Gwyn Ciesla - 3.96-9 -- Patch for CVE-2020-24119 - -* Thu Mar 11 2021 Gwyn Ciesla - 3.96-8 -- Patch for CVE-2021-20285 - -* Wed Jan 27 2021 Fedora Release Engineering - 3.96-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Aug 10 2020 Gwyn Ciesla - 3.96-6 -- Make PE load config directory address dword aligned - -* Wed Jul 29 2020 Fedora Release Engineering - 3.96-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Apr 20 2020 Gwyn Ciesla - 3.96-4 -- Patch for segfault using preserve-build-id. - -* Fri Jan 31 2020 Fedora Release Engineering - 3.96-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jan 24 2020 Gwyn Ciesla - 3.96-2 -- EVR bump for koji issue. - -* Fri Jan 24 2020 Gwyn Ciesla - 3.96-1 -- 3.96 - -* Fri Jan 17 2020 Gwyn Ciesla - 3.95-5 -- Upstream patch for CVE-2019-20021 - -* Thu Aug 01 2019 Gwyn Ciesla - 3.95-4 -- Upstream patches for CVE-2019-14295 and CVE-2019-14296. - -* Sat Jul 27 2019 Fedora Release Engineering - 3.95-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 03 2019 Fedora Release Engineering - 3.95-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Mon Aug 27 2018 Gwyn Ciesla - 3.95-1 -- 3.95. -- Switch to upstream's lzma fork. - -* Sat Jul 14 2018 Fedora Release Engineering - 3.94-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Feb 09 2018 Fedora Release Engineering - 3.94-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Oct 10 2017 Gwyn Ciesla - 3.94-1 -- 3.94, plus patch for CVE-2017-15056. - -* Thu Aug 03 2017 Fedora Release Engineering - 3.93-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 3.93-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Thu Mar 30 2017 Gwyn Ciesla - 3.93-1 -- Latest upstream, fix for BZ 1429197. - -* Sat Feb 11 2017 Fedora Release Engineering - 3.91-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Feb 05 2016 Fedora Release Engineering - 3.91-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Fri Jun 19 2015 Fedora Release Engineering - 3.91-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat May 02 2015 Kalev Lember - 3.91-5 -- Rebuilt for GCC 5 C++11 ABI change - -* Thu Oct 16 2014 Jon Ciesla - 3.91-4 -- Fix FTBFS. - -* Mon Aug 18 2014 Fedora Release Engineering - 3.91-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sun Jun 08 2014 Fedora Release Engineering - 3.91-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Mon Oct 28 2013 Jon Ciesla - 3.91-1 -- New upstream, BZ 1023719. -- Fix bad changelog date. - -* Sun Aug 04 2013 Fedora Release Engineering - 3.09-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Mon Mar 18 2013 Jon Ciesla - 3.09-1 -- New upstream. - -* Fri Feb 15 2013 Fedora Release Engineering - 3.08-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Sun Jul 22 2012 Fedora Release Engineering - 3.08-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Jan 27 2012 Jon Ciesla - 3.08-1 -- New upstream. - -* Sat Jan 14 2012 Fedora Release Engineering - 3.07-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Aug 09 2011 Tom Callaway - 3.07-3 -- use lzma-sdk system library/headers - -* Mon Feb 07 2011 Fedora Release Engineering - 3.07-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Mon Oct 18 2010 Jon Ciesla - 3.07-1 -- New upstream. - -* Fri Jan 08 2010 Jon Ciesla - 3.04-2 -- LZMA fixes by John Reiser (jreiser@bitwagon.com) BZ 501636. - -* Mon Nov 16 2009 Jon Ciesla - 3.04-1 -- 3.04. -- Stict prototype patch upstreamed. - -* Sun Jul 26 2009 Fedora Release Engineering - 3.03-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Fri Feb 27 2009 Jon Ciesla - 3.03-3 -- Patch for stricter glibc. - -* Wed Feb 25 2009 Fedora Release Engineering - 3.03-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Thu May 08 2008 Jon Ciesla - 3.03-1 -- 3.03. - -* Fri Feb 08 2008 Jon Ciesla - 3.02-2 -- GCC 4.3 rebuild. - -* Mon Dec 31 2007 Jon Ciesla - 3.02-1 -- 3.02. - -* Thu Aug 16 2007 Jon Ciesla - 3.01-2 -- License tag correction. - -* Mon Aug 06 2007 Jon Ciesla - 3.01-1 -- 3.01. - -* Sun May 13 2007 Ville Skyttä - 3.00-1 -- 3.00. - -* Wed Apr 4 2007 Ville Skyttä - 2.03-1 -- 2.03. - -* Wed Aug 30 2006 Ville Skyttä - 2.02-1 -- 2.02. - -* Tue May 16 2006 Ville Skyttä - 2.00-2 -- BR: zlib-devel. - -* Tue May 16 2006 Ville Skyttä - 2.00-1 -- 2.00. - -* Wed Feb 15 2006 Ville Skyttä - 1.25-5 -- Rebuild. - -* Thu May 19 2005 Ville Skyttä - 1.25-4 -- Rebuild. - -* Fri Apr 8 2005 Michael Schwendt - 1.25-3 -- rebuilt - -* Fri Dec 17 2004 Ville Skyttä - 0:1.25-2 -- Let rpmbuild take care of stripping binaries. -- Honor build environment settings better. - -* Thu Jul 1 2004 Ville Skyttä - 0:1.25-0.fdr.1 -- Update to 1.25. - -* Mon May 3 2004 Ville Skyttä - 0:1.24-0.fdr.3 -- Add workaround for building with UCL 1.02, thanks to upstream. - -* Sun Nov 16 2003 Ville Skyttä - 0:1.24-0.fdr.2 -- Spec cleanup. - -* Sat Jul 26 2003 Ville Skyttä - 0:1.24-0.fdr.1 -- First build. From 69f9a8a9cdce7a815e44932a1f2bd63076098c8f Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Fri, 4 Nov 2022 14:38:48 -0500 Subject: [PATCH 10/39] Revert "Licensing issues, see BZ 2133058" This reverts commit cb1480fa2291e8144c15ba1491c73433b08a5006. --- .gitignore | 13 + ...a16c13eda34307ccceea2263e474c54ee075.patch | 22 ++ ...df9da23840e596d5e9e8493f22666802fe6c.patch | 76 ++++++ ...3e5cfdc12da94c251b2cd83bb01c7d9f616c.patch | 34 +++ ...d43ecb9909b0fab18e77753953a91322c628.patch | 127 +++++++++ dead.package | 1 - sources | 2 + upx-nohtml.patch | 52 ++++ upx-whitespace.patch | 11 + upx.spec | 256 ++++++++++++++++++ 10 files changed, 593 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 2fcaa16c13eda34307ccceea2263e474c54ee075.patch create mode 100644 3781df9da23840e596d5e9e8493f22666802fe6c.patch create mode 100644 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch create mode 100644 dadfd43ecb9909b0fab18e77753953a91322c628.patch delete mode 100644 dead.package create mode 100644 sources create mode 100644 upx-nohtml.patch create mode 100644 upx-whitespace.patch create mode 100644 upx.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..954d913 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +upx-3.04-src.tar.bz2 +lzma465.tar.bz2 +/upx-3.07-src.tar.bz2 +/lzma465.tar.bz2 +/upx-3.08-src.tar.bz2 +/upx-3.09-src.tar.bz2 +/upx-3.91-src.tar.bz2 +/upx-3.93-src.tar.xz +/upx-3.94-src.tar.xz +/upx-3.95.tar.gz +/upx-lzma-sdk-3.95.tar.gz +/upx-3.96-src.tar.xz +/upx-lzma-sdk-3.96.tar.gz diff --git a/2fcaa16c13eda34307ccceea2263e474c54ee075.patch b/2fcaa16c13eda34307ccceea2263e474c54ee075.patch new file mode 100644 index 0000000..30a7615 --- /dev/null +++ b/2fcaa16c13eda34307ccceea2263e474c54ee075.patch @@ -0,0 +1,22 @@ +From 2fcaa16c13eda34307ccceea2263e474c54ee075 Mon Sep 17 00:00:00 2001 +From: Mattiwatti +Date: Tue, 21 Jan 2020 16:03:40 +0100 +Subject: [PATCH] Make PE load config directory address dword aligned + +--- + src/pefile.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pefile.cpp b/src/pefile.cpp +index 7bf66cbe..d957886f 100644 +--- a/src/pefile.cpp ++++ b/src/pefile.cpp +@@ -2427,7 +2427,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, + processTls(&rel,&tlsiv,ic); + ODADDR(PEDIR_TLS) = sotls ? ic : 0; + ODSIZE(PEDIR_TLS) = sotls ? (sizeof(LEXX) == 4 ? 0x18 : 0x28) : 0; +- ic += sotls; ++ ic = ALIGN_UP(ic + sotls, 4u); + + processLoadConf(&rel, &loadconfiv, ic); + ODADDR(PEDIR_LOADCONF) = soloadconf ? ic : 0; diff --git a/3781df9da23840e596d5e9e8493f22666802fe6c.patch b/3781df9da23840e596d5e9e8493f22666802fe6c.patch new file mode 100644 index 0000000..1d47b2a --- /dev/null +++ b/3781df9da23840e596d5e9e8493f22666802fe6c.patch @@ -0,0 +1,76 @@ +From 3781df9da23840e596d5e9e8493f22666802fe6c Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Fri, 11 Dec 2020 13:38:18 -0800 +Subject: [PATCH] Check DT_REL/DT_RELA, DT_RELSZ/DT_RELASZ + +https://github.com/upx/upx/issues/421 + modified: p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 34 +++++++++++++++++++++++++++++----- + 1 file changed, 29 insertions(+), 5 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index 182db192..3a4101cf 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -2222,8 +2222,20 @@ bool PackLinuxElf32::canPack() + int z_rsz = dt_table[Elf32_Dyn::DT_RELSZ]; + if (z_rel && z_rsz) { + unsigned rel_off = get_te32(&dynseg[-1+ z_rel].d_val); ++ if ((unsigned)file_size <= rel_off) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf32_Dynamic[DT_REL] %#x\n", ++ rel_off); ++ throwCantPack(msg); ++ } + Elf32_Rel *rp = (Elf32_Rel *)&file_image[rel_off]; + unsigned relsz = get_te32(&dynseg[-1+ z_rsz].d_val); ++ if ((unsigned)file_size <= relsz) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf32_Dynamic[DT_RELSZ] %#x\n", ++ relsz); ++ throwCantPack(msg); ++ } + Elf32_Rel *last = (Elf32_Rel *)(relsz + (char *)rp); + for (; rp < last; ++rp) { + unsigned r_va = get_te32(&rp->r_offset); +@@ -2562,14 +2574,26 @@ PackLinuxElf64::canPack() + int z_rel = dt_table[Elf64_Dyn::DT_RELA]; + int z_rsz = dt_table[Elf64_Dyn::DT_RELASZ]; + if (z_rel && z_rsz) { +- unsigned rel_off = get_te64(&dynseg[-1+ z_rel].d_val); ++ upx_uint64_t rel_off = get_te64(&dynseg[-1+ z_rel].d_val); ++ if ((u64_t)file_size <= rel_off) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf64_Dynamic[DT_RELA] %#llx\n", ++ rel_off); ++ throwCantPack(msg); ++ } + Elf64_Rela *rp = (Elf64_Rela *)&file_image[rel_off]; +- unsigned relsz = get_te64(&dynseg[-1+ z_rsz].d_val); ++ upx_uint64_t relsz = get_te64(&dynseg[-1+ z_rsz].d_val); ++ if ((u64_t)file_size <= relsz) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf64_Dynamic[DT_RELASZ] %#llx\n", ++ relsz); ++ throwCantPack(msg); ++ } + Elf64_Rela *last = (Elf64_Rela *)(relsz + (char *)rp); + for (; rp < last; ++rp) { +- unsigned r_va = get_te64(&rp->r_offset); ++ upx_uint64_t r_va = get_te64(&rp->r_offset); + if (r_va == user_init_ava) { // found the Elf64_Rela +- unsigned r_info = get_te64(&rp->r_info); ++ upx_uint64_t r_info = get_te64(&rp->r_info); + unsigned r_type = ELF64_R_TYPE(r_info); + if (Elf64_Ehdr::EM_AARCH64 == e_machine + && R_AARCH64_RELATIVE == r_type) { +@@ -2581,7 +2605,7 @@ PackLinuxElf64::canPack() + } + else { + char msg[50]; snprintf(msg, sizeof(msg), +- "bad relocation %#x DT_INIT_ARRAY[0]", ++ "bad relocation %#llx DT_INIT_ARRAY[0]", + r_info); + throwCantPack(msg); + } diff --git a/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch b/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch new file mode 100644 index 0000000..7e6de04 --- /dev/null +++ b/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch @@ -0,0 +1,34 @@ +From 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Wed, 22 Jul 2020 19:34:27 -0700 +Subject: [PATCH] Unpack: Phdrs must be within expansion of first compressed + block + +https://github.com/upx/upx/issues/388 + modified: p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index cd9e4ec97..453d5c457 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -4550,7 +4550,7 @@ void PackLinuxElf64::unpack(OutputFile *fo) + unsigned c_adler = upx_adler32(NULL, 0); + unsigned u_adler = upx_adler32(NULL, 0); + #define MAX_ELF_HDR 1024 +- if ((MAX_ELF_HDR - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { ++ if ((umin64(MAX_ELF_HDR, ph.u_len) - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { + throwCantUnpack("bad compressed e_phnum"); + } + #undef MAX_ELF_HDR +@@ -5617,7 +5617,7 @@ void PackLinuxElf32::unpack(OutputFile *fo) + unsigned c_adler = upx_adler32(NULL, 0); + unsigned u_adler = upx_adler32(NULL, 0); + #define MAX_ELF_HDR 512 +- if ((MAX_ELF_HDR - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { ++ if ((umin(MAX_ELF_HDR, ph.u_len) - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { + throwCantUnpack("bad compressed e_phnum"); + } + #undef MAX_ELF_HDR diff --git a/dadfd43ecb9909b0fab18e77753953a91322c628.patch b/dadfd43ecb9909b0fab18e77753953a91322c628.patch new file mode 100644 index 0000000..1143325 --- /dev/null +++ b/dadfd43ecb9909b0fab18e77753953a91322c628.patch @@ -0,0 +1,127 @@ +From dadfd43ecb9909b0fab18e77753953a91322c628 Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Fri, 17 Apr 2020 16:17:29 -0700 +Subject: [PATCH] --preserve-build-id for ET_EXEC + +https://github.com/upx/upx/issues/371 + modified: p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 50 +++++++++++++++++++++++++++++++----------------- + 1 file changed, 32 insertions(+), 18 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index 6b5b4295..725f68f4 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -3386,26 +3386,33 @@ void PackLinuxElf32::pack1(OutputFile *fo, Filter & /*ft*/) + if (opt->o_unix.preserve_build_id) { + // set this so we can use elf_find_section_name + e_shnum = get_te16(&ehdri.e_shnum); ++ MemBuffer mb_shdri; + if (!shdri) { +- shdri = (Elf32_Shdr *)&file_image[get_te32(&ehdri.e_shoff)]; ++ mb_shdri.alloc(e_shnum * sizeof(Elf32_Shdr)); ++ shdri = (Elf32_Shdr *)mb_shdri.getVoidPtr(); ++ e_shoff = get_te32(&ehdri.e_shoff); ++ fi->seek(e_shoff, SEEK_SET); ++ fi->readx(shdri, e_shnum * sizeof(Elf32_Shdr)); + } + //set the shstrtab + sec_strndx = &shdri[get_te16(&ehdri.e_shstrndx)]; + +- char *strtab = New(char, sec_strndx->sh_size); ++ unsigned sh_size = get_te32(&sec_strndx->sh_size); ++ char *strtab = New(char, sh_size); + fi->seek(0,SEEK_SET); + fi->seek(sec_strndx->sh_offset,SEEK_SET); +- fi->readx(strtab,sec_strndx->sh_size); ++ fi->readx(strtab, sh_size); + + shstrtab = (const char*)strtab; + + Elf32_Shdr const *buildid = elf_find_section_name(".note.gnu.build-id"); + if (buildid) { +- unsigned char *data = New(unsigned char, buildid->sh_size); +- memset(data,0,buildid->sh_size); ++ unsigned bid_sh_size = get_te32(&buildid->sh_size); ++ unsigned char *data = New(unsigned char, bid_sh_size); ++ memset(data,0,bid_sh_size); + fi->seek(0,SEEK_SET); + fi->seek(buildid->sh_offset,SEEK_SET); +- fi->readx(data,buildid->sh_size); ++ fi->readx(data, bid_sh_size); + + buildid_data = data; + +@@ -3414,12 +3421,12 @@ void PackLinuxElf32::pack1(OutputFile *fo, Filter & /*ft*/) + + //setup the build-id + memcpy(&shdrout.shdr[1], buildid, sizeof(shdrout.shdr[1])); +- shdrout.shdr[1].sh_name = 1; ++ set_te32(&shdrout.shdr[1].sh_name, 1); + + //setup the shstrtab + memcpy(&shdrout.shdr[2], sec_strndx, sizeof(shdrout.shdr[2])); +- shdrout.shdr[2].sh_name = 20; +- shdrout.shdr[2].sh_size = 29; //size of our static shstrtab ++ set_te32(&shdrout.shdr[2].sh_name, 20); ++ set_te32(&shdrout.shdr[2].sh_size, 29); //size of our static shstrtab + } + } + } +@@ -3790,26 +3797,33 @@ void PackLinuxElf64::pack1(OutputFile *fo, Filter & /*ft*/) + if (opt->o_unix.preserve_build_id) { + // set this so we can use elf_find_section_name + e_shnum = get_te16(&ehdri.e_shnum); ++ MemBuffer mb_shdri; + if (!shdri) { +- shdri = (Elf64_Shdr *)&file_image[get_te32(&ehdri.e_shoff)]; ++ mb_shdri.alloc(e_shnum * sizeof(Elf64_Shdr)); ++ shdri = (Elf64_Shdr *)mb_shdri.getVoidPtr(); ++ e_shoff = get_te64(&ehdri.e_shoff); ++ fi->seek(e_shoff, SEEK_SET); ++ fi->readx(shdri, e_shnum * sizeof(Elf64_Shdr)); + } + //set the shstrtab + sec_strndx = &shdri[get_te16(&ehdri.e_shstrndx)]; + +- char *strtab = New(char, sec_strndx->sh_size); ++ upx_uint64_t sh_size = get_te64(&sec_strndx->sh_size); ++ char *strtab = New(char, sh_size); + fi->seek(0,SEEK_SET); + fi->seek(sec_strndx->sh_offset,SEEK_SET); +- fi->readx(strtab,sec_strndx->sh_size); ++ fi->readx(strtab, sh_size); + + shstrtab = (const char*)strtab; + + Elf64_Shdr const *buildid = elf_find_section_name(".note.gnu.build-id"); + if (buildid) { +- unsigned char *data = New(unsigned char, buildid->sh_size); +- memset(data,0,buildid->sh_size); ++ unsigned bid_sh_size = get_te32(&buildid->sh_size); ++ unsigned char *data = New(unsigned char, bid_sh_size); ++ memset(data,0,bid_sh_size); + fi->seek(0,SEEK_SET); + fi->seek(buildid->sh_offset,SEEK_SET); +- fi->readx(data,buildid->sh_size); ++ fi->readx(data,bid_sh_size); + + buildid_data = data; + +@@ -3818,12 +3832,12 @@ void PackLinuxElf64::pack1(OutputFile *fo, Filter & /*ft*/) + + //setup the build-id + memcpy(&shdrout.shdr[1], buildid, sizeof(shdrout.shdr[1])); +- shdrout.shdr[1].sh_name = 1; ++ set_te32(&shdrout.shdr[1].sh_name, 1); + + //setup the shstrtab + memcpy(&shdrout.shdr[2], sec_strndx, sizeof(shdrout.shdr[2])); +- shdrout.shdr[2].sh_name = 20; +- shdrout.shdr[2].sh_size = 29; //size of our static shstrtab ++ set_te32(&shdrout.shdr[2].sh_name, 20); ++ set_te32(&shdrout.shdr[2].sh_size, 29); //size of our static shstrtab + } + } + } diff --git a/dead.package b/dead.package deleted file mode 100644 index b31a40c..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Licensing issues, see BZ 2133058 diff --git a/sources b/sources new file mode 100644 index 0000000..96ff364 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (upx-3.96-src.tar.xz) = 2d4d1be21d274d9bfdee9b9815396f5e5ff0bcdfb781b7be5fafa4d1e224028e412ec5f5ba607c482671aae27ccf9069abb2db0fb58f78f3a102a51897df2b11 +SHA512 (upx-lzma-sdk-3.96.tar.gz) = 9690a1dfabf8bcb161b26761556a390aa354b633914254b29e36246fe11f9c3e905dafa916d0d52300bd418e2bddedd4122027e447fc87183bce4479e771c7df diff --git a/upx-nohtml.patch b/upx-nohtml.patch new file mode 100644 index 0000000..b50f935 --- /dev/null +++ b/upx-nohtml.patch @@ -0,0 +1,52 @@ +*** doc/Makefile~ 2018-08-25 21:58:09.000000000 -0500 +--- doc/Makefile 2018-08-27 10:24:23.304422432 -0500 +*************** +*** 26,33 **** + RTRIM := sed -e 's/[ $(tab)]*$$//' + DETAB2 := sed -e 's/$(tab)/ /g' + +! BUILT_SOURCES = upx.1 upx.doc upx.html upx.man upx.ps upx.tex +! BUILT_SOURCES = upx.1 upx.doc upx.html + + + ### +--- 26,33 ---- + RTRIM := sed -e 's/[ $(tab)]*$$//' + DETAB2 := sed -e 's/$(tab)/ /g' + +! BUILT_SOURCES = upx.1 upx.doc upx.man upx.ps upx.tex +! BUILT_SOURCES = upx.1 upx.doc + + + ### +*************** +*** 46,52 **** + ### rules + ### + +! .SUFFIXES: .1 .doc .html .man .pod .ps .tex + + %.1 : %.pod + pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@ +--- 46,52 ---- + ### rules + ### + +! .SUFFIXES: .1 .doc .man .pod .ps .tex + + %.1 : %.pod + pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@ +*************** +*** 56,66 **** + pod2text < $< | $(RTRIM) > $@ + test -s $@ + +- %.html : %.pod +- pod2html --noindex $< | $(RTRIM) | $(DETAB2) > $@ +- @rm -f pod2htm* +- test -s $@ +- + %.man : %.1 + nroff -man $< | $(RTRIM) > $@ + test -s $@ +--- 56,61 ---- diff --git a/upx-whitespace.patch b/upx-whitespace.patch new file mode 100644 index 0000000..9657b2b --- /dev/null +++ b/upx-whitespace.patch @@ -0,0 +1,11 @@ +--- src/Makefile~ 2017-01-29 10:53:00.000000000 -0600 ++++ src/Makefile 2017-03-30 10:03:12.447172055 -0500 +@@ -86,7 +86,7 @@ + $($(notdir $@).PRE_LINK_STEP) + $(strip $(CXXLD) $(call ee,CXXFLAGS) $(call ee,LDFLAGS) -o $@ $(upx_OBJECTS) $(call ee,LDADD) $(call ee,LIBS)) + $($(notdir $@).POST_LINK_STEP) +- $(CHECK_WHITESPACE) ++# $(CHECK_WHITESPACE) + + %.o : %.cpp | ./.depend + $(strip $(CXX) $(call ee,CPPFLAGS) $(call ee,CXXFLAGS) -o $@ -c $<) diff --git a/upx.spec b/upx.spec new file mode 100644 index 0000000..b263122 --- /dev/null +++ b/upx.spec @@ -0,0 +1,256 @@ +Name: upx +Version: 3.96 +Release: 12%{?dist} +Summary: Ultimate Packer for eXecutables + +License: GPLv2+ and Public Domain +URL: http://upx.sourceforge.net/ +Source0: http://upx.sourceforge.net/download/%{name}-%{version}-src.tar.xz +Source1: https://github.com/upx/upx-lzma-sdk/archive/v%{version}/upx-lzma-sdk-%{version}.tar.gz +Patch0: upx-whitespace.patch +Patch1: upx-nohtml.patch +Patch2: dadfd43ecb9909b0fab18e77753953a91322c628.patch +Patch3: 2fcaa16c13eda34307ccceea2263e474c54ee075.patch +Patch4: 3781df9da23840e596d5e9e8493f22666802fe6c.patch +Patch5: 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch + +BuildRequires: make +BuildRequires: gcc-c++ +BuildRequires: ucl-devel >= 1.01 +BuildRequires: zlib-devel +BuildRequires: perl-podlators + +%description +UPX is a free, portable, extendable, high-performance executable +packer for several different executable formats. It achieves an +excellent compression ratio and offers very fast decompression. Your +executables suffer no memory overhead or other drawbacks. + + +%prep +%setup -qn %{name}-%{version}-src +sed -i -e 's/ -O2/ /' -e 's/ -Werror//' src/Makefile + +tar xfz %{SOURCE1} --strip-components=1 -C src/lzma-sdk/ + +%patch0 -p0 +%patch1 -p0 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +%build +export CXX="g++" +export CXXFLAGS="$RPM_OPT_FLAGS" # export, not to make so it won't trump all +export UPX_LUADIR=/usr/include +export UPX_UCLDIR=/usr/include/ucl +make %{?_smp_mflags} -C src +make -C doc + + +%install +install -Dpm 644 doc/upx.1 $RPM_BUILD_ROOT%{_mandir}/man1/upx.1 +install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx + + +%files +%license COPYING LICENSE +%doc BUGS NEWS PROJECTS README README.1ST THANKS +%{_bindir}/upx +%{_mandir}/man1/upx.1* + + +%changelog +* Sat Jul 23 2022 Fedora Release Engineering - 3.96-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 3.96-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.96-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue May 18 2021 Gwyn Ciesla - 3.96-9 +- Patch for CVE-2020-24119 + +* Thu Mar 11 2021 Gwyn Ciesla - 3.96-8 +- Patch for CVE-2021-20285 + +* Wed Jan 27 2021 Fedora Release Engineering - 3.96-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Aug 10 2020 Gwyn Ciesla - 3.96-6 +- Make PE load config directory address dword aligned + +* Wed Jul 29 2020 Fedora Release Engineering - 3.96-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Apr 20 2020 Gwyn Ciesla - 3.96-4 +- Patch for segfault using preserve-build-id. + +* Fri Jan 31 2020 Fedora Release Engineering - 3.96-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jan 24 2020 Gwyn Ciesla - 3.96-2 +- EVR bump for koji issue. + +* Fri Jan 24 2020 Gwyn Ciesla - 3.96-1 +- 3.96 + +* Fri Jan 17 2020 Gwyn Ciesla - 3.95-5 +- Upstream patch for CVE-2019-20021 + +* Thu Aug 01 2019 Gwyn Ciesla - 3.95-4 +- Upstream patches for CVE-2019-14295 and CVE-2019-14296. + +* Sat Jul 27 2019 Fedora Release Engineering - 3.95-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 3.95-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Aug 27 2018 Gwyn Ciesla - 3.95-1 +- 3.95. +- Switch to upstream's lzma fork. + +* Sat Jul 14 2018 Fedora Release Engineering - 3.94-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 3.94-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Oct 10 2017 Gwyn Ciesla - 3.94-1 +- 3.94, plus patch for CVE-2017-15056. + +* Thu Aug 03 2017 Fedora Release Engineering - 3.93-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 3.93-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Mar 30 2017 Gwyn Ciesla - 3.93-1 +- Latest upstream, fix for BZ 1429197. + +* Sat Feb 11 2017 Fedora Release Engineering - 3.91-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 05 2016 Fedora Release Engineering - 3.91-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 3.91-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 3.91-5 +- Rebuilt for GCC 5 C++11 ABI change + +* Thu Oct 16 2014 Jon Ciesla - 3.91-4 +- Fix FTBFS. + +* Mon Aug 18 2014 Fedora Release Engineering - 3.91-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 3.91-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Oct 28 2013 Jon Ciesla - 3.91-1 +- New upstream, BZ 1023719. +- Fix bad changelog date. + +* Sun Aug 04 2013 Fedora Release Engineering - 3.09-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Mar 18 2013 Jon Ciesla - 3.09-1 +- New upstream. + +* Fri Feb 15 2013 Fedora Release Engineering - 3.08-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Fedora Release Engineering - 3.08-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 27 2012 Jon Ciesla - 3.08-1 +- New upstream. + +* Sat Jan 14 2012 Fedora Release Engineering - 3.07-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Aug 09 2011 Tom Callaway - 3.07-3 +- use lzma-sdk system library/headers + +* Mon Feb 07 2011 Fedora Release Engineering - 3.07-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Oct 18 2010 Jon Ciesla - 3.07-1 +- New upstream. + +* Fri Jan 08 2010 Jon Ciesla - 3.04-2 +- LZMA fixes by John Reiser (jreiser@bitwagon.com) BZ 501636. + +* Mon Nov 16 2009 Jon Ciesla - 3.04-1 +- 3.04. +- Stict prototype patch upstreamed. + +* Sun Jul 26 2009 Fedora Release Engineering - 3.03-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Feb 27 2009 Jon Ciesla - 3.03-3 +- Patch for stricter glibc. + +* Wed Feb 25 2009 Fedora Release Engineering - 3.03-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu May 08 2008 Jon Ciesla - 3.03-1 +- 3.03. + +* Fri Feb 08 2008 Jon Ciesla - 3.02-2 +- GCC 4.3 rebuild. + +* Mon Dec 31 2007 Jon Ciesla - 3.02-1 +- 3.02. + +* Thu Aug 16 2007 Jon Ciesla - 3.01-2 +- License tag correction. + +* Mon Aug 06 2007 Jon Ciesla - 3.01-1 +- 3.01. + +* Sun May 13 2007 Ville Skyttä - 3.00-1 +- 3.00. + +* Wed Apr 4 2007 Ville Skyttä - 2.03-1 +- 2.03. + +* Wed Aug 30 2006 Ville Skyttä - 2.02-1 +- 2.02. + +* Tue May 16 2006 Ville Skyttä - 2.00-2 +- BR: zlib-devel. + +* Tue May 16 2006 Ville Skyttä - 2.00-1 +- 2.00. + +* Wed Feb 15 2006 Ville Skyttä - 1.25-5 +- Rebuild. + +* Thu May 19 2005 Ville Skyttä - 1.25-4 +- Rebuild. + +* Fri Apr 8 2005 Michael Schwendt - 1.25-3 +- rebuilt + +* Fri Dec 17 2004 Ville Skyttä - 0:1.25-2 +- Let rpmbuild take care of stripping binaries. +- Honor build environment settings better. + +* Thu Jul 1 2004 Ville Skyttä - 0:1.25-0.fdr.1 +- Update to 1.25. + +* Mon May 3 2004 Ville Skyttä - 0:1.24-0.fdr.3 +- Add workaround for building with UCL 1.02, thanks to upstream. + +* Sun Nov 16 2003 Ville Skyttä - 0:1.24-0.fdr.2 +- Spec cleanup. + +* Sat Jul 26 2003 Ville Skyttä - 0:1.24-0.fdr.1 +- First build. From bab2fec603b29918ed90cd939635a7f000022206 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Fri, 4 Nov 2022 15:35:32 -0500 Subject: [PATCH 11/39] 4.0.0 --- .gitignore | 1 + ...a16c13eda34307ccceea2263e474c54ee075.patch | 22 --- ...df9da23840e596d5e9e8493f22666802fe6c.patch | 76 ----------- ...3e5cfdc12da94c251b2cd83bb01c7d9f616c.patch | 34 ----- ...d43ecb9909b0fab18e77753953a91322c628.patch | 127 ------------------ sources | 3 +- upx-nohtml.patch | 52 ------- upx-whitespace.patch | 11 -- upx.spec | 47 +++---- 9 files changed, 17 insertions(+), 356 deletions(-) delete mode 100644 2fcaa16c13eda34307ccceea2263e474c54ee075.patch delete mode 100644 3781df9da23840e596d5e9e8493f22666802fe6c.patch delete mode 100644 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch delete mode 100644 dadfd43ecb9909b0fab18e77753953a91322c628.patch delete mode 100644 upx-nohtml.patch delete mode 100644 upx-whitespace.patch diff --git a/.gitignore b/.gitignore index 954d913..16b1e9e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ lzma465.tar.bz2 /upx-lzma-sdk-3.95.tar.gz /upx-3.96-src.tar.xz /upx-lzma-sdk-3.96.tar.gz +/upx-4.0.0-src.tar.xz diff --git a/2fcaa16c13eda34307ccceea2263e474c54ee075.patch b/2fcaa16c13eda34307ccceea2263e474c54ee075.patch deleted file mode 100644 index 30a7615..0000000 --- a/2fcaa16c13eda34307ccceea2263e474c54ee075.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 2fcaa16c13eda34307ccceea2263e474c54ee075 Mon Sep 17 00:00:00 2001 -From: Mattiwatti -Date: Tue, 21 Jan 2020 16:03:40 +0100 -Subject: [PATCH] Make PE load config directory address dword aligned - ---- - src/pefile.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/pefile.cpp b/src/pefile.cpp -index 7bf66cbe..d957886f 100644 ---- a/src/pefile.cpp -+++ b/src/pefile.cpp -@@ -2427,7 +2427,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, - processTls(&rel,&tlsiv,ic); - ODADDR(PEDIR_TLS) = sotls ? ic : 0; - ODSIZE(PEDIR_TLS) = sotls ? (sizeof(LEXX) == 4 ? 0x18 : 0x28) : 0; -- ic += sotls; -+ ic = ALIGN_UP(ic + sotls, 4u); - - processLoadConf(&rel, &loadconfiv, ic); - ODADDR(PEDIR_LOADCONF) = soloadconf ? ic : 0; diff --git a/3781df9da23840e596d5e9e8493f22666802fe6c.patch b/3781df9da23840e596d5e9e8493f22666802fe6c.patch deleted file mode 100644 index 1d47b2a..0000000 --- a/3781df9da23840e596d5e9e8493f22666802fe6c.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 3781df9da23840e596d5e9e8493f22666802fe6c Mon Sep 17 00:00:00 2001 -From: John Reiser -Date: Fri, 11 Dec 2020 13:38:18 -0800 -Subject: [PATCH] Check DT_REL/DT_RELA, DT_RELSZ/DT_RELASZ - -https://github.com/upx/upx/issues/421 - modified: p_lx_elf.cpp ---- - src/p_lx_elf.cpp | 34 +++++++++++++++++++++++++++++----- - 1 file changed, 29 insertions(+), 5 deletions(-) - -diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp -index 182db192..3a4101cf 100644 ---- a/src/p_lx_elf.cpp -+++ b/src/p_lx_elf.cpp -@@ -2222,8 +2222,20 @@ bool PackLinuxElf32::canPack() - int z_rsz = dt_table[Elf32_Dyn::DT_RELSZ]; - if (z_rel && z_rsz) { - unsigned rel_off = get_te32(&dynseg[-1+ z_rel].d_val); -+ if ((unsigned)file_size <= rel_off) { -+ char msg[70]; snprintf(msg, sizeof(msg), -+ "bad Elf32_Dynamic[DT_REL] %#x\n", -+ rel_off); -+ throwCantPack(msg); -+ } - Elf32_Rel *rp = (Elf32_Rel *)&file_image[rel_off]; - unsigned relsz = get_te32(&dynseg[-1+ z_rsz].d_val); -+ if ((unsigned)file_size <= relsz) { -+ char msg[70]; snprintf(msg, sizeof(msg), -+ "bad Elf32_Dynamic[DT_RELSZ] %#x\n", -+ relsz); -+ throwCantPack(msg); -+ } - Elf32_Rel *last = (Elf32_Rel *)(relsz + (char *)rp); - for (; rp < last; ++rp) { - unsigned r_va = get_te32(&rp->r_offset); -@@ -2562,14 +2574,26 @@ PackLinuxElf64::canPack() - int z_rel = dt_table[Elf64_Dyn::DT_RELA]; - int z_rsz = dt_table[Elf64_Dyn::DT_RELASZ]; - if (z_rel && z_rsz) { -- unsigned rel_off = get_te64(&dynseg[-1+ z_rel].d_val); -+ upx_uint64_t rel_off = get_te64(&dynseg[-1+ z_rel].d_val); -+ if ((u64_t)file_size <= rel_off) { -+ char msg[70]; snprintf(msg, sizeof(msg), -+ "bad Elf64_Dynamic[DT_RELA] %#llx\n", -+ rel_off); -+ throwCantPack(msg); -+ } - Elf64_Rela *rp = (Elf64_Rela *)&file_image[rel_off]; -- unsigned relsz = get_te64(&dynseg[-1+ z_rsz].d_val); -+ upx_uint64_t relsz = get_te64(&dynseg[-1+ z_rsz].d_val); -+ if ((u64_t)file_size <= relsz) { -+ char msg[70]; snprintf(msg, sizeof(msg), -+ "bad Elf64_Dynamic[DT_RELASZ] %#llx\n", -+ relsz); -+ throwCantPack(msg); -+ } - Elf64_Rela *last = (Elf64_Rela *)(relsz + (char *)rp); - for (; rp < last; ++rp) { -- unsigned r_va = get_te64(&rp->r_offset); -+ upx_uint64_t r_va = get_te64(&rp->r_offset); - if (r_va == user_init_ava) { // found the Elf64_Rela -- unsigned r_info = get_te64(&rp->r_info); -+ upx_uint64_t r_info = get_te64(&rp->r_info); - unsigned r_type = ELF64_R_TYPE(r_info); - if (Elf64_Ehdr::EM_AARCH64 == e_machine - && R_AARCH64_RELATIVE == r_type) { -@@ -2581,7 +2605,7 @@ PackLinuxElf64::canPack() - } - else { - char msg[50]; snprintf(msg, sizeof(msg), -- "bad relocation %#x DT_INIT_ARRAY[0]", -+ "bad relocation %#llx DT_INIT_ARRAY[0]", - r_info); - throwCantPack(msg); - } diff --git a/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch b/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch deleted file mode 100644 index 7e6de04..0000000 --- a/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c Mon Sep 17 00:00:00 2001 -From: John Reiser -Date: Wed, 22 Jul 2020 19:34:27 -0700 -Subject: [PATCH] Unpack: Phdrs must be within expansion of first compressed - block - -https://github.com/upx/upx/issues/388 - modified: p_lx_elf.cpp ---- - src/p_lx_elf.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp -index cd9e4ec97..453d5c457 100644 ---- a/src/p_lx_elf.cpp -+++ b/src/p_lx_elf.cpp -@@ -4550,7 +4550,7 @@ void PackLinuxElf64::unpack(OutputFile *fo) - unsigned c_adler = upx_adler32(NULL, 0); - unsigned u_adler = upx_adler32(NULL, 0); - #define MAX_ELF_HDR 1024 -- if ((MAX_ELF_HDR - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { -+ if ((umin64(MAX_ELF_HDR, ph.u_len) - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { - throwCantUnpack("bad compressed e_phnum"); - } - #undef MAX_ELF_HDR -@@ -5617,7 +5617,7 @@ void PackLinuxElf32::unpack(OutputFile *fo) - unsigned c_adler = upx_adler32(NULL, 0); - unsigned u_adler = upx_adler32(NULL, 0); - #define MAX_ELF_HDR 512 -- if ((MAX_ELF_HDR - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { -+ if ((umin(MAX_ELF_HDR, ph.u_len) - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { - throwCantUnpack("bad compressed e_phnum"); - } - #undef MAX_ELF_HDR diff --git a/dadfd43ecb9909b0fab18e77753953a91322c628.patch b/dadfd43ecb9909b0fab18e77753953a91322c628.patch deleted file mode 100644 index 1143325..0000000 --- a/dadfd43ecb9909b0fab18e77753953a91322c628.patch +++ /dev/null @@ -1,127 +0,0 @@ -From dadfd43ecb9909b0fab18e77753953a91322c628 Mon Sep 17 00:00:00 2001 -From: John Reiser -Date: Fri, 17 Apr 2020 16:17:29 -0700 -Subject: [PATCH] --preserve-build-id for ET_EXEC - -https://github.com/upx/upx/issues/371 - modified: p_lx_elf.cpp ---- - src/p_lx_elf.cpp | 50 +++++++++++++++++++++++++++++++----------------- - 1 file changed, 32 insertions(+), 18 deletions(-) - -diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp -index 6b5b4295..725f68f4 100644 ---- a/src/p_lx_elf.cpp -+++ b/src/p_lx_elf.cpp -@@ -3386,26 +3386,33 @@ void PackLinuxElf32::pack1(OutputFile *fo, Filter & /*ft*/) - if (opt->o_unix.preserve_build_id) { - // set this so we can use elf_find_section_name - e_shnum = get_te16(&ehdri.e_shnum); -+ MemBuffer mb_shdri; - if (!shdri) { -- shdri = (Elf32_Shdr *)&file_image[get_te32(&ehdri.e_shoff)]; -+ mb_shdri.alloc(e_shnum * sizeof(Elf32_Shdr)); -+ shdri = (Elf32_Shdr *)mb_shdri.getVoidPtr(); -+ e_shoff = get_te32(&ehdri.e_shoff); -+ fi->seek(e_shoff, SEEK_SET); -+ fi->readx(shdri, e_shnum * sizeof(Elf32_Shdr)); - } - //set the shstrtab - sec_strndx = &shdri[get_te16(&ehdri.e_shstrndx)]; - -- char *strtab = New(char, sec_strndx->sh_size); -+ unsigned sh_size = get_te32(&sec_strndx->sh_size); -+ char *strtab = New(char, sh_size); - fi->seek(0,SEEK_SET); - fi->seek(sec_strndx->sh_offset,SEEK_SET); -- fi->readx(strtab,sec_strndx->sh_size); -+ fi->readx(strtab, sh_size); - - shstrtab = (const char*)strtab; - - Elf32_Shdr const *buildid = elf_find_section_name(".note.gnu.build-id"); - if (buildid) { -- unsigned char *data = New(unsigned char, buildid->sh_size); -- memset(data,0,buildid->sh_size); -+ unsigned bid_sh_size = get_te32(&buildid->sh_size); -+ unsigned char *data = New(unsigned char, bid_sh_size); -+ memset(data,0,bid_sh_size); - fi->seek(0,SEEK_SET); - fi->seek(buildid->sh_offset,SEEK_SET); -- fi->readx(data,buildid->sh_size); -+ fi->readx(data, bid_sh_size); - - buildid_data = data; - -@@ -3414,12 +3421,12 @@ void PackLinuxElf32::pack1(OutputFile *fo, Filter & /*ft*/) - - //setup the build-id - memcpy(&shdrout.shdr[1], buildid, sizeof(shdrout.shdr[1])); -- shdrout.shdr[1].sh_name = 1; -+ set_te32(&shdrout.shdr[1].sh_name, 1); - - //setup the shstrtab - memcpy(&shdrout.shdr[2], sec_strndx, sizeof(shdrout.shdr[2])); -- shdrout.shdr[2].sh_name = 20; -- shdrout.shdr[2].sh_size = 29; //size of our static shstrtab -+ set_te32(&shdrout.shdr[2].sh_name, 20); -+ set_te32(&shdrout.shdr[2].sh_size, 29); //size of our static shstrtab - } - } - } -@@ -3790,26 +3797,33 @@ void PackLinuxElf64::pack1(OutputFile *fo, Filter & /*ft*/) - if (opt->o_unix.preserve_build_id) { - // set this so we can use elf_find_section_name - e_shnum = get_te16(&ehdri.e_shnum); -+ MemBuffer mb_shdri; - if (!shdri) { -- shdri = (Elf64_Shdr *)&file_image[get_te32(&ehdri.e_shoff)]; -+ mb_shdri.alloc(e_shnum * sizeof(Elf64_Shdr)); -+ shdri = (Elf64_Shdr *)mb_shdri.getVoidPtr(); -+ e_shoff = get_te64(&ehdri.e_shoff); -+ fi->seek(e_shoff, SEEK_SET); -+ fi->readx(shdri, e_shnum * sizeof(Elf64_Shdr)); - } - //set the shstrtab - sec_strndx = &shdri[get_te16(&ehdri.e_shstrndx)]; - -- char *strtab = New(char, sec_strndx->sh_size); -+ upx_uint64_t sh_size = get_te64(&sec_strndx->sh_size); -+ char *strtab = New(char, sh_size); - fi->seek(0,SEEK_SET); - fi->seek(sec_strndx->sh_offset,SEEK_SET); -- fi->readx(strtab,sec_strndx->sh_size); -+ fi->readx(strtab, sh_size); - - shstrtab = (const char*)strtab; - - Elf64_Shdr const *buildid = elf_find_section_name(".note.gnu.build-id"); - if (buildid) { -- unsigned char *data = New(unsigned char, buildid->sh_size); -- memset(data,0,buildid->sh_size); -+ unsigned bid_sh_size = get_te32(&buildid->sh_size); -+ unsigned char *data = New(unsigned char, bid_sh_size); -+ memset(data,0,bid_sh_size); - fi->seek(0,SEEK_SET); - fi->seek(buildid->sh_offset,SEEK_SET); -- fi->readx(data,buildid->sh_size); -+ fi->readx(data,bid_sh_size); - - buildid_data = data; - -@@ -3818,12 +3832,12 @@ void PackLinuxElf64::pack1(OutputFile *fo, Filter & /*ft*/) - - //setup the build-id - memcpy(&shdrout.shdr[1], buildid, sizeof(shdrout.shdr[1])); -- shdrout.shdr[1].sh_name = 1; -+ set_te32(&shdrout.shdr[1].sh_name, 1); - - //setup the shstrtab - memcpy(&shdrout.shdr[2], sec_strndx, sizeof(shdrout.shdr[2])); -- shdrout.shdr[2].sh_name = 20; -- shdrout.shdr[2].sh_size = 29; //size of our static shstrtab -+ set_te32(&shdrout.shdr[2].sh_name, 20); -+ set_te32(&shdrout.shdr[2].sh_size, 29); //size of our static shstrtab - } - } - } diff --git a/sources b/sources index 96ff364..199bb43 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (upx-3.96-src.tar.xz) = 2d4d1be21d274d9bfdee9b9815396f5e5ff0bcdfb781b7be5fafa4d1e224028e412ec5f5ba607c482671aae27ccf9069abb2db0fb58f78f3a102a51897df2b11 -SHA512 (upx-lzma-sdk-3.96.tar.gz) = 9690a1dfabf8bcb161b26761556a390aa354b633914254b29e36246fe11f9c3e905dafa916d0d52300bd418e2bddedd4122027e447fc87183bce4479e771c7df +SHA512 (upx-4.0.0-src.tar.xz) = fe3e8c594e845a91338b1e11fe3cb6371430af40a567187d63835e27da8b2abf993a104b0693063f4db984234bada7b2bd16ad79e3ad90861a1f495d99de7de6 diff --git a/upx-nohtml.patch b/upx-nohtml.patch deleted file mode 100644 index b50f935..0000000 --- a/upx-nohtml.patch +++ /dev/null @@ -1,52 +0,0 @@ -*** doc/Makefile~ 2018-08-25 21:58:09.000000000 -0500 ---- doc/Makefile 2018-08-27 10:24:23.304422432 -0500 -*************** -*** 26,33 **** - RTRIM := sed -e 's/[ $(tab)]*$$//' - DETAB2 := sed -e 's/$(tab)/ /g' - -! BUILT_SOURCES = upx.1 upx.doc upx.html upx.man upx.ps upx.tex -! BUILT_SOURCES = upx.1 upx.doc upx.html - - - ### ---- 26,33 ---- - RTRIM := sed -e 's/[ $(tab)]*$$//' - DETAB2 := sed -e 's/$(tab)/ /g' - -! BUILT_SOURCES = upx.1 upx.doc upx.man upx.ps upx.tex -! BUILT_SOURCES = upx.1 upx.doc - - - ### -*************** -*** 46,52 **** - ### rules - ### - -! .SUFFIXES: .1 .doc .html .man .pod .ps .tex - - %.1 : %.pod - pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@ ---- 46,52 ---- - ### rules - ### - -! .SUFFIXES: .1 .doc .man .pod .ps .tex - - %.1 : %.pod - pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@ -*************** -*** 56,66 **** - pod2text < $< | $(RTRIM) > $@ - test -s $@ - -- %.html : %.pod -- pod2html --noindex $< | $(RTRIM) | $(DETAB2) > $@ -- @rm -f pod2htm* -- test -s $@ -- - %.man : %.1 - nroff -man $< | $(RTRIM) > $@ - test -s $@ ---- 56,61 ---- diff --git a/upx-whitespace.patch b/upx-whitespace.patch deleted file mode 100644 index 9657b2b..0000000 --- a/upx-whitespace.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/Makefile~ 2017-01-29 10:53:00.000000000 -0600 -+++ src/Makefile 2017-03-30 10:03:12.447172055 -0500 -@@ -86,7 +86,7 @@ - $($(notdir $@).PRE_LINK_STEP) - $(strip $(CXXLD) $(call ee,CXXFLAGS) $(call ee,LDFLAGS) -o $@ $(upx_OBJECTS) $(call ee,LDADD) $(call ee,LIBS)) - $($(notdir $@).POST_LINK_STEP) -- $(CHECK_WHITESPACE) -+# $(CHECK_WHITESPACE) - - %.o : %.cpp | ./.depend - $(strip $(CXX) $(call ee,CPPFLAGS) $(call ee,CXXFLAGS) -o $@ -c $<) diff --git a/upx.spec b/upx.spec index b263122..946d93f 100644 --- a/upx.spec +++ b/upx.spec @@ -1,21 +1,15 @@ Name: upx -Version: 3.96 -Release: 12%{?dist} +Version: 4.0.0 +Release: 1%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain -URL: http://upx.sourceforge.net/ -Source0: http://upx.sourceforge.net/download/%{name}-%{version}-src.tar.xz -Source1: https://github.com/upx/upx-lzma-sdk/archive/v%{version}/upx-lzma-sdk-%{version}.tar.gz -Patch0: upx-whitespace.patch -Patch1: upx-nohtml.patch -Patch2: dadfd43ecb9909b0fab18e77753953a91322c628.patch -Patch3: 2fcaa16c13eda34307ccceea2263e474c54ee075.patch -Patch4: 3781df9da23840e596d5e9e8493f22666802fe6c.patch -Patch5: 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch +URL: https://github.com/upx/upx +Source0: %{url}/releases/download/v%{version}/%{name}-%{version}-src.tar.xz -BuildRequires: make +BuildRequires: make BuildRequires: gcc-c++ +BuildRequires: cmake BuildRequires: ucl-devel >= 1.01 BuildRequires: zlib-devel BuildRequires: perl-podlators @@ -29,39 +23,28 @@ executables suffer no memory overhead or other drawbacks. %prep %setup -qn %{name}-%{version}-src -sed -i -e 's/ -O2/ /' -e 's/ -Werror//' src/Makefile - -tar xfz %{SOURCE1} --strip-components=1 -C src/lzma-sdk/ - -%patch0 -p0 -%patch1 -p0 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 %build -export CXX="g++" -export CXXFLAGS="$RPM_OPT_FLAGS" # export, not to make so it won't trump all -export UPX_LUADIR=/usr/include -export UPX_UCLDIR=/usr/include/ucl -make %{?_smp_mflags} -C src -make -C doc +%cmake +%cmake_build %install -install -Dpm 644 doc/upx.1 $RPM_BUILD_ROOT%{_mandir}/man1/upx.1 -install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx - +%cmake_install +mv %{buildroot}%{_datadir}/doc/upx/upx-doc.* . +rm -f %{buildroot}%{_datadir}/doc/upx/* %files %license COPYING LICENSE -%doc BUGS NEWS PROJECTS README README.1ST THANKS +%doc NEWS README README.SRC THANKS upx-doc.* %{_bindir}/upx %{_mandir}/man1/upx.1* %changelog +* Fri Nov 04 2022 Gwyn Ciesla - 4.0.0-1 +- 4.0.0 + * Sat Jul 23 2022 Fedora Release Engineering - 3.96-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 87499c5b35143295fc139071e6d840158359fb40 Mon Sep 17 00:00:00 2001 From: Tomas Hrcka Date: Tue, 8 Nov 2022 08:15:27 +0100 Subject: [PATCH 12/39] Unretirement request: https://pagure.io/releng/issue/11121 --- .gitignore | 13 + ...a16c13eda34307ccceea2263e474c54ee075.patch | 22 ++ ...df9da23840e596d5e9e8493f22666802fe6c.patch | 76 ++++++ ...3e5cfdc12da94c251b2cd83bb01c7d9f616c.patch | 34 +++ ...d43ecb9909b0fab18e77753953a91322c628.patch | 127 +++++++++ dead.package | 1 - sources | 2 + upx-nohtml.patch | 52 ++++ upx-whitespace.patch | 11 + upx.spec | 256 ++++++++++++++++++ 10 files changed, 593 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 2fcaa16c13eda34307ccceea2263e474c54ee075.patch create mode 100644 3781df9da23840e596d5e9e8493f22666802fe6c.patch create mode 100644 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch create mode 100644 dadfd43ecb9909b0fab18e77753953a91322c628.patch delete mode 100644 dead.package create mode 100644 sources create mode 100644 upx-nohtml.patch create mode 100644 upx-whitespace.patch create mode 100644 upx.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..954d913 --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +upx-3.04-src.tar.bz2 +lzma465.tar.bz2 +/upx-3.07-src.tar.bz2 +/lzma465.tar.bz2 +/upx-3.08-src.tar.bz2 +/upx-3.09-src.tar.bz2 +/upx-3.91-src.tar.bz2 +/upx-3.93-src.tar.xz +/upx-3.94-src.tar.xz +/upx-3.95.tar.gz +/upx-lzma-sdk-3.95.tar.gz +/upx-3.96-src.tar.xz +/upx-lzma-sdk-3.96.tar.gz diff --git a/2fcaa16c13eda34307ccceea2263e474c54ee075.patch b/2fcaa16c13eda34307ccceea2263e474c54ee075.patch new file mode 100644 index 0000000..30a7615 --- /dev/null +++ b/2fcaa16c13eda34307ccceea2263e474c54ee075.patch @@ -0,0 +1,22 @@ +From 2fcaa16c13eda34307ccceea2263e474c54ee075 Mon Sep 17 00:00:00 2001 +From: Mattiwatti +Date: Tue, 21 Jan 2020 16:03:40 +0100 +Subject: [PATCH] Make PE load config directory address dword aligned + +--- + src/pefile.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pefile.cpp b/src/pefile.cpp +index 7bf66cbe..d957886f 100644 +--- a/src/pefile.cpp ++++ b/src/pefile.cpp +@@ -2427,7 +2427,7 @@ void PeFile::pack0(OutputFile *fo, ht &ih, ht &oh, + processTls(&rel,&tlsiv,ic); + ODADDR(PEDIR_TLS) = sotls ? ic : 0; + ODSIZE(PEDIR_TLS) = sotls ? (sizeof(LEXX) == 4 ? 0x18 : 0x28) : 0; +- ic += sotls; ++ ic = ALIGN_UP(ic + sotls, 4u); + + processLoadConf(&rel, &loadconfiv, ic); + ODADDR(PEDIR_LOADCONF) = soloadconf ? ic : 0; diff --git a/3781df9da23840e596d5e9e8493f22666802fe6c.patch b/3781df9da23840e596d5e9e8493f22666802fe6c.patch new file mode 100644 index 0000000..1d47b2a --- /dev/null +++ b/3781df9da23840e596d5e9e8493f22666802fe6c.patch @@ -0,0 +1,76 @@ +From 3781df9da23840e596d5e9e8493f22666802fe6c Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Fri, 11 Dec 2020 13:38:18 -0800 +Subject: [PATCH] Check DT_REL/DT_RELA, DT_RELSZ/DT_RELASZ + +https://github.com/upx/upx/issues/421 + modified: p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 34 +++++++++++++++++++++++++++++----- + 1 file changed, 29 insertions(+), 5 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index 182db192..3a4101cf 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -2222,8 +2222,20 @@ bool PackLinuxElf32::canPack() + int z_rsz = dt_table[Elf32_Dyn::DT_RELSZ]; + if (z_rel && z_rsz) { + unsigned rel_off = get_te32(&dynseg[-1+ z_rel].d_val); ++ if ((unsigned)file_size <= rel_off) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf32_Dynamic[DT_REL] %#x\n", ++ rel_off); ++ throwCantPack(msg); ++ } + Elf32_Rel *rp = (Elf32_Rel *)&file_image[rel_off]; + unsigned relsz = get_te32(&dynseg[-1+ z_rsz].d_val); ++ if ((unsigned)file_size <= relsz) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf32_Dynamic[DT_RELSZ] %#x\n", ++ relsz); ++ throwCantPack(msg); ++ } + Elf32_Rel *last = (Elf32_Rel *)(relsz + (char *)rp); + for (; rp < last; ++rp) { + unsigned r_va = get_te32(&rp->r_offset); +@@ -2562,14 +2574,26 @@ PackLinuxElf64::canPack() + int z_rel = dt_table[Elf64_Dyn::DT_RELA]; + int z_rsz = dt_table[Elf64_Dyn::DT_RELASZ]; + if (z_rel && z_rsz) { +- unsigned rel_off = get_te64(&dynseg[-1+ z_rel].d_val); ++ upx_uint64_t rel_off = get_te64(&dynseg[-1+ z_rel].d_val); ++ if ((u64_t)file_size <= rel_off) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf64_Dynamic[DT_RELA] %#llx\n", ++ rel_off); ++ throwCantPack(msg); ++ } + Elf64_Rela *rp = (Elf64_Rela *)&file_image[rel_off]; +- unsigned relsz = get_te64(&dynseg[-1+ z_rsz].d_val); ++ upx_uint64_t relsz = get_te64(&dynseg[-1+ z_rsz].d_val); ++ if ((u64_t)file_size <= relsz) { ++ char msg[70]; snprintf(msg, sizeof(msg), ++ "bad Elf64_Dynamic[DT_RELASZ] %#llx\n", ++ relsz); ++ throwCantPack(msg); ++ } + Elf64_Rela *last = (Elf64_Rela *)(relsz + (char *)rp); + for (; rp < last; ++rp) { +- unsigned r_va = get_te64(&rp->r_offset); ++ upx_uint64_t r_va = get_te64(&rp->r_offset); + if (r_va == user_init_ava) { // found the Elf64_Rela +- unsigned r_info = get_te64(&rp->r_info); ++ upx_uint64_t r_info = get_te64(&rp->r_info); + unsigned r_type = ELF64_R_TYPE(r_info); + if (Elf64_Ehdr::EM_AARCH64 == e_machine + && R_AARCH64_RELATIVE == r_type) { +@@ -2581,7 +2605,7 @@ PackLinuxElf64::canPack() + } + else { + char msg[50]; snprintf(msg, sizeof(msg), +- "bad relocation %#x DT_INIT_ARRAY[0]", ++ "bad relocation %#llx DT_INIT_ARRAY[0]", + r_info); + throwCantPack(msg); + } diff --git a/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch b/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch new file mode 100644 index 0000000..7e6de04 --- /dev/null +++ b/87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch @@ -0,0 +1,34 @@ +From 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Wed, 22 Jul 2020 19:34:27 -0700 +Subject: [PATCH] Unpack: Phdrs must be within expansion of first compressed + block + +https://github.com/upx/upx/issues/388 + modified: p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index cd9e4ec97..453d5c457 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -4550,7 +4550,7 @@ void PackLinuxElf64::unpack(OutputFile *fo) + unsigned c_adler = upx_adler32(NULL, 0); + unsigned u_adler = upx_adler32(NULL, 0); + #define MAX_ELF_HDR 1024 +- if ((MAX_ELF_HDR - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { ++ if ((umin64(MAX_ELF_HDR, ph.u_len) - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { + throwCantUnpack("bad compressed e_phnum"); + } + #undef MAX_ELF_HDR +@@ -5617,7 +5617,7 @@ void PackLinuxElf32::unpack(OutputFile *fo) + unsigned c_adler = upx_adler32(NULL, 0); + unsigned u_adler = upx_adler32(NULL, 0); + #define MAX_ELF_HDR 512 +- if ((MAX_ELF_HDR - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { ++ if ((umin(MAX_ELF_HDR, ph.u_len) - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { + throwCantUnpack("bad compressed e_phnum"); + } + #undef MAX_ELF_HDR diff --git a/dadfd43ecb9909b0fab18e77753953a91322c628.patch b/dadfd43ecb9909b0fab18e77753953a91322c628.patch new file mode 100644 index 0000000..1143325 --- /dev/null +++ b/dadfd43ecb9909b0fab18e77753953a91322c628.patch @@ -0,0 +1,127 @@ +From dadfd43ecb9909b0fab18e77753953a91322c628 Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Fri, 17 Apr 2020 16:17:29 -0700 +Subject: [PATCH] --preserve-build-id for ET_EXEC + +https://github.com/upx/upx/issues/371 + modified: p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 50 +++++++++++++++++++++++++++++++----------------- + 1 file changed, 32 insertions(+), 18 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index 6b5b4295..725f68f4 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -3386,26 +3386,33 @@ void PackLinuxElf32::pack1(OutputFile *fo, Filter & /*ft*/) + if (opt->o_unix.preserve_build_id) { + // set this so we can use elf_find_section_name + e_shnum = get_te16(&ehdri.e_shnum); ++ MemBuffer mb_shdri; + if (!shdri) { +- shdri = (Elf32_Shdr *)&file_image[get_te32(&ehdri.e_shoff)]; ++ mb_shdri.alloc(e_shnum * sizeof(Elf32_Shdr)); ++ shdri = (Elf32_Shdr *)mb_shdri.getVoidPtr(); ++ e_shoff = get_te32(&ehdri.e_shoff); ++ fi->seek(e_shoff, SEEK_SET); ++ fi->readx(shdri, e_shnum * sizeof(Elf32_Shdr)); + } + //set the shstrtab + sec_strndx = &shdri[get_te16(&ehdri.e_shstrndx)]; + +- char *strtab = New(char, sec_strndx->sh_size); ++ unsigned sh_size = get_te32(&sec_strndx->sh_size); ++ char *strtab = New(char, sh_size); + fi->seek(0,SEEK_SET); + fi->seek(sec_strndx->sh_offset,SEEK_SET); +- fi->readx(strtab,sec_strndx->sh_size); ++ fi->readx(strtab, sh_size); + + shstrtab = (const char*)strtab; + + Elf32_Shdr const *buildid = elf_find_section_name(".note.gnu.build-id"); + if (buildid) { +- unsigned char *data = New(unsigned char, buildid->sh_size); +- memset(data,0,buildid->sh_size); ++ unsigned bid_sh_size = get_te32(&buildid->sh_size); ++ unsigned char *data = New(unsigned char, bid_sh_size); ++ memset(data,0,bid_sh_size); + fi->seek(0,SEEK_SET); + fi->seek(buildid->sh_offset,SEEK_SET); +- fi->readx(data,buildid->sh_size); ++ fi->readx(data, bid_sh_size); + + buildid_data = data; + +@@ -3414,12 +3421,12 @@ void PackLinuxElf32::pack1(OutputFile *fo, Filter & /*ft*/) + + //setup the build-id + memcpy(&shdrout.shdr[1], buildid, sizeof(shdrout.shdr[1])); +- shdrout.shdr[1].sh_name = 1; ++ set_te32(&shdrout.shdr[1].sh_name, 1); + + //setup the shstrtab + memcpy(&shdrout.shdr[2], sec_strndx, sizeof(shdrout.shdr[2])); +- shdrout.shdr[2].sh_name = 20; +- shdrout.shdr[2].sh_size = 29; //size of our static shstrtab ++ set_te32(&shdrout.shdr[2].sh_name, 20); ++ set_te32(&shdrout.shdr[2].sh_size, 29); //size of our static shstrtab + } + } + } +@@ -3790,26 +3797,33 @@ void PackLinuxElf64::pack1(OutputFile *fo, Filter & /*ft*/) + if (opt->o_unix.preserve_build_id) { + // set this so we can use elf_find_section_name + e_shnum = get_te16(&ehdri.e_shnum); ++ MemBuffer mb_shdri; + if (!shdri) { +- shdri = (Elf64_Shdr *)&file_image[get_te32(&ehdri.e_shoff)]; ++ mb_shdri.alloc(e_shnum * sizeof(Elf64_Shdr)); ++ shdri = (Elf64_Shdr *)mb_shdri.getVoidPtr(); ++ e_shoff = get_te64(&ehdri.e_shoff); ++ fi->seek(e_shoff, SEEK_SET); ++ fi->readx(shdri, e_shnum * sizeof(Elf64_Shdr)); + } + //set the shstrtab + sec_strndx = &shdri[get_te16(&ehdri.e_shstrndx)]; + +- char *strtab = New(char, sec_strndx->sh_size); ++ upx_uint64_t sh_size = get_te64(&sec_strndx->sh_size); ++ char *strtab = New(char, sh_size); + fi->seek(0,SEEK_SET); + fi->seek(sec_strndx->sh_offset,SEEK_SET); +- fi->readx(strtab,sec_strndx->sh_size); ++ fi->readx(strtab, sh_size); + + shstrtab = (const char*)strtab; + + Elf64_Shdr const *buildid = elf_find_section_name(".note.gnu.build-id"); + if (buildid) { +- unsigned char *data = New(unsigned char, buildid->sh_size); +- memset(data,0,buildid->sh_size); ++ unsigned bid_sh_size = get_te32(&buildid->sh_size); ++ unsigned char *data = New(unsigned char, bid_sh_size); ++ memset(data,0,bid_sh_size); + fi->seek(0,SEEK_SET); + fi->seek(buildid->sh_offset,SEEK_SET); +- fi->readx(data,buildid->sh_size); ++ fi->readx(data,bid_sh_size); + + buildid_data = data; + +@@ -3818,12 +3832,12 @@ void PackLinuxElf64::pack1(OutputFile *fo, Filter & /*ft*/) + + //setup the build-id + memcpy(&shdrout.shdr[1], buildid, sizeof(shdrout.shdr[1])); +- shdrout.shdr[1].sh_name = 1; ++ set_te32(&shdrout.shdr[1].sh_name, 1); + + //setup the shstrtab + memcpy(&shdrout.shdr[2], sec_strndx, sizeof(shdrout.shdr[2])); +- shdrout.shdr[2].sh_name = 20; +- shdrout.shdr[2].sh_size = 29; //size of our static shstrtab ++ set_te32(&shdrout.shdr[2].sh_name, 20); ++ set_te32(&shdrout.shdr[2].sh_size, 29); //size of our static shstrtab + } + } + } diff --git a/dead.package b/dead.package deleted file mode 100644 index b31a40c..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Licensing issues, see BZ 2133058 diff --git a/sources b/sources new file mode 100644 index 0000000..96ff364 --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (upx-3.96-src.tar.xz) = 2d4d1be21d274d9bfdee9b9815396f5e5ff0bcdfb781b7be5fafa4d1e224028e412ec5f5ba607c482671aae27ccf9069abb2db0fb58f78f3a102a51897df2b11 +SHA512 (upx-lzma-sdk-3.96.tar.gz) = 9690a1dfabf8bcb161b26761556a390aa354b633914254b29e36246fe11f9c3e905dafa916d0d52300bd418e2bddedd4122027e447fc87183bce4479e771c7df diff --git a/upx-nohtml.patch b/upx-nohtml.patch new file mode 100644 index 0000000..b50f935 --- /dev/null +++ b/upx-nohtml.patch @@ -0,0 +1,52 @@ +*** doc/Makefile~ 2018-08-25 21:58:09.000000000 -0500 +--- doc/Makefile 2018-08-27 10:24:23.304422432 -0500 +*************** +*** 26,33 **** + RTRIM := sed -e 's/[ $(tab)]*$$//' + DETAB2 := sed -e 's/$(tab)/ /g' + +! BUILT_SOURCES = upx.1 upx.doc upx.html upx.man upx.ps upx.tex +! BUILT_SOURCES = upx.1 upx.doc upx.html + + + ### +--- 26,33 ---- + RTRIM := sed -e 's/[ $(tab)]*$$//' + DETAB2 := sed -e 's/$(tab)/ /g' + +! BUILT_SOURCES = upx.1 upx.doc upx.man upx.ps upx.tex +! BUILT_SOURCES = upx.1 upx.doc + + + ### +*************** +*** 46,52 **** + ### rules + ### + +! .SUFFIXES: .1 .doc .html .man .pod .ps .tex + + %.1 : %.pod + pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@ +--- 46,52 ---- + ### rules + ### + +! .SUFFIXES: .1 .doc .man .pod .ps .tex + + %.1 : %.pod + pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@ +*************** +*** 56,66 **** + pod2text < $< | $(RTRIM) > $@ + test -s $@ + +- %.html : %.pod +- pod2html --noindex $< | $(RTRIM) | $(DETAB2) > $@ +- @rm -f pod2htm* +- test -s $@ +- + %.man : %.1 + nroff -man $< | $(RTRIM) > $@ + test -s $@ +--- 56,61 ---- diff --git a/upx-whitespace.patch b/upx-whitespace.patch new file mode 100644 index 0000000..9657b2b --- /dev/null +++ b/upx-whitespace.patch @@ -0,0 +1,11 @@ +--- src/Makefile~ 2017-01-29 10:53:00.000000000 -0600 ++++ src/Makefile 2017-03-30 10:03:12.447172055 -0500 +@@ -86,7 +86,7 @@ + $($(notdir $@).PRE_LINK_STEP) + $(strip $(CXXLD) $(call ee,CXXFLAGS) $(call ee,LDFLAGS) -o $@ $(upx_OBJECTS) $(call ee,LDADD) $(call ee,LIBS)) + $($(notdir $@).POST_LINK_STEP) +- $(CHECK_WHITESPACE) ++# $(CHECK_WHITESPACE) + + %.o : %.cpp | ./.depend + $(strip $(CXX) $(call ee,CPPFLAGS) $(call ee,CXXFLAGS) -o $@ -c $<) diff --git a/upx.spec b/upx.spec new file mode 100644 index 0000000..b263122 --- /dev/null +++ b/upx.spec @@ -0,0 +1,256 @@ +Name: upx +Version: 3.96 +Release: 12%{?dist} +Summary: Ultimate Packer for eXecutables + +License: GPLv2+ and Public Domain +URL: http://upx.sourceforge.net/ +Source0: http://upx.sourceforge.net/download/%{name}-%{version}-src.tar.xz +Source1: https://github.com/upx/upx-lzma-sdk/archive/v%{version}/upx-lzma-sdk-%{version}.tar.gz +Patch0: upx-whitespace.patch +Patch1: upx-nohtml.patch +Patch2: dadfd43ecb9909b0fab18e77753953a91322c628.patch +Patch3: 2fcaa16c13eda34307ccceea2263e474c54ee075.patch +Patch4: 3781df9da23840e596d5e9e8493f22666802fe6c.patch +Patch5: 87b73e5cfdc12da94c251b2cd83bb01c7d9f616c.patch + +BuildRequires: make +BuildRequires: gcc-c++ +BuildRequires: ucl-devel >= 1.01 +BuildRequires: zlib-devel +BuildRequires: perl-podlators + +%description +UPX is a free, portable, extendable, high-performance executable +packer for several different executable formats. It achieves an +excellent compression ratio and offers very fast decompression. Your +executables suffer no memory overhead or other drawbacks. + + +%prep +%setup -qn %{name}-%{version}-src +sed -i -e 's/ -O2/ /' -e 's/ -Werror//' src/Makefile + +tar xfz %{SOURCE1} --strip-components=1 -C src/lzma-sdk/ + +%patch0 -p0 +%patch1 -p0 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 + +%build +export CXX="g++" +export CXXFLAGS="$RPM_OPT_FLAGS" # export, not to make so it won't trump all +export UPX_LUADIR=/usr/include +export UPX_UCLDIR=/usr/include/ucl +make %{?_smp_mflags} -C src +make -C doc + + +%install +install -Dpm 644 doc/upx.1 $RPM_BUILD_ROOT%{_mandir}/man1/upx.1 +install -Dpm 755 src/upx.out $RPM_BUILD_ROOT%{_bindir}/upx + + +%files +%license COPYING LICENSE +%doc BUGS NEWS PROJECTS README README.1ST THANKS +%{_bindir}/upx +%{_mandir}/man1/upx.1* + + +%changelog +* Sat Jul 23 2022 Fedora Release Engineering - 3.96-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Sat Jan 22 2022 Fedora Release Engineering - 3.96-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.96-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue May 18 2021 Gwyn Ciesla - 3.96-9 +- Patch for CVE-2020-24119 + +* Thu Mar 11 2021 Gwyn Ciesla - 3.96-8 +- Patch for CVE-2021-20285 + +* Wed Jan 27 2021 Fedora Release Engineering - 3.96-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Aug 10 2020 Gwyn Ciesla - 3.96-6 +- Make PE load config directory address dword aligned + +* Wed Jul 29 2020 Fedora Release Engineering - 3.96-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Apr 20 2020 Gwyn Ciesla - 3.96-4 +- Patch for segfault using preserve-build-id. + +* Fri Jan 31 2020 Fedora Release Engineering - 3.96-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jan 24 2020 Gwyn Ciesla - 3.96-2 +- EVR bump for koji issue. + +* Fri Jan 24 2020 Gwyn Ciesla - 3.96-1 +- 3.96 + +* Fri Jan 17 2020 Gwyn Ciesla - 3.95-5 +- Upstream patch for CVE-2019-20021 + +* Thu Aug 01 2019 Gwyn Ciesla - 3.95-4 +- Upstream patches for CVE-2019-14295 and CVE-2019-14296. + +* Sat Jul 27 2019 Fedora Release Engineering - 3.95-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 3.95-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Aug 27 2018 Gwyn Ciesla - 3.95-1 +- 3.95. +- Switch to upstream's lzma fork. + +* Sat Jul 14 2018 Fedora Release Engineering - 3.94-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 3.94-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Oct 10 2017 Gwyn Ciesla - 3.94-1 +- 3.94, plus patch for CVE-2017-15056. + +* Thu Aug 03 2017 Fedora Release Engineering - 3.93-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 3.93-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Mar 30 2017 Gwyn Ciesla - 3.93-1 +- Latest upstream, fix for BZ 1429197. + +* Sat Feb 11 2017 Fedora Release Engineering - 3.91-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 05 2016 Fedora Release Engineering - 3.91-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 3.91-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat May 02 2015 Kalev Lember - 3.91-5 +- Rebuilt for GCC 5 C++11 ABI change + +* Thu Oct 16 2014 Jon Ciesla - 3.91-4 +- Fix FTBFS. + +* Mon Aug 18 2014 Fedora Release Engineering - 3.91-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 3.91-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Oct 28 2013 Jon Ciesla - 3.91-1 +- New upstream, BZ 1023719. +- Fix bad changelog date. + +* Sun Aug 04 2013 Fedora Release Engineering - 3.09-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Mar 18 2013 Jon Ciesla - 3.09-1 +- New upstream. + +* Fri Feb 15 2013 Fedora Release Engineering - 3.08-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Fedora Release Engineering - 3.08-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 27 2012 Jon Ciesla - 3.08-1 +- New upstream. + +* Sat Jan 14 2012 Fedora Release Engineering - 3.07-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Aug 09 2011 Tom Callaway - 3.07-3 +- use lzma-sdk system library/headers + +* Mon Feb 07 2011 Fedora Release Engineering - 3.07-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Oct 18 2010 Jon Ciesla - 3.07-1 +- New upstream. + +* Fri Jan 08 2010 Jon Ciesla - 3.04-2 +- LZMA fixes by John Reiser (jreiser@bitwagon.com) BZ 501636. + +* Mon Nov 16 2009 Jon Ciesla - 3.04-1 +- 3.04. +- Stict prototype patch upstreamed. + +* Sun Jul 26 2009 Fedora Release Engineering - 3.03-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Feb 27 2009 Jon Ciesla - 3.03-3 +- Patch for stricter glibc. + +* Wed Feb 25 2009 Fedora Release Engineering - 3.03-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu May 08 2008 Jon Ciesla - 3.03-1 +- 3.03. + +* Fri Feb 08 2008 Jon Ciesla - 3.02-2 +- GCC 4.3 rebuild. + +* Mon Dec 31 2007 Jon Ciesla - 3.02-1 +- 3.02. + +* Thu Aug 16 2007 Jon Ciesla - 3.01-2 +- License tag correction. + +* Mon Aug 06 2007 Jon Ciesla - 3.01-1 +- 3.01. + +* Sun May 13 2007 Ville Skyttä - 3.00-1 +- 3.00. + +* Wed Apr 4 2007 Ville Skyttä - 2.03-1 +- 2.03. + +* Wed Aug 30 2006 Ville Skyttä - 2.02-1 +- 2.02. + +* Tue May 16 2006 Ville Skyttä - 2.00-2 +- BR: zlib-devel. + +* Tue May 16 2006 Ville Skyttä - 2.00-1 +- 2.00. + +* Wed Feb 15 2006 Ville Skyttä - 1.25-5 +- Rebuild. + +* Thu May 19 2005 Ville Skyttä - 1.25-4 +- Rebuild. + +* Fri Apr 8 2005 Michael Schwendt - 1.25-3 +- rebuilt + +* Fri Dec 17 2004 Ville Skyttä - 0:1.25-2 +- Let rpmbuild take care of stripping binaries. +- Honor build environment settings better. + +* Thu Jul 1 2004 Ville Skyttä - 0:1.25-0.fdr.1 +- Update to 1.25. + +* Mon May 3 2004 Ville Skyttä - 0:1.24-0.fdr.3 +- Add workaround for building with UCL 1.02, thanks to upstream. + +* Sun Nov 16 2003 Ville Skyttä - 0:1.24-0.fdr.2 +- Spec cleanup. + +* Sat Jul 26 2003 Ville Skyttä - 0:1.24-0.fdr.1 +- First build. From 17dee9ca3fd5321d8dedb89b8f09e84a44098a5a Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 17 Nov 2022 14:05:22 -0600 Subject: [PATCH 13/39] 4.0.1 --- .gitignore | 1 + sources | 2 +- upx.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 16b1e9e..0f435ad 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ lzma465.tar.bz2 /upx-3.96-src.tar.xz /upx-lzma-sdk-3.96.tar.gz /upx-4.0.0-src.tar.xz +/upx-4.0.1-src.tar.xz diff --git a/sources b/sources index 199bb43..7cfe53e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-4.0.0-src.tar.xz) = fe3e8c594e845a91338b1e11fe3cb6371430af40a567187d63835e27da8b2abf993a104b0693063f4db984234bada7b2bd16ad79e3ad90861a1f495d99de7de6 +SHA512 (upx-4.0.1-src.tar.xz) = f2e42c83fd4a0d273a20c8b0f0d1eb201edcd1f10c779d2a6e8ac0812741c3af0c887382e54894190ecc4c7002a910524b2ed79ae7a7b595b8392598ad2e1235 diff --git a/upx.spec b/upx.spec index 946d93f..394e9a4 100644 --- a/upx.spec +++ b/upx.spec @@ -1,5 +1,5 @@ Name: upx -Version: 4.0.0 +Version: 4.0.1 Release: 1%{?dist} Summary: Ultimate Packer for eXecutables @@ -42,6 +42,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Thu Nov 17 2022 Gwyn Ciesla - 4.0.1-1 +- 4.0.1 + * Fri Nov 04 2022 Gwyn Ciesla - 4.0.0-1 - 4.0.0 From d156dde36b02d24449d719d2f66a6241a3d59ff1 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 12 Jan 2023 14:01:07 -0600 Subject: [PATCH 14/39] Patches for CVE-2023-23456 and CVE-23457 --- ...05a85cbe45e51fbd470f1aa8b02157c429d4.patch | 35 +++++++++++++++ ...648c5f6aa9b33f4728f79dd4d0efec0bf860.patch | 45 +++++++++++++++++++ upx.spec | 10 ++++- 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 510505a85cbe45e51fbd470f1aa8b02157c429d4.patch create mode 100644 779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch diff --git a/510505a85cbe45e51fbd470f1aa8b02157c429d4.patch b/510505a85cbe45e51fbd470f1aa8b02157c429d4.patch new file mode 100644 index 0000000..89c5e79 --- /dev/null +++ b/510505a85cbe45e51fbd470f1aa8b02157c429d4.patch @@ -0,0 +1,35 @@ +--- upx-4.0.1-src/src/p_tmt.cpp~ 2022-11-16 16:15:38.000000000 -0600 ++++ upx-4.0.1-src/src/p_tmt.cpp 2023-01-12 13:49:53.599794510 -0600 +@@ -176,10 +176,11 @@ + unsigned const imagesize = get_le32(&ih.imagesize); + unsigned const entry = get_le32(&ih.entry); + unsigned const relocsize = get_le32(&ih.relocsize); +- if (!imagesize +- || file_size <= imagesize +- || file_size <= entry +- || file_size <= relocsize) { ++ if (imagesize < sizeof(ih) ++ || entry < sizeof(ih) ++ || file_size <= imagesize ++ || file_size <= entry ++ || file_size <= relocsize) { + printWarn(getName(), "bad header; imagesize=%#x entry=%#x relocsize=%#x", + imagesize, entry, relocsize); + return 0; +@@ -216,14 +217,14 @@ + obuf.allocForCompression(usize+rsize+128); + + MemBuffer wrkmem; +- wrkmem.alloc(rsize+EXTRA_INFO); // relocations ++ wrkmem.alloc(rsize + EXTRA_INFO + 4); // relocations + original entry point + relocsize + + fi->seek(adam_offset+sizeof(ih),SEEK_SET); + fi->readx(ibuf,usize); + fi->readx(wrkmem+4,rsize); + const unsigned overlay = file_size - fi->tell(); + +- if (find_le32(ibuf,128,get_le32("UPX ")) >= 0) ++ if (find_le32(ibuf, UPX_MIN(128u, usize), get_le32("UPX ")) >= 0) + throwAlreadyPacked(); + if (rsize == 0) + throwCantPack("file is already compressed with another packer"); diff --git a/779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch b/779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch new file mode 100644 index 0000000..8cb8455 --- /dev/null +++ b/779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch @@ -0,0 +1,45 @@ +From 779b648c5f6aa9b33f4728f79dd4d0efec0bf860 Mon Sep 17 00:00:00 2001 +From: John Reiser +Date: Wed, 23 Nov 2022 19:49:28 -0800 +Subject: [PATCH] invert_pt_dynamic: fix thinko; PackLinuxElf64help1 insist on + ELF + +https://github.com/upx/upx/issues/631 + modified: src/p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index fa55470f7..b698ee0a2 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -256,7 +256,8 @@ PackLinuxElf32::PackLinuxElf32help1(InputFile *f) + e_phnum = get_te16(&ehdri.e_phnum); + e_shnum = get_te16(&ehdri.e_shnum); + unsigned const e_phentsize = get_te16(&ehdri.e_phentsize); +- if (ehdri.e_ident[Elf32_Ehdr::EI_CLASS]!=Elf32_Ehdr::ELFCLASS32 ++ if (memcmp((char const *)&ehdri, "\x7f\x45\x4c\x46", 4) // "\177ELF" ++ || ehdri.e_ident[Elf32_Ehdr::EI_CLASS]!=Elf32_Ehdr::ELFCLASS32 + || sizeof(Elf32_Phdr) != e_phentsize + || (Elf32_Ehdr::ELFDATA2MSB == ehdri.e_ident[Elf32_Ehdr::EI_DATA] + && &N_BELE_RTP::be_policy != bele) +@@ -761,7 +762,8 @@ PackLinuxElf64::PackLinuxElf64help1(InputFile *f) + e_phnum = get_te16(&ehdri.e_phnum); + e_shnum = get_te16(&ehdri.e_shnum); + unsigned const e_phentsize = get_te16(&ehdri.e_phentsize); +- if (ehdri.e_ident[Elf64_Ehdr::EI_CLASS]!=Elf64_Ehdr::ELFCLASS64 ++ if (memcmp((char const *)&ehdri, "\x7f\x45\x4c\x46", 4) // "\177ELF" ++ || ehdri.e_ident[Elf64_Ehdr::EI_CLASS]!=Elf64_Ehdr::ELFCLASS64 + || sizeof(Elf64_Phdr) != e_phentsize + || (Elf64_Ehdr::ELFDATA2MSB == ehdri.e_ident[Elf64_Ehdr::EI_DATA] + && &N_BELE_RTP::be_policy != bele) +@@ -5780,7 +5782,7 @@ PackLinuxElf64::invert_pt_dynamic(Elf64_Dyn const *dynp, upx_uint64_t headway) + } + if (file_size <= dt_offsets[n_off]) { + char msg[60]; snprintf(msg, sizeof(msg), "bad DT_{%#x} = %#x (beyond EOF)", +- dt_names[k], dt_offsets[n_off]); ++ k, dt_offsets[n_off]); + throwCantPack(msg); + } + n_off += !!dt_offsets[n_off]; diff --git a/upx.spec b/upx.spec index 394e9a4..b57d2a3 100644 --- a/upx.spec +++ b/upx.spec @@ -1,11 +1,13 @@ Name: upx Version: 4.0.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain URL: https://github.com/upx/upx Source0: %{url}/releases/download/v%{version}/%{name}-%{version}-src.tar.xz +Patch0: 779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch +Patch1: 510505a85cbe45e51fbd470f1aa8b02157c429d4.patch BuildRequires: make BuildRequires: gcc-c++ @@ -24,6 +26,9 @@ executables suffer no memory overhead or other drawbacks. %prep %setup -qn %{name}-%{version}-src +%patch0 -p1 +%patch1 -p1 + %build %cmake %cmake_build @@ -42,6 +47,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Thu Jan 12 2023 Gwyn Ciesla - 4.0.1-2 +- Patches for CVE-2023-23456, CVE-2023-23457 + * Thu Nov 17 2022 Gwyn Ciesla - 4.0.1-1 - 4.0.1 From 884342899bb01afba95ebb5e3eabaf01626a0bf9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 05:54:04 +0000 Subject: [PATCH 15/39] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index b57d2a3..3969dbe 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 4.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain @@ -47,6 +47,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 4.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jan 12 2023 Gwyn Ciesla - 4.0.1-2 - Patches for CVE-2023-23456, CVE-2023-23457 From e4e4f93c93937d0bf5f0b3c4bd86dc65fb662560 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Wed, 1 Feb 2023 08:26:30 -0600 Subject: [PATCH 16/39] 4.0.2 --- .gitignore | 1 + ...05a85cbe45e51fbd470f1aa8b02157c429d4.patch | 35 --------------- ...648c5f6aa9b33f4728f79dd4d0efec0bf860.patch | 45 ------------------- sources | 2 +- upx.spec | 11 +++-- 5 files changed, 7 insertions(+), 87 deletions(-) delete mode 100644 510505a85cbe45e51fbd470f1aa8b02157c429d4.patch delete mode 100644 779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch diff --git a/.gitignore b/.gitignore index 0f435ad..a2c05dc 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ lzma465.tar.bz2 /upx-lzma-sdk-3.96.tar.gz /upx-4.0.0-src.tar.xz /upx-4.0.1-src.tar.xz +/upx-4.0.2-src.tar.xz diff --git a/510505a85cbe45e51fbd470f1aa8b02157c429d4.patch b/510505a85cbe45e51fbd470f1aa8b02157c429d4.patch deleted file mode 100644 index 89c5e79..0000000 --- a/510505a85cbe45e51fbd470f1aa8b02157c429d4.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- upx-4.0.1-src/src/p_tmt.cpp~ 2022-11-16 16:15:38.000000000 -0600 -+++ upx-4.0.1-src/src/p_tmt.cpp 2023-01-12 13:49:53.599794510 -0600 -@@ -176,10 +176,11 @@ - unsigned const imagesize = get_le32(&ih.imagesize); - unsigned const entry = get_le32(&ih.entry); - unsigned const relocsize = get_le32(&ih.relocsize); -- if (!imagesize -- || file_size <= imagesize -- || file_size <= entry -- || file_size <= relocsize) { -+ if (imagesize < sizeof(ih) -+ || entry < sizeof(ih) -+ || file_size <= imagesize -+ || file_size <= entry -+ || file_size <= relocsize) { - printWarn(getName(), "bad header; imagesize=%#x entry=%#x relocsize=%#x", - imagesize, entry, relocsize); - return 0; -@@ -216,14 +217,14 @@ - obuf.allocForCompression(usize+rsize+128); - - MemBuffer wrkmem; -- wrkmem.alloc(rsize+EXTRA_INFO); // relocations -+ wrkmem.alloc(rsize + EXTRA_INFO + 4); // relocations + original entry point + relocsize - - fi->seek(adam_offset+sizeof(ih),SEEK_SET); - fi->readx(ibuf,usize); - fi->readx(wrkmem+4,rsize); - const unsigned overlay = file_size - fi->tell(); - -- if (find_le32(ibuf,128,get_le32("UPX ")) >= 0) -+ if (find_le32(ibuf, UPX_MIN(128u, usize), get_le32("UPX ")) >= 0) - throwAlreadyPacked(); - if (rsize == 0) - throwCantPack("file is already compressed with another packer"); diff --git a/779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch b/779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch deleted file mode 100644 index 8cb8455..0000000 --- a/779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 779b648c5f6aa9b33f4728f79dd4d0efec0bf860 Mon Sep 17 00:00:00 2001 -From: John Reiser -Date: Wed, 23 Nov 2022 19:49:28 -0800 -Subject: [PATCH] invert_pt_dynamic: fix thinko; PackLinuxElf64help1 insist on - ELF - -https://github.com/upx/upx/issues/631 - modified: src/p_lx_elf.cpp ---- - src/p_lx_elf.cpp | 8 +++++--- - 1 file changed, 5 insertions(+), 3 deletions(-) - -diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp -index fa55470f7..b698ee0a2 100644 ---- a/src/p_lx_elf.cpp -+++ b/src/p_lx_elf.cpp -@@ -256,7 +256,8 @@ PackLinuxElf32::PackLinuxElf32help1(InputFile *f) - e_phnum = get_te16(&ehdri.e_phnum); - e_shnum = get_te16(&ehdri.e_shnum); - unsigned const e_phentsize = get_te16(&ehdri.e_phentsize); -- if (ehdri.e_ident[Elf32_Ehdr::EI_CLASS]!=Elf32_Ehdr::ELFCLASS32 -+ if (memcmp((char const *)&ehdri, "\x7f\x45\x4c\x46", 4) // "\177ELF" -+ || ehdri.e_ident[Elf32_Ehdr::EI_CLASS]!=Elf32_Ehdr::ELFCLASS32 - || sizeof(Elf32_Phdr) != e_phentsize - || (Elf32_Ehdr::ELFDATA2MSB == ehdri.e_ident[Elf32_Ehdr::EI_DATA] - && &N_BELE_RTP::be_policy != bele) -@@ -761,7 +762,8 @@ PackLinuxElf64::PackLinuxElf64help1(InputFile *f) - e_phnum = get_te16(&ehdri.e_phnum); - e_shnum = get_te16(&ehdri.e_shnum); - unsigned const e_phentsize = get_te16(&ehdri.e_phentsize); -- if (ehdri.e_ident[Elf64_Ehdr::EI_CLASS]!=Elf64_Ehdr::ELFCLASS64 -+ if (memcmp((char const *)&ehdri, "\x7f\x45\x4c\x46", 4) // "\177ELF" -+ || ehdri.e_ident[Elf64_Ehdr::EI_CLASS]!=Elf64_Ehdr::ELFCLASS64 - || sizeof(Elf64_Phdr) != e_phentsize - || (Elf64_Ehdr::ELFDATA2MSB == ehdri.e_ident[Elf64_Ehdr::EI_DATA] - && &N_BELE_RTP::be_policy != bele) -@@ -5780,7 +5782,7 @@ PackLinuxElf64::invert_pt_dynamic(Elf64_Dyn const *dynp, upx_uint64_t headway) - } - if (file_size <= dt_offsets[n_off]) { - char msg[60]; snprintf(msg, sizeof(msg), "bad DT_{%#x} = %#x (beyond EOF)", -- dt_names[k], dt_offsets[n_off]); -+ k, dt_offsets[n_off]); - throwCantPack(msg); - } - n_off += !!dt_offsets[n_off]; diff --git a/sources b/sources index 7cfe53e..31e3a65 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-4.0.1-src.tar.xz) = f2e42c83fd4a0d273a20c8b0f0d1eb201edcd1f10c779d2a6e8ac0812741c3af0c887382e54894190ecc4c7002a910524b2ed79ae7a7b595b8392598ad2e1235 +SHA512 (upx-4.0.2-src.tar.xz) = 0aafbaf97a25e9cd1866d03358f5eceab2c0ba4b2f3acdd58178b41c32af58335b6cb843d83f3398d4ceedc238bfcd95f86a20c38a11d5e4e8af6a28c7e8b82e diff --git a/upx.spec b/upx.spec index 3969dbe..9654b58 100644 --- a/upx.spec +++ b/upx.spec @@ -1,13 +1,11 @@ Name: upx -Version: 4.0.1 -Release: 3%{?dist} +Version: 4.0.2 +Release: 1%{?dist} Summary: Ultimate Packer for eXecutables License: GPLv2+ and Public Domain URL: https://github.com/upx/upx Source0: %{url}/releases/download/v%{version}/%{name}-%{version}-src.tar.xz -Patch0: 779b648c5f6aa9b33f4728f79dd4d0efec0bf860.patch -Patch1: 510505a85cbe45e51fbd470f1aa8b02157c429d4.patch BuildRequires: make BuildRequires: gcc-c++ @@ -26,8 +24,6 @@ executables suffer no memory overhead or other drawbacks. %prep %setup -qn %{name}-%{version}-src -%patch0 -p1 -%patch1 -p1 %build %cmake @@ -47,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Wed Feb 01 2023 Gwyn Ciesla - 4.0.2-1 +- 4.0.2 + * Sat Jan 21 2023 Fedora Release Engineering - 4.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From a7d435f2c17a27704406f8372d994ea35cf5835b Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Sat, 4 Mar 2023 18:49:34 -0600 Subject: [PATCH 17/39] migrated to SPDX license --- upx.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/upx.spec b/upx.spec index 9654b58..ed59f2a 100644 --- a/upx.spec +++ b/upx.spec @@ -1,9 +1,9 @@ Name: upx Version: 4.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ultimate Packer for eXecutables -License: GPLv2+ and Public Domain +License: GPL-2.0-or-later AND Public Domain URL: https://github.com/upx/upx Source0: %{url}/releases/download/v%{version}/%{name}-%{version}-src.tar.xz @@ -43,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Sun Mar 05 2023 Gwyn Ciesla - 4.0.2-2 +- migrated to SPDX license + * Wed Feb 01 2023 Gwyn Ciesla - 4.0.2-1 - 4.0.2 From ce18ac16de89ea8738dfcf4fdb6124d0468ef63a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 17:12:07 +0000 Subject: [PATCH 18/39] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index ed59f2a..c179d7a 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 4.0.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND Public Domain @@ -43,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 4.0.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Sun Mar 05 2023 Gwyn Ciesla - 4.0.2-2 - migrated to SPDX license From 28d7e4faa7421b96bfb5fa2a725896160f46a77c Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Wed, 9 Aug 2023 16:13:25 -0500 Subject: [PATCH 19/39] 4.1.0 --- .gitignore | 1 + sources | 2 +- upx.spec | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a2c05dc..498a4f1 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ lzma465.tar.bz2 /upx-4.0.0-src.tar.xz /upx-4.0.1-src.tar.xz /upx-4.0.2-src.tar.xz +/upx-4.1.0-src.tar.xz diff --git a/sources b/sources index 31e3a65..a0859f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-4.0.2-src.tar.xz) = 0aafbaf97a25e9cd1866d03358f5eceab2c0ba4b2f3acdd58178b41c32af58335b6cb843d83f3398d4ceedc238bfcd95f86a20c38a11d5e4e8af6a28c7e8b82e +SHA512 (upx-4.1.0-src.tar.xz) = de8306e833198d7f470c050b05c6111a50ea94f2e757c1006433742871ccd93fd7412f942cd776e9eac6c91e379545d72f070f3fe928e75e5d5092b766474f8c diff --git a/upx.spec b/upx.spec index c179d7a..1341776 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx -Version: 4.0.2 -Release: 3%{?dist} +Version: 4.1.0 +Release: 1%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND Public Domain @@ -37,12 +37,15 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %files %license COPYING LICENSE -%doc NEWS README README.SRC THANKS upx-doc.* +%doc NEWS README README.SRC doc/THANKS.txt upx-doc.* %{_bindir}/upx %{_mandir}/man1/upx.1* %changelog +* Wed Aug 09 2023 Gwyn Ciesla - 4.1.0-1 +- 4.1.0 + * Sat Jul 22 2023 Fedora Release Engineering - 4.0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 5ceaf9f2357fa2a6d288bc30c1493fc1cc311f85 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Fri, 27 Oct 2023 11:32:21 -0500 Subject: [PATCH 20/39] 4.2.0 --- .gitignore | 1 + sources | 2 +- upx.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 498a4f1..91a11d0 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ lzma465.tar.bz2 /upx-4.0.1-src.tar.xz /upx-4.0.2-src.tar.xz /upx-4.1.0-src.tar.xz +/upx-4.2.0-src.tar.xz diff --git a/sources b/sources index a0859f0..3105774 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-4.1.0-src.tar.xz) = de8306e833198d7f470c050b05c6111a50ea94f2e757c1006433742871ccd93fd7412f942cd776e9eac6c91e379545d72f070f3fe928e75e5d5092b766474f8c +SHA512 (upx-4.2.0-src.tar.xz) = f2d83f307dee94e140cfbfe2219697ff4d61124ccfd936314b137a9ebcc54c8b49bd76f6edb5cd58ee3e0121f0a192f0b4e50b4fd30eed0437e14f8fc1d3c14e diff --git a/upx.spec b/upx.spec index 1341776..b3b81bc 100644 --- a/upx.spec +++ b/upx.spec @@ -1,5 +1,5 @@ Name: upx -Version: 4.1.0 +Version: 4.2.0 Release: 1%{?dist} Summary: Ultimate Packer for eXecutables @@ -43,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Fri Oct 27 2023 Gwyn Ciesla - 4.2.0-1 +- 4.2.0 + * Wed Aug 09 2023 Gwyn Ciesla - 4.1.0-1 - 4.1.0 From ba6186e5c321f4047e3d210dcf8f2fc429e257dc Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 2 Nov 2023 08:21:03 -0500 Subject: [PATCH 21/39] 4.2.1 --- .gitignore | 1 + sources | 2 +- upx.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 91a11d0..05a5a01 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ lzma465.tar.bz2 /upx-4.0.2-src.tar.xz /upx-4.1.0-src.tar.xz /upx-4.2.0-src.tar.xz +/upx-4.2.1-src.tar.xz diff --git a/sources b/sources index 3105774..85f353b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-4.2.0-src.tar.xz) = f2d83f307dee94e140cfbfe2219697ff4d61124ccfd936314b137a9ebcc54c8b49bd76f6edb5cd58ee3e0121f0a192f0b4e50b4fd30eed0437e14f8fc1d3c14e +SHA512 (upx-4.2.1-src.tar.xz) = 8c377b61aa5076435807b0f0207502ea1ca635a9e90a2a62f24a8f11e928160546540114cd2b8e2656baa2f99dd58a33fc6aafc58c221704fc70d29fc12e2bbe diff --git a/upx.spec b/upx.spec index b3b81bc..8ca23dc 100644 --- a/upx.spec +++ b/upx.spec @@ -1,5 +1,5 @@ Name: upx -Version: 4.2.0 +Version: 4.2.1 Release: 1%{?dist} Summary: Ultimate Packer for eXecutables @@ -43,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Thu Nov 02 2023 Gwyn Ciesla - 4.2.1-1 +- 4.2.1 + * Fri Oct 27 2023 Gwyn Ciesla - 4.2.0-1 - 4.2.0 From 107c5480b93e25731f02f84786e46ca676fb8f5f Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 4 Jan 2024 14:26:18 -0600 Subject: [PATCH 22/39] 4.2.2 --- .gitignore | 1 + sources | 2 +- upx.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 05a5a01..2c0c2a6 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ lzma465.tar.bz2 /upx-4.1.0-src.tar.xz /upx-4.2.0-src.tar.xz /upx-4.2.1-src.tar.xz +/upx-4.2.2-src.tar.xz diff --git a/sources b/sources index 85f353b..72aa3de 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-4.2.1-src.tar.xz) = 8c377b61aa5076435807b0f0207502ea1ca635a9e90a2a62f24a8f11e928160546540114cd2b8e2656baa2f99dd58a33fc6aafc58c221704fc70d29fc12e2bbe +SHA512 (upx-4.2.2-src.tar.xz) = 03885abfd1db899ea21e9469068dbe046e4817de461e36a6c8a77f6a98f8ccaf00c95846ad3b13e59a5e037ce2f2bed7bea599396968e0aeb7ba5fce1b374a9b diff --git a/upx.spec b/upx.spec index 8ca23dc..0ac9ed1 100644 --- a/upx.spec +++ b/upx.spec @@ -1,5 +1,5 @@ Name: upx -Version: 4.2.1 +Version: 4.2.2 Release: 1%{?dist} Summary: Ultimate Packer for eXecutables @@ -43,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Thu Jan 04 2024 Gwyn Ciesla - 4.2.2-1 +- 4.2.2 + * Thu Nov 02 2023 Gwyn Ciesla - 4.2.1-1 - 4.2.1 From dd28888972c462f6fa9b22face74fa3bb10ba8c0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 07:11:53 +0000 Subject: [PATCH 23/39] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index 0ac9ed1..f280650 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 4.2.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND Public Domain @@ -43,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 4.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jan 04 2024 Gwyn Ciesla - 4.2.2-1 - 4.2.2 From 8c6fd343f0b620b8a837ec4cdd40397cb6e5a08e Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 28 Mar 2024 15:44:25 -0500 Subject: [PATCH 24/39] 4.2.3 --- .gitignore | 1 + sources | 2 +- upx.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2c0c2a6..cd22030 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ lzma465.tar.bz2 /upx-4.2.0-src.tar.xz /upx-4.2.1-src.tar.xz /upx-4.2.2-src.tar.xz +/upx-4.2.3-src.tar.xz diff --git a/sources b/sources index 72aa3de..8d63a23 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-4.2.2-src.tar.xz) = 03885abfd1db899ea21e9469068dbe046e4817de461e36a6c8a77f6a98f8ccaf00c95846ad3b13e59a5e037ce2f2bed7bea599396968e0aeb7ba5fce1b374a9b +SHA512 (upx-4.2.3-src.tar.xz) = b9ebda5d3372132bb861e0dd035829b16e4c06900f68af182895f17975493707d78cbabc63060e581de1ce149bb5129d883f6e6abcde0413c0bf474db919f5fd diff --git a/upx.spec b/upx.spec index f280650..85de58f 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx -Version: 4.2.2 -Release: 2%{?dist} +Version: 4.2.3 +Release: 1%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND Public Domain @@ -43,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Thu Mar 28 2024 Gwyn Ciesla - 4.2.3-1 +- 4.2.3 + * Sat Jan 27 2024 Fedora Release Engineering - 4.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From feef204a79a435931bfb40301e872a2b7421d8f4 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 21 May 2024 10:15:50 -0500 Subject: [PATCH 25/39] 4.2.4 --- .gitignore | 1 + sources | 2 +- upx.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index cd22030..fd438c0 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ lzma465.tar.bz2 /upx-4.2.1-src.tar.xz /upx-4.2.2-src.tar.xz /upx-4.2.3-src.tar.xz +/upx-4.2.4-src.tar.xz diff --git a/sources b/sources index 8d63a23..1070263 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-4.2.3-src.tar.xz) = b9ebda5d3372132bb861e0dd035829b16e4c06900f68af182895f17975493707d78cbabc63060e581de1ce149bb5129d883f6e6abcde0413c0bf474db919f5fd +SHA512 (upx-4.2.4-src.tar.xz) = fc833dea010cb65a9a7b6fbf80021c98d8c112b55fa54101f3d39f09d049d75d89024206a28262996c08f253130917811736f7f546fa8743703bc86a2dbd33a5 diff --git a/upx.spec b/upx.spec index 85de58f..6d4e37b 100644 --- a/upx.spec +++ b/upx.spec @@ -1,5 +1,5 @@ Name: upx -Version: 4.2.3 +Version: 4.2.4 Release: 1%{?dist} Summary: Ultimate Packer for eXecutables @@ -43,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Tue May 21 2024 Gwyn Ciesla - 4.2.4-1 +- 4.2.4 + * Thu Mar 28 2024 Gwyn Ciesla - 4.2.3-1 - 4.2.3 From 443ff99ea147866ceefc002f0dadf4fa89d9a9c5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:21:05 +0000 Subject: [PATCH 26/39] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index 6d4e37b..60845c8 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 4.2.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND Public Domain @@ -43,6 +43,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 4.2.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Tue May 21 2024 Gwyn Ciesla - 4.2.4-1 - 4.2.4 From 4f69debb67dd50d8466e7918d74251575f22e5df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Wed, 11 Sep 2024 04:24:29 +0000 Subject: [PATCH 27/39] Migrate to SPDX license Added to https://gitlab.com/fedora/legal/fedora-license-data/-/merge_requests/632 This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 If there will be no comments in two weeks, I will merge this. --- upx.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index 60845c8..a0a1813 100644 --- a/upx.spec +++ b/upx.spec @@ -3,7 +3,7 @@ Version: 4.2.4 Release: 2%{?dist} Summary: Ultimate Packer for eXecutables -License: GPL-2.0-or-later AND Public Domain +License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain URL: https://github.com/upx/upx Source0: %{url}/releases/download/v%{version}/%{name}-%{version}-src.tar.xz From c55bd5c047952c0a815fece7a0f7fb630a9a51e3 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Wed, 18 Dec 2024 12:20:36 -0600 Subject: [PATCH 28/39] Provide bundled lzma-sdk --- upx.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index a0a1813..692fe5f 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 4.2.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain @@ -13,6 +13,7 @@ BuildRequires: cmake BuildRequires: ucl-devel >= 1.01 BuildRequires: zlib-devel BuildRequires: perl-podlators +Provides: bundled(lzma-sdk) = 4.43 %description UPX is a free, portable, extendable, high-performance executable @@ -43,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Wed Dec 18 2024 Gwyn Ciesla - 4.2.4-3 +- Provide bundled lzma-sdk + * Sat Jul 20 2024 Fedora Release Engineering - 4.2.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 11aaf600a8be3fdf1b42dfac9066bb3d147b7193 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 13:51:34 +0000 Subject: [PATCH 29/39] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index 692fe5f..b0d4e19 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 4.2.4 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 4.2.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Wed Dec 18 2024 Gwyn Ciesla - 4.2.4-3 - Provide bundled lzma-sdk From bc853b0baf6784ece57f3d220e6ac49860f97b97 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 20 Feb 2025 15:44:45 -0600 Subject: [PATCH 30/39] 5.0.0 --- .gitignore | 1 + sources | 2 +- upx.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index fd438c0..e673bff 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ lzma465.tar.bz2 /upx-4.2.2-src.tar.xz /upx-4.2.3-src.tar.xz /upx-4.2.4-src.tar.xz +/upx-5.0.0-src.tar.xz diff --git a/sources b/sources index 1070263..7febfea 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-4.2.4-src.tar.xz) = fc833dea010cb65a9a7b6fbf80021c98d8c112b55fa54101f3d39f09d049d75d89024206a28262996c08f253130917811736f7f546fa8743703bc86a2dbd33a5 +SHA512 (upx-5.0.0-src.tar.xz) = a706e67d572fafd1eff345f78946e296f14ebd0dacc7d07f935606812611f442538f95fc9499bb0f00aad66acac1fc2ac7355f7fec8daa463bbb2f2e5e2533dd diff --git a/upx.spec b/upx.spec index b0d4e19..fcd53a7 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx -Version: 4.2.4 -Release: 4%{?dist} +Version: 5.0.0 +Release: 1%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Thu Feb 20 2025 Gwyn Ciesla - 5.0.0-1 +- 5.0.0 + * Sun Jan 19 2025 Fedora Release Engineering - 4.2.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 80cbb78a389e48eaed09f896c93518d5090083f0 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 6 May 2025 13:39:58 -0500 Subject: [PATCH 31/39] 5.0.1 --- .gitignore | 1 + sources | 2 +- upx.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e673bff..07dd9a5 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ lzma465.tar.bz2 /upx-4.2.3-src.tar.xz /upx-4.2.4-src.tar.xz /upx-5.0.0-src.tar.xz +/upx-5.0.1-src.tar.xz diff --git a/sources b/sources index 7febfea..8c9b67e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-5.0.0-src.tar.xz) = a706e67d572fafd1eff345f78946e296f14ebd0dacc7d07f935606812611f442538f95fc9499bb0f00aad66acac1fc2ac7355f7fec8daa463bbb2f2e5e2533dd +SHA512 (upx-5.0.1-src.tar.xz) = dc8fbff8ac9abf5de0a1340eecee16c527466bf6a71fa23b7106e67c74e0bbfbdae95aeeced0d2d18b66f2823e8a3dde6db7c7d551b7e9b00dac2d72a6b24e9a diff --git a/upx.spec b/upx.spec index fcd53a7..e1f0300 100644 --- a/upx.spec +++ b/upx.spec @@ -1,5 +1,5 @@ Name: upx -Version: 5.0.0 +Version: 5.0.1 Release: 1%{?dist} Summary: Ultimate Packer for eXecutables @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Tue May 06 2025 Gwyn Ciesla - 5.0.1-1 +- 5.0.1 + * Thu Feb 20 2025 Gwyn Ciesla - 5.0.0-1 - 5.0.0 From 3687746bcbec863dc42dee0874ebda63bf0d8d3e Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Mon, 21 Jul 2025 10:39:44 -0500 Subject: [PATCH 32/39] 5.0.2 --- .gitignore | 1 + sources | 2 +- upx.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 07dd9a5..9ae1183 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ lzma465.tar.bz2 /upx-4.2.4-src.tar.xz /upx-5.0.0-src.tar.xz /upx-5.0.1-src.tar.xz +/upx-5.0.2-src.tar.xz diff --git a/sources b/sources index 8c9b67e..5c03576 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-5.0.1-src.tar.xz) = dc8fbff8ac9abf5de0a1340eecee16c527466bf6a71fa23b7106e67c74e0bbfbdae95aeeced0d2d18b66f2823e8a3dde6db7c7d551b7e9b00dac2d72a6b24e9a +SHA512 (upx-5.0.2-src.tar.xz) = d95569ff8032c07473ecff905888e69d573919d7788ddf73c406a0979c0f1c9484b5c976dfca0d9726c2dc5d524656b945670a40f950a85ef8d13a2e077430dc diff --git a/upx.spec b/upx.spec index e1f0300..4a8e125 100644 --- a/upx.spec +++ b/upx.spec @@ -1,5 +1,5 @@ Name: upx -Version: 5.0.1 +Version: 5.0.2 Release: 1%{?dist} Summary: Ultimate Packer for eXecutables @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Mon Jul 21 2025 Gwyn Ciesla - 5.0.2-1 +- 5.0.2 + * Tue May 06 2025 Gwyn Ciesla - 5.0.1-1 - 5.0.1 From 219f40c7e683a068d921bbad076e0ecd400ea0e2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 19:50:11 +0000 Subject: [PATCH 33/39] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index 4a8e125..0e927e6 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 5.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 5.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Jul 21 2025 Gwyn Ciesla - 5.0.2-1 - 5.0.2 From 1bd76fe35a058fafc50fa4608d1e3f223778e0b4 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Wed, 7 Jan 2026 09:01:49 -0600 Subject: [PATCH 34/39] 5.1.0 --- .gitignore | 1 + sources | 2 +- upx.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9ae1183..85d00c3 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ lzma465.tar.bz2 /upx-5.0.0-src.tar.xz /upx-5.0.1-src.tar.xz /upx-5.0.2-src.tar.xz +/upx-5.1.0-src.tar.xz diff --git a/sources b/sources index 5c03576..520f471 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-5.0.2-src.tar.xz) = d95569ff8032c07473ecff905888e69d573919d7788ddf73c406a0979c0f1c9484b5c976dfca0d9726c2dc5d524656b945670a40f950a85ef8d13a2e077430dc +SHA512 (upx-5.1.0-src.tar.xz) = c352715d2a28361b3559c9e59f1400dfc22abd41d45ef0d3ae40fca4522441a005bb5d8436a98c72f36ba1321decfbe0a2ebbea2b26eaf028d0c863e5dff0711 diff --git a/upx.spec b/upx.spec index 0e927e6..75dd963 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx -Version: 5.0.2 -Release: 2%{?dist} +Version: 5.1.0 +Release: 1%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Wed Jan 07 2026 Gwyn Ciesla - 5.1.0-1 +- 5.1.0 + * Fri Jul 25 2025 Fedora Release Engineering - 5.0.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 80a41f5966dca184e2aaeb696db8865242b5525b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 19:39:35 +0000 Subject: [PATCH 35/39] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index 75dd963..3e08f8f 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 5.1.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 5.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Wed Jan 07 2026 Gwyn Ciesla - 5.1.0-1 - 5.1.0 From b754f99c6e279093ee5510194e48774fec190a09 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 5 Mar 2026 14:00:37 -0600 Subject: [PATCH 36/39] 5.1.1 --- .gitignore | 1 + sources | 2 +- upx.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 85d00c3..0c6d5dc 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ lzma465.tar.bz2 /upx-5.0.1-src.tar.xz /upx-5.0.2-src.tar.xz /upx-5.1.0-src.tar.xz +/upx-5.1.1-src.tar.xz diff --git a/sources b/sources index 520f471..75bd6a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-5.1.0-src.tar.xz) = c352715d2a28361b3559c9e59f1400dfc22abd41d45ef0d3ae40fca4522441a005bb5d8436a98c72f36ba1321decfbe0a2ebbea2b26eaf028d0c863e5dff0711 +SHA512 (upx-5.1.1-src.tar.xz) = 4d2d12d90305b7f6a7fab1afa28b190e1fa90d099a0f071b420ec19ae46b8b78850ae1ad088181d00c338b35dd84762c160a2a1414e19694959943c79740c00b diff --git a/upx.spec b/upx.spec index 3e08f8f..60ea3dd 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx -Version: 5.1.0 -Release: 2%{?dist} +Version: 5.1.1 +Release: 1%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Thu Mar 05 2026 Gwyn Ciesla - 5.1.1-1 +- 5.1.1 + * Sat Jan 17 2026 Fedora Release Engineering - 5.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 5920a19d1fc07f04ca3b40bc6771498b379df6b9 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 11 Jun 2026 16:09:18 -0500 Subject: [PATCH 37/39] 5.2.0 --- .gitignore | 1 + sources | 2 +- upx.spec | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0c6d5dc..468631b 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ lzma465.tar.bz2 /upx-5.0.2-src.tar.xz /upx-5.1.0-src.tar.xz /upx-5.1.1-src.tar.xz +/upx-5.2.0-src.tar.xz diff --git a/sources b/sources index 75bd6a4..11af882 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-5.1.1-src.tar.xz) = 4d2d12d90305b7f6a7fab1afa28b190e1fa90d099a0f071b420ec19ae46b8b78850ae1ad088181d00c338b35dd84762c160a2a1414e19694959943c79740c00b +SHA512 (upx-5.2.0-src.tar.xz) = 2d108f1380fca6643c05caf1e7d8c9e801105edd4b8b9fe4a21ea80fc1d98ea150b25377073b5967a8dde6bcdb2b39e49ec2b6b16dd979c20f5db8105aed268a diff --git a/upx.spec b/upx.spec index 60ea3dd..a291846 100644 --- a/upx.spec +++ b/upx.spec @@ -1,5 +1,5 @@ Name: upx -Version: 5.1.1 +Version: 5.2.0 Release: 1%{?dist} Summary: Ultimate Packer for eXecutables @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Thu Jun 11 2026 Gwyn Ciesla - 5.2.0-1 +- 5.2.0 + * Thu Mar 05 2026 Gwyn Ciesla - 5.1.1-1 - 5.1.1 From e201493491f05af6603ee52b94d2973eea26ace7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:14:13 +0000 Subject: [PATCH 38/39] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- upx.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upx.spec b/upx.spec index a291846..527a416 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx Version: 5.2.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 5.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Thu Jun 11 2026 Gwyn Ciesla - 5.2.0-1 - 5.2.0 From 713a41261bc5e21cab37515cfed1175bf05df514 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 27 Aug 2026 11:44:38 -0500 Subject: [PATCH 39/39] 5.2.1 --- .gitignore | 1 + sources | 2 +- upx.spec | 7 +++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 468631b..1527c7a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ lzma465.tar.bz2 /upx-5.1.0-src.tar.xz /upx-5.1.1-src.tar.xz /upx-5.2.0-src.tar.xz +/upx-5.2.1-src.tar.xz diff --git a/sources b/sources index 11af882..dd2477c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (upx-5.2.0-src.tar.xz) = 2d108f1380fca6643c05caf1e7d8c9e801105edd4b8b9fe4a21ea80fc1d98ea150b25377073b5967a8dde6bcdb2b39e49ec2b6b16dd979c20f5db8105aed268a +SHA512 (upx-5.2.1-src.tar.xz) = 38fa0aa9940d9518df5bf07725ed65391d1a965cac4feace190819e7bd8125e4ed23a3795cf0fb7d4df09fbca66158265ae5774a3c48f5b55e3905fc7b962bc4 diff --git a/upx.spec b/upx.spec index 527a416..e444b9c 100644 --- a/upx.spec +++ b/upx.spec @@ -1,6 +1,6 @@ Name: upx -Version: 5.2.0 -Release: 2%{?dist} +Version: 5.2.1 +Release: 1%{?dist} Summary: Ultimate Packer for eXecutables License: GPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain @@ -44,6 +44,9 @@ rm -f %{buildroot}%{_datadir}/doc/upx/* %changelog +* Thu Aug 27 2026 Gwyn Ciesla - 5.2.1-1 +- 5.2.1 + * Fri Jul 17 2026 Fedora Release Engineering - 5.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild