From 056402220e54d6942a622331c8a66e983e7d7356 Mon Sep 17 00:00:00 2001 From: Rutger Helling Date: Fri, 15 Jun 2018 09:09:39 +0200 Subject: gnu: innoextract: Update to 1.7. * gnu/packages/compression.scm (innoextract): Update to 1.7. --- gnu/packages/compression.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/compression.scm') diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 2984e854ce..8f062049a6 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -2111,7 +2111,7 @@ (define-public plzip (define-public innoextract (package (name "innoextract") - (version "1.6") + (version "1.7") (source (origin (method url-fetch) @@ -2119,7 +2119,7 @@ (define-public innoextract version ".tar.gz")) (sha256 (base32 - "08sp5vbfjvq1irhhraqkn5m2x1z209r4axhx7laf1adcw30ccapi")) + "0khwi9f0q0h6xfbixrrc1rfpgj0b7ajwilq7yhmxnn5lpc807f6x")) (file-name (string-append name "-" version ".tar.gz")))) (build-system cmake-build-system) (arguments -- cgit v1.2.3 From a14de83213a8d4fe6befced5a3dcf05e40fe4513 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Sat, 16 Jun 2018 16:54:53 +0200 Subject: gnu: upx: Fix CVE-2017-15056. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/upx-protect-against-bad-crafted-input.patch: New file. * gnu/packages/compression.scm (upx)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/compression.scm | 8 +- gnu/packages/patches/upx-fix-CVE-2017-15056.patch | 96 +++++++++++++++++++++++ 3 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/upx-fix-CVE-2017-15056.patch (limited to 'gnu/packages/compression.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 3aad334a11..2856186595 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1157,6 +1157,7 @@ dist_patch_DATA = \ %D%/packages/patches/ustr-fix-build-with-gcc-5.patch \ %D%/packages/patches/util-linux-tests.patch \ %D%/packages/patches/upower-builddir.patch \ + %D%/packages/patches/upx-fix-CVE-2017-15056.patch \ %D%/packages/patches/valgrind-enable-arm.patch \ %D%/packages/patches/valgrind-glibc-compat.patch \ %D%/packages/patches/vinagre-revert-1.patch \ diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 8f062049a6..9cb0917dae 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -2209,7 +2209,8 @@ (define-public upx version "/" name "-" version "-src.tar.xz")) (sha256 (base32 - "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1")))) + "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1")) + (patches (search-patches "upx-fix-CVE-2017-15056.patch")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) ("ucl" ,ucl))) @@ -2241,6 +2242,11 @@ (define-public upx #t)) ))) (home-page "https://upx.github.io/") + ;; CVE-2017-16869 is about Mach-O files which is not of a big concern for Guix. + ;; See https://github.com/upx/upx/issues/146 and + ;; https://nvd.nist.gov/vuln/detail?vulnId=CVE-2017-16869. + ;; The issue will be fixed after version 3.94. + (properties `((lint-hidden-cve . ("CVE-2017-16869")))) (synopsis "Compression tool for executables") (description "The Ultimate Packer for eXecutables (UPX) is an executable file diff --git a/gnu/packages/patches/upx-fix-CVE-2017-15056.patch b/gnu/packages/patches/upx-fix-CVE-2017-15056.patch new file mode 100644 index 0000000000..525980e73e --- /dev/null +++ b/gnu/packages/patches/upx-fix-CVE-2017-15056.patch @@ -0,0 +1,96 @@ +From 3e0c2966dffb5dadb512a476ef4be3d0cc51c2be Mon Sep 17 00:00:00 2001 +From: Pierre Neidhardt +Date: Sat, 16 Jun 2018 16:35:00 +0200 +Subject: [PATCH] Protect against bad crafted input + +Also check for wrap-around when checking oversize involving e_shoff and e_shnum. + +raised by https://github.com/upx/upx/pull/190 + modified: p_lx_elf.cpp +--- + src/p_lx_elf.cpp | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp +index 822a7652..41e805ee 100644 +--- a/src/p_lx_elf.cpp ++++ b/src/p_lx_elf.cpp +@@ -235,8 +235,17 @@ PackLinuxElf32::PackLinuxElf32help1(InputFile *f) + sz_phdrs = 0; + return; + } ++ if (0==e_phnum) throwCantUnpack("0==e_phnum"); + e_phoff = get_te32(&ehdri.e_phoff); ++ unsigned const last_Phdr = e_phoff + e_phnum * sizeof(Elf32_Phdr); ++ if (last_Phdr < e_phoff || (unsigned long)file_size < last_Phdr) { ++ throwCantUnpack("bad e_phoff"); ++ } + e_shoff = get_te32(&ehdri.e_shoff); ++ unsigned const last_Shdr = e_shoff + e_shnum * sizeof(Elf32_Shdr); ++ if (last_Shdr < e_shoff || (unsigned long)file_size < last_Shdr) { ++ throwCantUnpack("bad e_shoff"); ++ } + sz_phdrs = e_phnum * e_phentsize; + + if (f && Elf32_Ehdr::ET_DYN!=e_type) { +@@ -599,8 +608,17 @@ PackLinuxElf64::PackLinuxElf64help1(InputFile *f) + sz_phdrs = 0; + return; + } ++ if (0==e_phnum) throwCantUnpack("0==e_phnum"); + e_phoff = get_te64(&ehdri.e_phoff); ++ upx_uint64_t const last_Phdr = e_phoff + e_phnum * sizeof(Elf64_Phdr); ++ if (last_Phdr < e_phoff || (unsigned long)file_size < last_Phdr) { ++ throwCantUnpack("bad e_phoff"); ++ } + e_shoff = get_te64(&ehdri.e_shoff); ++ upx_uint64_t const last_Shdr = e_shoff + e_shnum * sizeof(Elf64_Shdr); ++ if (last_Shdr < e_shoff || (unsigned long)file_size < last_Shdr) { ++ throwCantUnpack("bad e_shoff"); ++ } + sz_phdrs = e_phnum * e_phentsize; + + if (f && Elf64_Ehdr::ET_DYN!=e_type) { +@@ -3763,6 +3781,9 @@ void PackLinuxElf64::pack4(OutputFile *fo, Filter &ft) + + void PackLinuxElf64::unpack(OutputFile *fo) + { ++ if (e_phoff != sizeof(Elf64_Ehdr)) {// Phdrs not contiguous with Ehdr ++ throwCantUnpack("bad e_phoff"); ++ } + unsigned const c_phnum = get_te16(&ehdri.e_phnum); + upx_uint64_t old_data_off = 0; + upx_uint64_t old_data_len = 0; +@@ -3828,6 +3849,9 @@ void PackLinuxElf64::unpack(OutputFile *fo) + unsigned total_out = 0; + unsigned c_adler = upx_adler32(NULL, 0); + unsigned u_adler = upx_adler32(NULL, 0); ++ if ((MAX_ELF_HDR - sizeof(Elf64_Ehdr))/sizeof(Elf64_Phdr) < u_phnum) { ++ throwCantUnpack("bad compressed e_phnum"); ++ } + + // Packed ET_EXE has no PT_DYNAMIC. + // Packed ET_DYN has original PT_DYNAMIC for info needed by rtld. +@@ -4383,6 +4407,9 @@ Elf64_Sym const *PackLinuxElf64::elf_lookup(char const *name) const + + void PackLinuxElf32::unpack(OutputFile *fo) + { ++ if (e_phoff != sizeof(Elf32_Ehdr)) {// Phdrs not contiguous with Ehdr ++ throwCantUnpack("bad e_phoff"); ++ } + unsigned const c_phnum = get_te16(&ehdri.e_phnum); + unsigned old_data_off = 0; + unsigned old_data_len = 0; +@@ -4449,6 +4476,9 @@ void PackLinuxElf32::unpack(OutputFile *fo) + unsigned total_out = 0; + unsigned c_adler = upx_adler32(NULL, 0); + unsigned u_adler = upx_adler32(NULL, 0); ++ if ((MAX_ELF_HDR - sizeof(Elf32_Ehdr))/sizeof(Elf32_Phdr) < u_phnum) { ++ throwCantUnpack("bad compressed e_phnum"); ++ } + + // Packed ET_EXE has no PT_DYNAMIC. + // Packed ET_DYN has original PT_DYNAMIC for info needed by rtld. +-- +2.17.0 + -- cgit v1.2.3 From 3fa31317c2cae55b0d60b78aa44fea0a405eb400 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 22 Jun 2018 13:23:06 +0200 Subject: gnu: sfarkxtc: Update to 0-1.13cd6f937. * gnu/packages/compression.scm (sfarkxtc): Update to 0-1.13cd6f937. --- gnu/packages/compression.scm | 65 ++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 32 deletions(-) (limited to 'gnu/packages/compression.scm') diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 9cb0917dae..de3acaedc0 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -604,39 +604,40 @@ (define-public sfarklib (license license:gpl3+))) (define-public sfarkxtc - (let ((commit "b5e0a2ba3921f019d74d4b92bd31c36dd19d2cf1")) - (package - (name "sfarkxtc") - (version (string-take commit 10)) - (source (origin - ;; There are no release tarballs, so we just fetch the latest - ;; commit at this time. - (method git-fetch) - (uri (git-reference - (url "https://github.com/raboof/sfarkxtc.git") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0f5x6i46qfl6ry21s7g2p4sd4b2r1g4fb03yqi2vv4kq3saryhvj")))) - (build-system gnu-build-system) - (arguments - `(#:tests? #f ;no "check" target - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "Makefile" - (("/usr/local") (assoc-ref outputs "out"))) - #t))))) - (inputs - `(("zlib" ,zlib) - ("sfarklib" ,sfarklib))) - (home-page "https://github.com/raboof/sfarkxtc") - (synopsis "Basic sfArk decompressor") - (description "SfArk extractor converts SoundFonts in the compressed legacy + (let ((commit "13cd6f93725a90d91ec5ea75babf1dbd694ac463") + (revision "1")) + (package + (name "sfarkxtc") + (version (git-version "0" revision commit)) + (source (origin + ;; There are no release tarballs, so we just fetch the latest + ;; commit at this time. + (method git-fetch) + (uri (git-reference + (url "https://github.com/raboof/sfarkxtc.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1mb1jyk1m11l1gppd9hmql9cyp55sdf7jk5rbc7acky1z4k4mv19")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no "check" target + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "Makefile" + (("/usr/local") (assoc-ref outputs "out"))) + #t))))) + (inputs + `(("zlib" ,zlib) + ("sfarklib" ,sfarklib))) + (home-page "https://github.com/raboof/sfarkxtc") + (synopsis "Basic sfArk decompressor") + (description "SfArk extractor converts SoundFonts in the compressed legacy sfArk file format to the uncompressed sf2 format.") - (license license:gpl3+)))) + (license license:gpl3+)))) (define-public libmspack (package -- cgit v1.2.3