gnu: bsdiff: Fix CVE-2014-9862.
* gnu/packages/patches/bsdiff-CVE-2014-9862.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/compression.scm (bsdiff): Apply it.
This commit is contained in:
parent
207ef1a2b4
commit
b66fc0a64b
|
@ -840,6 +840,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/bazaar-CVE-2017-14176.patch \
|
||||
%D%/packages/patches/bc-fix-cross-compilation.patch \
|
||||
%D%/packages/patches/bear-disable-preinstall-tests.patch \
|
||||
%D%/packages/patches/bsdiff-CVE-2014-9862.patch \
|
||||
%D%/packages/patches/bsd-games-2.17-64bit.patch \
|
||||
%D%/packages/patches/bsd-games-add-configure-config.patch \
|
||||
%D%/packages/patches/bsd-games-add-wrapper.patch \
|
||||
|
|
|
@ -963,7 +963,8 @@ (define-public bsdiff
|
|||
(uri (string-append home-page name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq"))))
|
||||
"0j2zm3z271x5aw63mwhr3vymzn45p2vvrlrpm9cz2nywna41b0hq"))
|
||||
(patches (search-patches "bsdiff-CVE-2014-9862.patch"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:make-flags (list "INSTALL=install"
|
||||
|
|
15
gnu/packages/patches/bsdiff-CVE-2014-9862.patch
Normal file
15
gnu/packages/patches/bsdiff-CVE-2014-9862.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
diff --git a/bspatch.c b/bspatch.c
|
||||
index 8d95633..ab77722 100644
|
||||
--- a/bspatch.c
|
||||
+++ b/bspatch.c
|
||||
|
||||
@@ -187,6 +187,10 @@
|
||||
};
|
||||
|
||||
/* Sanity-check */
|
||||
+ if ((ctrl[0] < 0) || (ctrl[1] < 0))
|
||||
+ errx(1,"Corrupt patch\n");
|
||||
+
|
||||
+ /* Sanity-check */
|
||||
if(newpos+ctrl[0]>newsize)
|
||||
errx(1,"Corrupt patch\n");
|
Loading…
Reference in a new issue