public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kamil Dudka <kdudka@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/curl] curl-v8.23.0-3: Related: CVE-2016-5420 - fix incorrect use of a previously loaded certificate from file
Date: Tue, 03 Nov 2026 12:36:13 GMT	[thread overview]
Message-ID: <179370937313.1.5313673381463026329.rpms-curl-0f6a97db3496@fedoraproject.org> (raw)

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)
 

                 reply	other threads:[~2026-11-03 12:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179370937313.1.5313673381463026329.rpms-curl-0f6a97db3496@fedoraproject.org \
    --to=kdudka@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox