git.iko.soy/typeable/nixpkgs
on master help sign in
bzip2: patch CVE-2019-12900

The vulnerability seems quite serious. It isn't practical to use fetchpatch here due to bootstrapping, so I just committed the small patch file.

commit4fd6cb7abdac13dcb70651dabc33c03f5bc9b16e authorVladimír Čunát <v@cunat.cz> dateSat 22 Jun 2019, 11:53 (7 years ago) parentffd9bf7
2 files changed+14
pkgs/tools/compression/bzip2/cve-2019-12900.patch+13 pkgs/tools/compression/bzip2/default.nix+1
pkgs/tools/compression/bzip2/cve-2019-12900.patchnew file+13
@@ -0,0 +1,13 @@
1+https://gitlab.com/federicomenaquintero/bzip2/commit/74de1e2e6ffc9d
2+diff --git a/decompress.c b/decompress.c
3+--- a/decompress.c
4++++ b/decompress.c
5+@@ -287,7 +287,7 @@
6+ GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
7+ if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
8+ GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
9+- if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
10++ if (nSelectors < 1 || nSelectors > BZ_MAX_SELECTORS) RETURN(BZ_DATA_ERROR);
11+ for (i = 0; i < nSelectors; i++) {
12+ j = 0;
13+ while (True) {
pkgs/tools/compression/bzip2/default.nix+1
@@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
2222
2323 patches = [
2424 ./CVE-2016-3189.patch
25+ ./cve-2019-12900.patch
2526 ];
2627
2728 postPatch = ''