From 33fd455cee50864e3c122e42c0cab87483121ce8 Mon Sep 17 00:00:00 2001 From: Tomáš Mráz Date: Nov 11 2008 13:16:29 +0000 Subject: - fix three security issues in gnutls handshake - GNUTLS-SA-2008-1 (#447461, #447462, #447463) --- diff --git a/gnutls-1.4.1-cve-2008-4989.patch b/gnutls-1.4.1-cve-2008-4989.patch new file mode 100644 index 0000000..c7f5bc7 --- /dev/null +++ b/gnutls-1.4.1-cve-2008-4989.patch @@ -0,0 +1,39 @@ +diff -up gnutls-1.4.1/lib/x509/verify.c.chain-verify gnutls-1.4.1/lib/x509/verify.c +--- gnutls-1.4.1/lib/x509/verify.c.chain-verify 2008-11-11 10:55:19.000000000 +0100 ++++ gnutls-1.4.1/lib/x509/verify.c 2008-11-11 10:58:54.000000000 +0100 +@@ -379,6 +379,17 @@ _gnutls_x509_verify_certificate (const g + int i = 0, ret; + unsigned int status = 0, output; + ++ /* Check if the last certificate in the path is self signed. ++ * In that case ignore it (a certificate is trusted only if it ++ * leads to a trusted party by us, not the server's). ++ */ ++ if (clist_size > 1 && ++ gnutls_x509_crt_check_issuer (certificate_list[clist_size - 1], ++ certificate_list[clist_size - 1]) > 0) ++ { ++ clist_size--; ++ } ++ + /* Verify the last certificate in the certificate path + * against the trusted CA certificate list. + * +@@ -417,17 +428,6 @@ _gnutls_x509_verify_certificate (const g + } + #endif + +- /* Check if the last certificate in the path is self signed. +- * In that case ignore it (a certificate is trusted only if it +- * leads to a trusted party by us, not the server's). +- */ +- if (gnutls_x509_crt_check_issuer (certificate_list[clist_size - 1], +- certificate_list[clist_size - 1]) > 0 +- && clist_size > 0) +- { +- clist_size--; +- } +- + /* Verify the certificate path (chain) + */ + for (i = clist_size - 1; i > 0; i--) diff --git a/gnutls.spec b/gnutls.spec index 3792d51..fa058ba 100644 --- a/gnutls.spec +++ b/gnutls.spec @@ -1,7 +1,7 @@ Summary: A TLS protocol implementation Name: gnutls Version: 2.0.4 -Release: 3%{?dist} +Release: 4%{?dist} # The libgnutls library is LGPLv2+, utilities and remaining libraries are GPLv2+ License: GPLv2+ and LGPLv2+ Group: System Environment/Libraries @@ -16,6 +16,7 @@ Source0: %{name}-%{version}-nosrp.tar.bz2 Source1: libgnutls-config Patch0: gnutls-2.0.4-nosrp.patch Patch4: gnutls-1.4.1-sa-2008-1.patch +Patch5: gnutls-1.4.1-cve-2008-4989.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: libgcrypt >= 1.2.2 @@ -58,6 +59,7 @@ manipulation tools. %setup -q %patch0 -p1 -b .nosrp %patch4 -p1 -b .sa-2008-1 +%patch5 -p1 -b .chain-verify for i in auth_srp_rsa.c auth_srp_sb64.c auth_srp_passwd.c auth_srp.c gnutls_srp.c ext_srp.c; do touch lib/$i @@ -126,6 +128,9 @@ fi %{_mandir}/man1/* %changelog +* Tue Nov 11 2008 Tomas Mraz 2.0.4-4 +- fix chain verification issue CVE-2008-4989 (#470079) + * Tue May 20 2008 Tomas Mraz 2.0.4-3 - fix three security issues in gnutls handshake - GNUTLS-SA-2008-1 (#447461, #447462, #447463)