summary refs log tree commit diff
path: root/pkgs/os-specific/linux/util-linux
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@higgsboson.tk>2016-10-02 23:13:24 +0200
committerJörg Thalheim <joerg@higgsboson.tk>2016-10-03 08:49:56 +0200
commitba00ba65eb45db72b35afc3dae619f62cec608a6 (patch)
tree94bee732ccb7634be2b000c488a6daf49d5de28f /pkgs/os-specific/linux/util-linux
parent11d7e936246842f0362935611d73406104d8c6ed (diff)
downloadnixpkgs-ba00ba65eb45db72b35afc3dae619f62cec608a6.tar
nixpkgs-ba00ba65eb45db72b35afc3dae619f62cec608a6.tar.gz
nixpkgs-ba00ba65eb45db72b35afc3dae619f62cec608a6.tar.bz2
nixpkgs-ba00ba65eb45db72b35afc3dae619f62cec608a6.tar.lz
nixpkgs-ba00ba65eb45db72b35afc3dae619f62cec608a6.tar.xz
nixpkgs-ba00ba65eb45db72b35afc3dae619f62cec608a6.tar.zst
nixpkgs-ba00ba65eb45db72b35afc3dae619f62cec608a6.zip
util-linux: workaround CVE-2016-2779
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2779
Diffstat (limited to 'pkgs/os-specific/linux/util-linux')
-rw-r--r--pkgs/os-specific/linux/util-linux/default.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix
index b777042d601..c11056dff42 100644
--- a/pkgs/os-specific/linux/util-linux/default.nix
+++ b/pkgs/os-specific/linux/util-linux/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchurl, pkgconfig, zlib, ncurses ? null, perl ? null, pam, systemd, minimal ? false }:
+{ lib, stdenv, fetchurl, pkgconfig, zlib, libseccomp, fetchpatch, autoreconfHook, ncurses ? null, perl ? null, pam, systemd, minimal ? false }:
 
 stdenv.mkDerivation rec {
   name = "util-linux-${version}";
@@ -14,7 +14,11 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./rtcwake-search-PATH-for-shutdown.patch
-  ];
+    # CVE-2016-2779
+    (fetchpatch {
+      url = https://github.com/karelzak/util-linux/commit/8e4925016875c6a4f2ab4f833ba66f0fc57396a2.patch;
+      sha256 = "0parn2zq21lh22r2ixmhqchm4jx2mwj84i9h92225hr4240xxndx";
+  })];
 
   outputs = [ "bin" "dev" "out" "man" ];
 
@@ -50,9 +54,11 @@ stdenv.mkDerivation rec {
 
   makeFlags = "usrbin_execdir=$(bin)/bin usrsbin_execdir=$(bin)/sbin";
 
-  nativeBuildInputs = [ pkgconfig ];
+  # autoreconfHook is required for CVE-2016-2779
+  nativeBuildInputs = [ pkgconfig autoreconfHook ];
+  # libseccomp is required for CVE-2016-2779
   buildInputs =
-    [ zlib pam ]
+    [ zlib pam libseccomp ]
     ++ lib.optional (ncurses != null) ncurses
     ++ lib.optional (systemd != null) systemd
     ++ lib.optional (perl != null) perl;