public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/curl] curl-v8.23.0-3: Related: CVE-2016-5420 - fix incorrect use of a previously loaded certificate from file
@ 2026-11-03 12:36 Kamil Dudka
  0 siblings, 0 replies; only message in thread
From: Kamil Dudka @ 2026-11-03 12:36 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/curl
Branch : curl-v8.23.0-3
Commit : 0f6a97db34963d177c611b951dc057f05ca80a8f
Author : Kamil Dudka <kdudka@redhat.com>
Date   : 2016-08-26T15:48:07+02:00
Stats  : +55/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/curl/c/0f6a97db34963d177c611b951dc057f05ca80a8f?branch=curl-v8.23.0-3

Log:
Related: CVE-2016-5420 - fix incorrect use of a previously loaded certificate from file

---
diff --git a/0001-curl-7.51.0-cert-reuse.patch b/0001-curl-7.51.0-cert-reuse.patch
new file mode 100644
index 0000000..fff6c7b
--- /dev/null
+++ b/0001-curl-7.51.0-cert-reuse.patch
@@ -0,0 +1,45 @@
+From ec122e23098aad8b6e3d97070cca5858b72558e2 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Mon, 22 Aug 2016 10:24:35 +0200
+Subject: [PATCH] nss: refuse previously loaded certificate from file
+
+... when we are not asked to use a certificate from file
+
+Upstream-commit: 7700fcba64bf5806de28f6c1c7da3b4f0b38567d
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+---
+ lib/vtls/nss.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c
+index ad33f25..e467360 100644
+--- a/lib/vtls/nss.c
++++ b/lib/vtls/nss.c
+@@ -1004,10 +1004,10 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock,
+   struct ssl_connect_data *connssl = (struct ssl_connect_data *)arg;
+   struct Curl_easy *data = connssl->data;
+   const char *nickname = connssl->client_nickname;
++  static const char pem_slotname[] = "PEM Token #1";
+ 
+   if(connssl->obj_clicert) {
+     /* use the cert/key provided by PEM reader */
+-    static const char pem_slotname[] = "PEM Token #1";
+     SECItem cert_der = { 0, NULL, 0 };
+     void *proto_win = SSL_RevealPinArg(sock);
+     struct CERTCertificateStr *cert;
+@@ -1069,6 +1069,12 @@ static SECStatus SelectClientCert(void *arg, PRFileDesc *sock,
+   if(NULL == nickname)
+     nickname = "[unknown]";
+ 
++  if(!strncmp(nickname, pem_slotname, sizeof(pem_slotname) - 1U)) {
++    failf(data, "NSS: refusing previously loaded certificate from file: %s",
++          nickname);
++    return SECFailure;
++  }
++
+   if(NULL == *pRetKey) {
+     failf(data, "NSS: private key not found for certificate: %s", nickname);
+     return SECFailure;
+-- 
+2.7.4
+

diff --git a/curl.spec b/curl.spec
index 77ad046..a669a97 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,11 +1,15 @@
 Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
 Name: curl
 Version: 7.50.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: MIT
 Group: Applications/Internet
 Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
 
+# fix incorrect use of a previously loaded certificate from file
+# (related to CVE-2016-5420)
+Patch1:   0001-curl-7.51.0-cert-reuse.patch
+
 # patch making libcurl multilib ready
 Patch101: 0101-curl-7.32.0-multilib.patch
 
@@ -128,6 +132,7 @@ documentation of the library, too.
 %setup -q
 
 # upstream patches
+%patch1 -p1
 
 # Fedora patches
 %patch101 -p1
@@ -232,6 +237,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/aclocal/libcurl.m4
 
 %changelog
+* Fri Aug 26 2016 Kamil Dudka <kdudka@redhat.com> 7.50.1-2
+- fix incorrect use of a previously loaded certificate from file
+  (related to CVE-2016-5420)
+
 * Wed Aug 03 2016 Kamil Dudka <kdudka@redhat.com> 7.50.1-1
 - new upstream release (fixes CVE-2016-5419, CVE-2016-5420, and CVE-2016-5421)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-03 12:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 12:36 [rpms/curl] curl-v8.23.0-3: Related: CVE-2016-5420 - fix incorrect use of a previously loaded certificate from file Kamil Dudka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox