From 1030e3e048019c66e811caf229dac9584e72e9fa Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 25 Dec 2021 21:56:35 +0000 Subject: [PATCH] lapack: add patch for CVE-2021-4048 (#150788) --- .../libraries/science/math/liblapack/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/libraries/science/math/liblapack/default.nix b/pkgs/development/libraries/science/math/liblapack/default.nix index f81a02303a60..f2a50cb2d3d4 100644 --- a/pkgs/development/libraries/science/math/liblapack/default.nix +++ b/pkgs/development/libraries/science/math/liblapack/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , gfortran , cmake , shared ? true @@ -17,6 +18,14 @@ stdenv.mkDerivation rec { sha256 = "sha256-ewYUM+M7jDO5LLnB4joiKkqgXjEDmWbFZbgad8x98gc="; }; + patches = [ + (fetchpatch { + name = "CVE-2021-4048.patch"; + url = "https://github.com/Reference-LAPACK/lapack/commit/0631b6beaed60ba118b0b027c0f8d35397bf5df0.patch"; + sha256 = "1bqjw3f6ak9iz97y7ckn0rrfcgrzbn9prgfasl489qpxgzp2kjh8"; + }) + ]; + nativeBuildInputs = [ gfortran cmake ]; # Configure stage fails on aarch64-darwin otherwise, due to either clang 11 or gfortran 10.