3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00

gnu: gnutls: Replace with 3.5.13.

This update addresses the following security advisories:

GNUTLS-SA-2017-3 (aka CVE-2017-7869) and GNUTLS-SA-2017-4.

See <https://gnutls.org/security.html> and <https://gnutls.org/news.html>.

* gnu/packages/patches/gnutls-skip-pkgconfig-test.patch,
gnu/packages/patches/gnutls-skip-trust-store-test.patch: New files.
* gnu/local.mk (dist_patch_DATA): Register patches.
* gnu/packages/tls.scm (gnutls)[replacement]: New field.
(gnutls-3.5.13): New variable.
(gnutls/guile-2.2)[replacement]: New field. Set #f.
[source]: Inherit from GNUTLS-3.5.13.
This commit is contained in:
Marius Bakke 2017-06-10 15:47:00 +02:00
parent e35dc5e75e
commit 88e2511e21
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA
4 changed files with 65 additions and 0 deletions

View file

@ -640,6 +640,8 @@ dist_patch_DATA = \
%D%/packages/patches/gmp-faulty-test.patch \
%D%/packages/patches/gnome-tweak-tool-search-paths.patch \
%D%/packages/patches/gnucash-price-quotes-perl.patch \
%D%/packages/patches/gnutls-skip-trust-store-test.patch \
%D%/packages/patches/gnutls-skip-pkgconfig-test.patch \
%D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
%D%/packages/patches/gobject-introspection-cc.patch \
%D%/packages/patches/gobject-introspection-girepository.patch \

View file

@ -0,0 +1,24 @@
FIXME: The static test fails with an error such as:
/tmp/guix-build-gnutls-3.5.13.drv-0/ccOnGPmc.o: In function `main':
c.29617.tmp.c:(.text+0x5): undefined reference to `gnutls_global_init'
collect2: error: ld returned 1 exit status
FAIL pkgconfig.sh (exit status: 1)
diff --git a/tests/pkgconfig.sh b/tests/pkgconfig.sh
index 6bd4e62f9..05aab8278 100755
--- a/tests/pkgconfig.sh
+++ b/tests/pkgconfig.sh
@@ -57,11 +57,7 @@ echo "Trying dynamic linking with:"
echo " * flags: $(${PKGCONFIG} --libs gnutls)"
echo " * common: ${COMMON}"
echo " * lib: ${CFLAGS}"
-cc ${TMPFILE} -o ${TMPFILE_O} $(${PKGCONFIG} --libs gnutls) $(${PKGCONFIG} --cflags gnutls) ${COMMON}
-
-echo ""
-echo "Trying static linking with $(${PKGCONFIG} --libs --static gnutls)"
-cc ${TMPFILE} -o ${TMPFILE_O} $(${PKGCONFIG} --static --libs gnutls) $(${PKGCONFIG} --cflags gnutls) ${COMMON}
+gcc ${TMPFILE} -o ${TMPFILE_O} $(${PKGCONFIG} --libs gnutls) $(${PKGCONFIG} --cflags gnutls) ${COMMON}
rm -f ${TMPFILE} ${TMPFILE_O}

View file

@ -0,0 +1,15 @@
Version 3.5.11 added a test to check that the default trust store is readable.
It does not exist in the build environment, so pretend everything is fine.
diff a/tests/trust-store.c b/tests/trust-store.c
--- a/tests/trust-store.c
+++ b/tests/trust-store.c
@@ -61,7 +61,7 @@
} else if (ret < 0) {
fail("error loading system trust store: %s\n", gnutls_strerror(ret));
} else if (ret == 0) {
- fail("no certificates were found in system trust store!\n");
+ success("no trust store in the Guix build environment!\n");
}
gnutls_certificate_free_credentials(x509_cred);

View file

@ -8,6 +8,7 @@
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -142,6 +143,7 @@ living in the same process.")
(define-public gnutls
(package
(name "gnutls")
(replacement gnutls-3.5.13)
(version "3.5.9")
(source (origin
(method url-fetch)
@ -214,10 +216,32 @@ required structures.")
(properties '((ftp-server . "ftp.gnutls.org")
(ftp-directory . "/gcrypt/gnutls")))))
(define gnutls-3.5.13 ;GNUTLS-SA-2017-{3,4}
(package
(inherit gnutls)
;; We use 'D' instead of '13' here to keep the store file name at
;; the same length. See <https://bugs.gnu.org/27308>.
(version "3.5.D")
(replacement #f)
(source (origin
(method url-fetch)
(uri
(string-append "mirror://gnupg/gnutls/v"
(version-major+minor version)
"/gnutls-3.5.13.tar.xz"))
(patches
(search-patches "gnutls-skip-trust-store-test.patch"
"gnutls-skip-pkgconfig-test.patch"))
(sha256
(base32
"15ihq6p0hnnhs8cnjrkj40dmlcaa1jjg8xg0g2ydbnlqs454ixbr"))))))
(define-public gnutls/guile-2.2
;; GnuTLS for Guile 2.2. This is supported by GnuTLS >= 3.5.5.
(package
(inherit gnutls)
(replacement #f)
(source (package-source gnutls-3.5.13))
(name "guile2.2-gnutls")
(arguments
;; Remove '--with-guile-site-dir=…/2.0'.