summary refs log tree commit diff
path: root/gnu/packages/nettle.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/nettle.scm')
-rw-r--r--gnu/packages/nettle.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/packages/nettle.scm b/gnu/packages/nettle.scm
index 753e2d6e7e..3d394dc746 100644
--- a/gnu/packages/nettle.scm
+++ b/gnu/packages/nettle.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016, 2021 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;;
@@ -25,6 +25,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages m4))
 
@@ -77,6 +78,7 @@ themselves.")
   ;; cannot use it yet.  So keep it separate.
   (package (inherit nettle-2)
     (version "3.5.1")
+    (replacement nettle-3.5/fixed)
     (source (origin
               (method url-fetch)
               (uri (string-append "mirror://gnu/nettle/nettle-"
@@ -91,6 +93,13 @@ themselves.")
         ;; at run time based on CPU features (starting from 3.1.)
         `(cons "--enable-fat" ,flags))))))
 
+(define nettle-3.5/fixed
+  (package-with-extra-patches
+   nettle-3.5
+   (search-patches "nettle-3.5-check-_pkcs1_sec_decrypt-msg-len.patch"
+                   "nettle-3.5-CVE-2021-3580-pt1.patch"
+                   "nettle-3.5-CVE-2021-3580-pt2.patch")))
+
 (define-public nettle-3.7
   (package (inherit nettle-3.5)
     (version "3.7.2")