From c7e4ac606da2b3cdfa6a32b1e4f1ad35af5140a1 Mon Sep 17 00:00:00 2001
From: Andrei Stepanov
Date: Tue, 26 Sep 2017 13:21:37 +0000
Subject: [PATCH 001/260] Add CI tests using the standard test interface
Adds tests according to the CI wiki [0] specifically the standard test interface in the spec [1].
[0] https://fedoraproject.org/wiki/CI
[1] https://fedoraproject.org/wiki/Changes/InvokingTests
Signed-off-by: Andrei Stepanov
---
tests/non-root-user-download/Makefile | 63 ++++++++++
tests/non-root-user-download/PURPOSE | 3 +
tests/non-root-user-download/runtest.sh | 92 ++++++++++++++
tests/non-root-user-download/runtest.yml | 64 ++++++++++
tests/scp-and-sftp-download-test/Makefile | 63 ++++++++++
tests/scp-and-sftp-download-test/PURPOSE | 12 ++
tests/scp-and-sftp-download-test/runtest.sh | 130 ++++++++++++++++++++
tests/tests.yml | 26 ++++
8 files changed, 453 insertions(+)
create mode 100644 tests/non-root-user-download/Makefile
create mode 100644 tests/non-root-user-download/PURPOSE
create mode 100644 tests/non-root-user-download/runtest.sh
create mode 100644 tests/non-root-user-download/runtest.yml
create mode 100644 tests/scp-and-sftp-download-test/Makefile
create mode 100644 tests/scp-and-sftp-download-test/PURPOSE
create mode 100644 tests/scp-and-sftp-download-test/runtest.sh
create mode 100644 tests/tests.yml
diff --git a/tests/non-root-user-download/Makefile b/tests/non-root-user-download/Makefile
new file mode 100644
index 0000000..9746b63
--- /dev/null
+++ b/tests/non-root-user-download/Makefile
@@ -0,0 +1,63 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Makefile of /CoreOS/curl/Sanity/non-root-user-download
+# Description: various download methods with non-root user
+# Author: Karel Srot
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/CoreOS/curl/Sanity/non-root-user-download
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+ ./runtest.sh
+
+build: $(BUILT_FILES)
+ test -x runtest.sh || chmod a+x runtest.sh
+
+clean:
+ rm -f *~ $(BUILT_FILES)
+
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+ @echo "Owner: Karel Srot " > $(METADATA)
+ @echo "Name: $(TEST)" >> $(METADATA)
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
+ @echo "Description: various download methods with non-root user" >> $(METADATA)
+ @echo "Type: Sanity" >> $(METADATA)
+ @echo "TestTime: 5m" >> $(METADATA)
+ @echo "RunFor: curl" >> $(METADATA)
+ @echo "Requires: curl" >> $(METADATA)
+ @echo "Priority: Normal" >> $(METADATA)
+ @echo "License: GPLv2" >> $(METADATA)
+ @echo "Confidential: no" >> $(METADATA)
+ @echo "Destructive: no" >> $(METADATA)
+
+ rhts-lint $(METADATA)
diff --git a/tests/non-root-user-download/PURPOSE b/tests/non-root-user-download/PURPOSE
new file mode 100644
index 0000000..048ed68
--- /dev/null
+++ b/tests/non-root-user-download/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of /CoreOS/curl/Sanity/non-root-user-download
+Description: various download methods with non-root user
+Author: Karel Srot
diff --git a/tests/non-root-user-download/runtest.sh b/tests/non-root-user-download/runtest.sh
new file mode 100644
index 0000000..1b5f8f1
--- /dev/null
+++ b/tests/non-root-user-download/runtest.sh
@@ -0,0 +1,92 @@
+#!/bin/bash
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# runtest.sh of /CoreOS/curl/Sanity/non-root-user-download
+# Description: various download methods with non-root user
+# Author: Karel Srot
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include Beaker environment
+. /usr/bin/rhts-environment.sh || exit 1
+. /usr/share/beakerlib/beakerlib.sh || exit 1
+
+PACKAGE="curl"
+
+FTP_URL=ftp://ftp.scientificlinux.org/linux/fedora/releases/18/Live/x86_64/Fedora-18-x86_64-Live-CHECKSUM
+HTTP_URL=https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/18/Live/x86_64/Fedora-18-x86_64-Live-CHECKSUM
+CONTENT=a276e06d244e04b765f0a35532d9036ad84f340b0bdcc32e0233a8fbc31d5bed
+PASSWORD=pAssw0rd
+OPTIONS=""
+rlIsRHEL 7 && OPTIONS="--insecure"
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlAssertRpm $PACKAGE
+ rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
+ rlRun "pushd $TmpDir"
+ rlRun "useradd -m curltester" 0 "Adding the test user"
+ rlRun "echo $PASSWORD | passwd --stdin curltester" 0 "Setting the password for the test user"
+ rlRun "su - curltester -c 'echo $CONTENT > ~/testfile'" 0 "Creating ~curltester/testfile"
+ [ -d $HOME/.ssh ] || ( mkdir $HOME/.ssh && restorecon HOME/.ssh )
+ rlFileBackup $HOME/.ssh/known_hosts /etc/hosts
+ ssh-keygen -F localhost -f $HOME/.ssh/known_hosts || rlRun "ssh-keyscan localhost >> $HOME/.ssh/known_hosts"
+ rlPhaseEnd
+
+ rlPhaseStartTest "http download"
+ rlRun "su - curltester -c 'curl $HTTP_URL' &> http.log"
+ cat http.log
+ rlAssertGrep "$CONTENT" http.log
+ rlPhaseEnd
+
+ rlPhaseStartTest "ftp download"
+ rlRun "su - curltester -c 'curl $FTP_URL' &> ftp.log"
+ cat ftp.log
+ rlAssertGrep "$CONTENT" ftp.log
+ rlPhaseEnd
+
+if ! rlIsRHEL 5; then
+# scp sftp not supported on RHEL5
+
+ rlPhaseStartTest "scp download"
+ rlRun "curl -u curltester:$PASSWORD $OPTIONS scp://localhost/home/curltester/testfile &> scp.log"
+ cat scp.log
+ rlAssertGrep "$CONTENT" scp.log
+ rlPhaseEnd
+
+ rlPhaseStartTest "sftp download"
+ rlRun "curl -u curltester:$PASSWORD $OPTIONS sftp://localhost/home/curltester/testfile &> sftp.log"
+ cat sftp.log
+ rlAssertGrep "$CONTENT" sftp.log
+ rlPhaseEnd
+
+fi
+
+ rlPhaseStartCleanup
+ rlRun "rm -f $HOME/.ssh/known_hosts"
+ rlFileRestore
+ rlRun "popd"
+ rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
+ rlRun "userdel -r --force curltester"
+ rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
diff --git a/tests/non-root-user-download/runtest.yml b/tests/non-root-user-download/runtest.yml
new file mode 100644
index 0000000..c03e729
--- /dev/null
+++ b/tests/non-root-user-download/runtest.yml
@@ -0,0 +1,64 @@
+- hosts: '{{ hosts | default("localhost") }}'
+ vars:
+ package: "curl"
+ tasks:
+ - name: "Set Content variables"
+ set_fact:
+ content: "a276e06d244e04b765f0a35532d9036ad84f340b0bdcc32e0233a8fbc31d5bed"
+ password: "pAssw0rd"
+ crypt_password: "$6$/5GE87XLYLLfB3qx$w84Kct34UZG/4buTSXWkaaVIsw2xGXSAdmnS2QYdG8TtRgTsBnHdFdSkhoy.tKIE6A6LKlxczIZjQbpB19k7B1"
+ - name: "Create user curltester"
+ user:
+ name: "curltester"
+ password: "{{ crypt_password }}"
+ - name: "Copy testfile"
+ copy:
+ dest: "/home/curltester/testfile"
+ content: "{{ content }}"
+ - block:
+ - name: "http download"
+ command: "curl https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/18/Live/x86_64/Fedora-18-x86_64-Live-CHECKSUM"
+ args:
+ warn: false
+ register: http
+ become: yes
+ become_user: curltester
+ - name: "Compare http output"
+ fail:
+ msg: "{{ content }} not in {{ http.stdout }}"
+ when: content not in http.stdout
+ - name: "ftp download"
+ command: "curl ftp://ftp.scientificlinux.org/linux/fedora/releases/18/Live/x86_64/Fedora-18-x86_64-Live-CHECKSUM"
+ args:
+ warn: false
+ register: ftp
+ become: yes
+ become_user: curltester
+ - name: "Compare ftp output"
+ fail:
+ msg: "{{ content }} not in {{ ftp.stdout }}"
+ when: content not in ftp.stdout
+ - name: "scp download"
+ command: "curl -u curltester:{{ password }} --insecure scp://localhost/home/curltester/testfile"
+ args:
+ warn: false
+ register: scp
+ - name: "Compare scp output"
+ fail:
+ msg: "{{ content }} not in {{ scp.stdout }}"
+ when: content not in scp.stdout
+ - name: "sftp download"
+ command: "curl -u curltester:{{ password }} --insecure sftp://localhost/home/curltester/testfile"
+ args:
+ warn: false
+ register: sftp
+ - name: "Compare sftp output"
+ fail:
+ msg: "{{ content }} not in {{ sftp.stdout }}"
+ when: content not in sftp.stdout
+ always:
+ - name: "Remove user curltester"
+ user:
+ name: "curltester"
+ remove: yes
+ state: absent
diff --git a/tests/scp-and-sftp-download-test/Makefile b/tests/scp-and-sftp-download-test/Makefile
new file mode 100644
index 0000000..b4d1c52
--- /dev/null
+++ b/tests/scp-and-sftp-download-test/Makefile
@@ -0,0 +1,63 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Makefile of /CoreOS/curl/Sanity/scp-and-sftp-download-test
+# Description: downloads test file through scp and sftp
+# Author: Karel Srot
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/CoreOS/curl/Sanity/scp-and-sftp-download-test
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+ ./runtest.sh
+
+build: $(BUILT_FILES)
+ test -x runtest.sh || chmod a+x runtest.sh
+
+clean:
+ rm -f *~ $(BUILT_FILES)
+
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+ @echo "Owner: Karel Srot " > $(METADATA)
+ @echo "Name: $(TEST)" >> $(METADATA)
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
+ @echo "Description: downloads test file through scp and sftp" >> $(METADATA)
+ @echo "Type: Sanity" >> $(METADATA)
+ @echo "TestTime: 10m" >> $(METADATA)
+ @echo "RunFor: curl" >> $(METADATA)
+ @echo "Requires: curl openssh" >> $(METADATA)
+ @echo "Priority: Normal" >> $(METADATA)
+ @echo "License: GPLv2" >> $(METADATA)
+ @echo "Confidential: no" >> $(METADATA)
+ @echo "Destructive: no" >> $(METADATA)
+
+ rhts-lint $(METADATA)
diff --git a/tests/scp-and-sftp-download-test/PURPOSE b/tests/scp-and-sftp-download-test/PURPOSE
new file mode 100644
index 0000000..03adc4c
--- /dev/null
+++ b/tests/scp-and-sftp-download-test/PURPOSE
@@ -0,0 +1,12 @@
+PURPOSE of /CoreOS/curl/Sanity/scp-and-sftp-download-test
+Description: downloads test file through scp and sftp
+Author: Karel Srot
+
+Test scenario:
+- scp download
+- sftp download
+- scp upload
+- sftp upload
+
+When PUBKEY_PARAM global variable is set to 'empty' or 'none', scenarios are executed
+with empty --pubkey parameter (--pubkey "") or with the paramiter omitted
diff --git a/tests/scp-and-sftp-download-test/runtest.sh b/tests/scp-and-sftp-download-test/runtest.sh
new file mode 100644
index 0000000..6e5d748
--- /dev/null
+++ b/tests/scp-and-sftp-download-test/runtest.sh
@@ -0,0 +1,130 @@
+#!/bin/bash
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# runtest.sh of /CoreOS/curl/Sanity/scp-and-sftp-download-test
+# Description: downloads test file through scp and sftp
+# Author: Karel Srot
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# Copyright (c) 2012 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing
+# to use, modify, copy, or redistribute it subject to the terms
+# and conditions of the GNU General Public License version 2.
+#
+# This program is distributed in the hope that it will be
+# useful, but WITHOUT ANY WARRANTY; without even the implied
+# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include Beaker environment
+. /usr/bin/rhts-environment.sh
+. /usr/lib/beakerlib/beakerlib.sh
+
+PACKAGE="curl"
+
+# GLOBAL/ENVIRONMENT VARIABLE:
+# PUBKEY_PARAM
+
+if [ "$PUBKEY_PARAM" == 'none' ]; then
+ PUBKEY_PARAM=""
+elif [ "$PUBKEY_PARAM" == 'empty' ]; then
+ PUBKEY_PARAM="--pubkey ''"
+else
+ PUBKEY_PARAM='--pubkey /root/.ssh/id_rsa.pub'
+fi
+
+FILESIZE=200 #MB
+OPTIONS=""
+rlIsRHEL 7 && OPTIONS="--insecure"
+
+rlJournalStart
+ rlPhaseStartSetup
+ rlAssertRpm $PACKAGE
+ rlFileBackup --clean /root/.ssh/known_hosts /root/.ssh
+ rlFileBackup --clean /etc/ssh/sshd_config
+ rlRun "useradd -m curltestuser"
+
+ # In FIPS-140 we need to explicitly allow one of libssh2-implemented
+ # Kex algorithms (eg. DH14-SHA1).
+ rlRun "echo 'KexAlgorithms +diffie-hellman-group14-sha1' >> /etc/ssh/sshd_config" 0
+ rlServiceStop "sshd"
+ rlRun "service sshd start && sleep 5" 0
+
+ # file for download test
+ rlRun "su - curltestuser -c 'dd if=/dev/zero of=testfile bs=1M count=200'" 0 "Creating $FILESIZE MB large test file"
+ SUM=`sha256sum /home/curltestuser/testfile | cut -d ' ' -f 1`
+ rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
+ rlRun "pushd $TmpDir"
+ rlRun "rm -vf /root/.ssh/*"
+ rlRun "ssh-keygen -t rsa -f /root/.ssh/id_rsa -N ''" 0 "Generate ssh key"
+ rlRun "mkdir /home/curltestuser/.ssh && cat /root/.ssh/id_rsa.pub > /home/curltestuser/.ssh/authorized_keys && chown -R curltestuser.curltestuser /home/curltestuser/.ssh/" 0 "Save the key to .ssh/authorized_keys"
+
+ # this is a workaround as libssh2 is not able to use newer hashes
+ #rlRun "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/root/.ssh/known_hosts curltestuser@localhost 'exit'" 0 "First ssh login to add localhost to known_hosts"
+ rlRun "ssh-keyscan localhost >>/root/.ssh/known_hosts"
+
+ # files for upload test
+ rlRun "dd if=/dev/zero of=uploadfile1 bs=1M count=50" 0 "Creating 50 MB large test file"
+ UPSUM1=`sha256sum uploadfile1 | cut -d ' ' -f 1`
+ rlRun "dd if=/dev/zero of=uploadfile2 bs=1M count=20" 0 "Creating 20 MB large test file"
+ UPSUM2=`sha256sum uploadfile2 | cut -d ' ' -f 1`
+ rlPhaseEnd
+
+ rlPhaseStartTest "scp download test"
+ rlRun "curl -o ./scp_file -u curltestuser: --key /root/.ssh/id_rsa $PUBKEY_PARAM $OPTIONS scp://localhost/home/curltestuser/testfile" 0 "Initiate curl scp download"
+ rlAssertExists scp_file
+ SCPSUM=`sha256sum ./scp_file | cut -d ' ' -f 1`
+ rlAssertEquals "Checking that whole file was properly downloaded" $SUM $SCPSUM
+ rm -f ./scp_file
+ rlPhaseEnd
+
+ rlPhaseStartTest "sftp download test"
+ rlRun "curl -o ./sftp_file -u curltestuser: --key /root/.ssh/id_rsa $PUBKEY_PARAM $OPTIONS sftp://localhost/home/curltestuser/testfile" 0 "Initiate curl scp download"
+ rlAssertExists sftp_file
+ SFTPSUM=`sha256sum ./sftp_file | cut -d ' ' -f 1`
+ rlAssertEquals "Checking that whole file was properly downloaded" $SUM $SFTPSUM
+ rm -f ./sftp_file
+ rlPhaseEnd
+
+ rlPhaseStartTest "scp upload test"
+ rlRun "curl -T '{uploadfile1,uploadfile2}' scp://localhost/home/curltestuser/ -u curltestuser: --key /root/.ssh/id_rsa $PUBKEY_PARAM $OPTIONS" 0 "Initiate curl scp upload"
+ rlAssertExists /home/curltestuser/uploadfile1
+ rlAssertExists /home/curltestuser/uploadfile2
+ SCPUPSUM1=`sha256sum /home/curltestuser/uploadfile1 | cut -d ' ' -f 1`
+ SCPUPSUM2=`sha256sum /home/curltestuser/uploadfile2 | cut -d ' ' -f 1`
+ rlAssertEquals "Checking that 1st file was properly uploaded" ${UPSUM1} ${SCPUPSUM1}
+ rlAssertEquals "Checking that 2nd file was properly uploaded" ${UPSUM2} ${SCPUPSUM2}
+ rm -f /home/curltestuser/uploadfile1 /home/curltestuser/uploadfile2
+ rlPhaseEnd
+
+ rlPhaseStartTest "sftp upload test"
+ rlRun "curl -T '{uploadfile1,uploadfile2}' sftp://localhost/home/curltestuser/ -u curltestuser: --key /root/.ssh/id_rsa $PUBKEY_PARAM $OPTIONS" 0 "Initiate curl sftp upload"
+ rlAssertExists /home/curltestuser/uploadfile1
+ rlAssertExists /home/curltestuser/uploadfile2
+ SFTPUPSUM1=`sha256sum /home/curltestuser/uploadfile1 | cut -d ' ' -f 1`
+ SFTPUPSUM2=`sha256sum /home/curltestuser/uploadfile2 | cut -d ' ' -f 1`
+ rlAssertEquals "Checking that 1st file was properly uploaded" ${UPSUM1} ${SFTPUPSUM1}
+ rlAssertEquals "Checking that 2nd file was properly uploaded" ${UPSUM2} ${SFTPUPSUM2}
+ rm -f /home/curltestuser/uploadfile1 /home/curltestuser/uploadfile2
+ rlPhaseEnd
+
+
+ rlPhaseStartCleanup
+ rlRun "userdel -r --force curltestuser"
+ rlRun "popd"
+ rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
+ rlFileRestore
+ rlServiceRestore "sshd"
+ rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
diff --git a/tests/tests.yml b/tests/tests.yml
new file mode 100644
index 0000000..819d636
--- /dev/null
+++ b/tests/tests.yml
@@ -0,0 +1,26 @@
+---
+# Tests for Classic
+- hosts: localhost
+ roles:
+ - role: standard-test-beakerlib
+ tags:
+ - classic
+ tests:
+ - scp-and-sftp-download-test
+ - non-root-user-download
+ required_packages:
+ - findutils # non-root-user-download needs find command
+ # scp-and-sftp-download-test needs find command
+ - passwd # non-root-user-download needs passwd command
+ - openssh-clients # non-root-user-download needs ssh-keyscan command
+
+# Tests for Atomic
+- hosts: localhost
+ roles:
+ - role: standard-test-beakerlib
+ tags:
+ - atomic
+ tests:
+ - scp-and-sftp-download-test
+ - non-root-user-download
+
From 46c8abb050e116d84123c9a0d57992d3cc3f0af5 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 4 Oct 2017 09:31:13 +0200
Subject: [PATCH 002/260] new upstream release - 7.56.0 (fixes
CVE-2017-1000254)
---
0001-curl-7.55.1-zsh-completion.patch | 67 ---------------------
0002-curl-7.55.1-proxy-connect.patch | 40 ------------
0102-curl-7.36.0-debug.patch | 2 +-
0103-curl-7.55.1-system-crypto-policy.patch | 27 ---------
curl-7.55.1.tar.xz.asc | 11 ----
curl-7.56.0.tar.xz.asc | 11 ++++
curl.spec | 19 ++----
sources | 2 +-
8 files changed, 18 insertions(+), 161 deletions(-)
delete mode 100644 0001-curl-7.55.1-zsh-completion.patch
delete mode 100644 0002-curl-7.55.1-proxy-connect.patch
delete mode 100644 0103-curl-7.55.1-system-crypto-policy.patch
delete mode 100644 curl-7.55.1.tar.xz.asc
create mode 100644 curl-7.56.0.tar.xz.asc
diff --git a/0001-curl-7.55.1-zsh-completion.patch b/0001-curl-7.55.1-zsh-completion.patch
deleted file mode 100644
index 8a37cd4..0000000
--- a/0001-curl-7.55.1-zsh-completion.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 918eb4c10b60a58ea6b14bea7b9fbfba4d29598c Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Mon, 14 Aug 2017 16:13:32 +0200
-Subject: [PATCH] zsh.pl: produce a working completion script again
-
-Commit curl-7_54_0-118-g8b2f22e changed the output format of curl --help
-to use and instead of FILE and DIR, which caused zsh.pl to
-produce a broken completion script:
-
-% curl --
-_curl:10: no such file or directory: seconds
-
-Closes #1779
-
-Upstream-commit: ab2a7079cd2a1ec279b1e6b587ba48e50c155e91
-Signed-off-by: Kamil Dudka
----
- docs/cmdline-opts/cacert.d | 2 +-
- scripts/zsh.pl | 5 +++--
- src/tool_help.c | 2 +-
- 3 files changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/docs/cmdline-opts/cacert.d b/docs/cmdline-opts/cacert.d
-index 04e1139..b2ecf90 100644
---- a/docs/cmdline-opts/cacert.d
-+++ b/docs/cmdline-opts/cacert.d
-@@ -1,5 +1,5 @@
- Long: cacert
--Arg:
-+Arg:
- Help: CA certificate to verify peer against
- Protocols: TLS
- ---
-diff --git a/scripts/zsh.pl b/scripts/zsh.pl
-index f0d8c19..82b4d9f 100755
---- a/scripts/zsh.pl
-+++ b/scripts/zsh.pl
-@@ -54,10 +54,11 @@ sub parse_main_opts {
- $option .= '}' if defined $short;
- $option .= '\'[' . trim($desc) . ']\'' if defined $desc;
-
-- $option .= ":$arg" if defined $arg;
-+ $option .= ":'$arg'" if defined $arg;
-
- $option .= ':_files'
-- if defined $arg and ($arg eq 'FILE' || $arg eq 'DIR');
-+ if defined $arg and ($arg eq '' || $arg eq ''
-+ || $arg eq '');
-
- push @list, $option;
- }
-diff --git a/src/tool_help.c b/src/tool_help.c
-index 42dc779..a5bfaba 100644
---- a/src/tool_help.c
-+++ b/src/tool_help.c
-@@ -54,7 +54,7 @@ static const struct helptxt helptext[] = {
- "Append to target file when uploading"},
- {" --basic",
- "Use HTTP Basic Authentication"},
-- {" --cacert ",
-+ {" --cacert ",
- "CA certificate to verify peer against"},
- {" --capath ",
- "CA directory to verify peer against"},
---
-2.9.5
-
diff --git a/0002-curl-7.55.1-proxy-connect.patch b/0002-curl-7.55.1-proxy-connect.patch
deleted file mode 100644
index a87e787..0000000
--- a/0002-curl-7.55.1-proxy-connect.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 74dac344b2feb2e0f4baddb70532dc8e45d2d817 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)"
-Date: Fri, 18 Aug 2017 10:43:02 +0200
-Subject: [PATCH] http: Don't wait on CONNECT when there is no proxy
-
-Since curl 7.55.0, NetworkManager almost always failed its connectivity
-check by timeout. I bisected this to 5113ad04 (http-proxy: do the HTTP
-CONNECT process entirely non-blocking).
-
-This patch replaces !Curl_connect_complete with Curl_connect_ongoing,
-which returns false if the CONNECT state was left uninitialized and lets
-the connection continue.
-
-Closes #1803
-Fixes #1804
-
-Also-fixed-by: Gergely Nagy
-
-Upstream-commit: 74dac344b2feb2e0f4baddb70532dc8e45d2d817
-Signed-off-by: Kamil Dudka
----
- lib/http.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/http.c b/lib/http.c
-index 35c7c3d43..3e3313278 100644
---- a/lib/http.c
-+++ b/lib/http.c
-@@ -1371,7 +1371,7 @@ CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
- if(CONNECT_FIRSTSOCKET_PROXY_SSL())
- return CURLE_OK; /* wait for HTTPS proxy SSL initialization to complete */
-
-- if(!Curl_connect_complete(conn))
-+ if(Curl_connect_ongoing(conn))
- /* nothing else to do except wait right now - we're not done here. */
- return CURLE_OK;
-
---
-2.13.5
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index c26a03a..9cbf61b 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -17079,18 +17079,11 @@ $as_echo "yes" >&6; }
+@@ -20351,18 +20351,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/0103-curl-7.55.1-system-crypto-policy.patch b/0103-curl-7.55.1-system-crypto-policy.patch
deleted file mode 100644
index 8dd670b..0000000
--- a/0103-curl-7.55.1-system-crypto-policy.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 7271547cb46a4dc28004febaea19e5edaa2250d2 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Tue, 22 Aug 2017 17:02:26 +0200
-Subject: [PATCH] openssl: utilize system wide crypto policies
-
-... unless explicitly overridden via libcurl API
----
- lib/vtls/openssl.h | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h
-index b9648d5..48036e1 100644
---- a/lib/vtls/openssl.h
-+++ b/lib/vtls/openssl.h
-@@ -119,8 +119,7 @@ bool Curl_ossl_cert_status_request(void);
- #endif
- #define curlssl_cert_status_request() Curl_ossl_cert_status_request()
-
--#define DEFAULT_CIPHER_SELECTION \
-- "ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH"
-+#define DEFAULT_CIPHER_SELECTION "PROFILE=SYSTEM"
-
- #endif /* USE_OPENSSL */
- #endif /* HEADER_CURL_SSLUSE_H */
---
-2.9.5
-
diff --git a/curl-7.55.1.tar.xz.asc b/curl-7.55.1.tar.xz.asc
deleted file mode 100644
index c6d2d29..0000000
--- a/curl-7.55.1.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlmRPboACgkQXMkI/bce
-EsIxOAf9GPx5uj4rzy5VW8UhHgZXJl97S9mEVt8I6DnwpLrlCsV7jf4CHpys0Ymt
-kaRoqudjCfjfm2BRtoTZq9ZmWv6vMwuwKrfGwQSmtyNiVFnCZ2hX4QEErMDP27pn
-yJnlxO0MQVXCpKAxvmx2yRQ/qoGX18dGENBGe5USBOzh3QWArIN8vIaGsINvCmcM
-StMzgzNs+x4MP75xt6Wf+MH2biMfyXoq4zFsVKRYDlwZyr495uT9Zms4HzxPLlap
-LPotKQTj1ZcmC0tVLGDWXEx/aE65tLhsJjyLrIlIx+VvkKPwxN8rBntAAC8jh6az
-5bhonUTL94v5XnKySk7srhNP7ds8qQ==
-=3zTB
------END PGP SIGNATURE-----
diff --git a/curl-7.56.0.tar.xz.asc b/curl-7.56.0.tar.xz.asc
new file mode 100644
index 0000000..f1e3ad4
--- /dev/null
+++ b/curl-7.56.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlnUd8QACgkQXMkI/bce
+EsLXpgf/RNe897KrWq4s9H/ycobJXt4UEHXMbpjxQwEggNO4n0EwZ7Mt7WZ1aYR9
+q0ELx4mYS0/Lr9u1v5RxtMiG9L91B9nSdhFzL3/hhiTubTyhxgleGJMc94iTFMQY
+FjZYWZKHtBQlS8rjzTy2f7ESBIAs7zDPgWCfUlm0iuawSPx/Rw8ZrxC4yULvRubV
+2wZgjOZeVnhTt6CyNihY9+xrNgEOLAd2b0zjDJSoS0iQmZ5QYZKP+XeD9imQvLLF
+O0yhlE9PgCJTGCfjoehQop9rR7CtzDTT65A+syab5mQY+YbphL+8MfjKtoeWA78I
+JzW//7fC4iCORd3D/HJ1lOa442cfCA==
+=qKHn
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 23682db..6f46295 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,26 +1,17 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.55.1
-Release: 5%{?dist}
+Version: 7.56.0
+Release: 1%{?dist}
License: MIT
Group: Applications/Internet
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# make zsh completion work again
-Patch1: 0001-curl-7.55.1-zsh-completion.patch
-
-# http: Don't wait on CONNECT when there is no proxy (#1485702)
-Patch2: 0002-curl-7.55.1-proxy-connect.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
# prevent configure script from discarding -g in CFLAGS (#496778)
Patch102: 0102-curl-7.36.0-debug.patch
-# utilize system wide crypto policies for TLS (#1483972)
-Patch103: 0103-curl-7.55.1-system-crypto-policy.patch
-
# use localhost6 instead of ip6-localhost in the curl test-suite
Patch104: 0104-curl-7.19.7-localhost6.patch
@@ -158,13 +149,10 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
-%patch2 -p1
# Fedora patches
%patch101 -p1
%patch102 -p1
-%patch103 -p1
%patch104 -p1
# regenerate Makefile.in files
@@ -314,6 +302,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
+* Wed Oct 04 2017 Kamil Dudka - 7.56.0-1
+- new upstream release (fixes CVE-2017-1000254)
+
* Mon Aug 28 2017 Kamil Dudka - 7.55.1-5
- apply the patch for the previous commit and fix its name (#1485702)
diff --git a/sources b/sources
index 1002b5a..6d1593a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.55.1.tar.xz) = 69f906655064b9cfef5b8763a893a658b25fcc4e595141ef122ac2b12158c5dc3b9535cb392f6f5af8346b6d495eb0609a08b5a6e638d4b10b82a15a0e8a7517
+SHA512 (curl-7.56.0.tar.xz) = a6bd5c56cd3a939a31b755bee3733df6670eec3d65b81b6c3e32ef9df110e3e748adc2cee81b1eb29f81cdf344230314c7ac1a2ed8f329f41c8352f920de3bfe
From c4a2596b222f761cf252d6d0a4f1ffaf16285e77 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 4 Oct 2017 09:58:47 +0200
Subject: [PATCH 003/260] re-enable temporarily disabled IDN2 test-cases
test2033 is now marked flaky by upstream, so it does not need
to explicitly disabled any more
---
curl.spec | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/curl.spec b/curl.spec
index 6f46295..ee8b9dd 100644
--- a/curl.spec
+++ b/curl.spec
@@ -161,17 +161,13 @@ be installed.
# disable test 1112 (#565305) and test 1801
#
-# and test 2033, which is a flaky test for HTTP/1 pipelining
-printf "1112\n1801\n2033\n" >> tests/data/DISABLED
+printf "1112\n1801\n" >> tests/data/DISABLED
# disable test 1319 on ppc64 (server times out)
%ifarch ppc64
echo "1319" >> tests/data/DISABLED
%endif
-# temporarily disable failing libidn2 test-cases
-printf "1034\n1035\n2046\n2047\n" >> tests/data/DISABLED
-
%build
mkdir build-{full,minimal}
export common_configure_opts=" \
From 5d4a9257c35ec5127b97c7c29c350b6698981fa4 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 23 Oct 2017 10:10:34 +0200
Subject: [PATCH 004/260] new upstream release - 7.56.1 (fixes
CVE-2017-1000257)
---
0102-curl-7.36.0-debug.patch | 2 +-
curl-7.56.0.tar.xz.asc | 11 -----------
curl-7.56.1.tar.xz.asc | 11 +++++++++++
curl.spec | 5 ++++-
sources | 2 +-
5 files changed, 17 insertions(+), 14 deletions(-)
delete mode 100644 curl-7.56.0.tar.xz.asc
create mode 100644 curl-7.56.1.tar.xz.asc
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 9cbf61b..12f9eb8 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -20351,18 +20351,11 @@ $as_echo "yes" >&6; }
+@@ -16501,18 +16501,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/curl-7.56.0.tar.xz.asc b/curl-7.56.0.tar.xz.asc
deleted file mode 100644
index f1e3ad4..0000000
--- a/curl-7.56.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlnUd8QACgkQXMkI/bce
-EsLXpgf/RNe897KrWq4s9H/ycobJXt4UEHXMbpjxQwEggNO4n0EwZ7Mt7WZ1aYR9
-q0ELx4mYS0/Lr9u1v5RxtMiG9L91B9nSdhFzL3/hhiTubTyhxgleGJMc94iTFMQY
-FjZYWZKHtBQlS8rjzTy2f7ESBIAs7zDPgWCfUlm0iuawSPx/Rw8ZrxC4yULvRubV
-2wZgjOZeVnhTt6CyNihY9+xrNgEOLAd2b0zjDJSoS0iQmZ5QYZKP+XeD9imQvLLF
-O0yhlE9PgCJTGCfjoehQop9rR7CtzDTT65A+syab5mQY+YbphL+8MfjKtoeWA78I
-JzW//7fC4iCORd3D/HJ1lOa442cfCA==
-=qKHn
------END PGP SIGNATURE-----
diff --git a/curl-7.56.1.tar.xz.asc b/curl-7.56.1.tar.xz.asc
new file mode 100644
index 0000000..5222a00
--- /dev/null
+++ b/curl-7.56.1.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlnthGcACgkQXMkI/bce
+EsL8iQf+KpTYayGV9X+fg4owYmGfQdDrWiV5YFbTlTOBTYSNQQBUuWX+VE5kMNhd
+xsE27/JGgQWRKqM1UXACN18FYviAoWq7yb/4cGW3Ws3V4+GxmpGuaBsxaULobxDQ
+uco2CAsi0PtIizMa2di+vWhAznDDKHfiw69F18hTD+k9B9xIHnEX3EGQDVi8Gksk
+TtQ62A06HInIJw/hk6tEbFMzyI4J4iJh/NBPwxqUefsr2E6gG443FB61qjltrzPb
+17OU/DZDpRf4MIQjwz1rgxdLWPagF3EcmpL0mgIEUg70dshzG6rrP1jSzsMwou6J
+sQoV0oUXSY5zdUnIjiS5TOoJa3eyLw==
+=0ZNH
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index ee8b9dd..01b7df9 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,6 +1,6 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.56.0
+Version: 7.56.1
Release: 1%{?dist}
License: MIT
Group: Applications/Internet
@@ -298,6 +298,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
+* Mon Oct 23 2017 Kamil Dudka - 7.56.1-1
+- new upstream release (fixes CVE-2017-1000257)
+
* Wed Oct 04 2017 Kamil Dudka - 7.56.0-1
- new upstream release (fixes CVE-2017-1000254)
diff --git a/sources b/sources
index 6d1593a..ecf6692 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.56.0.tar.xz) = a6bd5c56cd3a939a31b755bee3733df6670eec3d65b81b6c3e32ef9df110e3e748adc2cee81b1eb29f81cdf344230314c7ac1a2ed8f329f41c8352f920de3bfe
+SHA512 (curl-7.56.1.tar.xz) = 5cd86257c4bd39f971d854b966ace05fc18c39962589525c4090a7b243f7e2739dccae2ac1a634578f86ead6bba290d862f3a835e4856b0549386e319ebb588d
From ed352e927e8a3e9c45669fdfe29dfa8ca6b3bc7c Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 29 Nov 2017 13:58:44 +0100
Subject: [PATCH 005/260] new upstream release - 7.57.0
Resolves: CVE-2017-8816 - curl: NTLM buffer overflow via integer overflow
Resolves: CVE-2017-8817 - curl: FTP wildcard out of bounds read
Resolves: CVE-2017-8818 - curl: SSL out of buffer access
---
0102-curl-7.36.0-debug.patch | 2 +-
curl-7.56.1.tar.xz.asc | 11 -----------
curl-7.57.0.tar.xz.asc | 11 +++++++++++
curl.spec | 8 +++++++-
sources | 2 +-
5 files changed, 20 insertions(+), 14 deletions(-)
delete mode 100644 curl-7.56.1.tar.xz.asc
create mode 100644 curl-7.57.0.tar.xz.asc
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 12f9eb8..c8dbaa2 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16501,18 +16501,11 @@ $as_echo "yes" >&6; }
+@@ -16508,18 +16508,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/curl-7.56.1.tar.xz.asc b/curl-7.56.1.tar.xz.asc
deleted file mode 100644
index 5222a00..0000000
--- a/curl-7.56.1.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlnthGcACgkQXMkI/bce
-EsL8iQf+KpTYayGV9X+fg4owYmGfQdDrWiV5YFbTlTOBTYSNQQBUuWX+VE5kMNhd
-xsE27/JGgQWRKqM1UXACN18FYviAoWq7yb/4cGW3Ws3V4+GxmpGuaBsxaULobxDQ
-uco2CAsi0PtIizMa2di+vWhAznDDKHfiw69F18hTD+k9B9xIHnEX3EGQDVi8Gksk
-TtQ62A06HInIJw/hk6tEbFMzyI4J4iJh/NBPwxqUefsr2E6gG443FB61qjltrzPb
-17OU/DZDpRf4MIQjwz1rgxdLWPagF3EcmpL0mgIEUg70dshzG6rrP1jSzsMwou6J
-sQoV0oUXSY5zdUnIjiS5TOoJa3eyLw==
-=0ZNH
------END PGP SIGNATURE-----
diff --git a/curl-7.57.0.tar.xz.asc b/curl-7.57.0.tar.xz.asc
new file mode 100644
index 0000000..5362dcc
--- /dev/null
+++ b/curl-7.57.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAloefhsACgkQXMkI/bce
+EsJ5Wwf/W2iMekYTk+zF2iCvCSlTT93gRl1RXIi5v3lMO3H13Xv66304ny5/XEI8
+Mf0dfif/+ADV4Cm9Gsfs5Gx3d6IDtzRW66gpoNnEt/u6xLKlJWPAKHBEAOW7bDZU
+78qgEAmH1CVbzD+yc1vkSTZWc3ilfezjMfwUa5E5RkTtcoD6mTWzeMLm5doFxc3s
+NvPu40IlJ2Ss3jqRoKgvkGeUuOiQYUb7DDDCaSF6jZjB88J1HFYWU+i7zjVoAdD3
+jRVan6R5RJbJqvo9yKT0YWxbR2RKoQIydg8Xa7ocKTM6205vc94AXSHLSkjHMr+H
+5UgyAJvkk2FaoJIwLJUSTYE3RDlqog==
+=Kzqh
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 01b7df9..a00237e 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,6 +1,6 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.56.1
+Version: 7.57.0
Release: 1%{?dist}
License: MIT
Group: Applications/Internet
@@ -298,6 +298,12 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
+* Wed Nov 29 2017 Kamil Dudka - 7.57.0-1
+- new upstream release, which fixes the following vulnerabilities
+ CVE-2017-8816 - curl: NTLM buffer overflow via integer overflow
+ CVE-2017-8817 - curl: FTP wildcard out of bounds read
+ CVE-2017-8818 - curl: SSL out of buffer access
+
* Mon Oct 23 2017 Kamil Dudka - 7.56.1-1
- new upstream release (fixes CVE-2017-1000257)
diff --git a/sources b/sources
index ecf6692..cd5eae2 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.56.1.tar.xz) = 5cd86257c4bd39f971d854b966ace05fc18c39962589525c4090a7b243f7e2739dccae2ac1a634578f86ead6bba290d862f3a835e4856b0549386e319ebb588d
+SHA512 (curl-7.57.0.tar.xz) = 200076753e3d7b9f3edd381937cb72710f4051b2f041102b49626e4e82c3f50d2bf4917b9ddb957fde37753e9457c81087c792528077916ae5c04875944a6b8d
From 93c55561d397a9c4ba24e71ee0b9327f38459150 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 24 Jan 2018 11:36:50 +0100
Subject: [PATCH 006/260] new upstream release - 7.58.0
Resolves: CVE-2018-1000005 - curl: HTTP/2 trailer out-of-bounds read
Resolves: CVE-2018-1000007 - curl: HTTP authentication leak in redirects
---
0101-curl-7.32.0-multilib.patch | 11 +++++++----
0102-curl-7.36.0-debug.patch | 2 +-
curl-7.57.0.tar.xz.asc | 11 -----------
curl-7.58.0.tar.xz.asc | 11 +++++++++++
curl.spec | 7 ++++++-
sources | 2 +-
6 files changed, 26 insertions(+), 18 deletions(-)
delete mode 100644 curl-7.57.0.tar.xz.asc
create mode 100644 curl-7.58.0.tar.xz.asc
diff --git a/0101-curl-7.32.0-multilib.patch b/0101-curl-7.32.0-multilib.patch
index dc23308..532980e 100644
--- a/0101-curl-7.32.0-multilib.patch
+++ b/0101-curl-7.32.0-multilib.patch
@@ -13,7 +13,7 @@ diff --git a/curl-config.in b/curl-config.in
index 150004d..95d0759 100644
--- a/curl-config.in
+++ b/curl-config.in
-@@ -75,7 +75,7 @@ while test $# -gt 0; do
+@@ -76,7 +76,7 @@ while test $# -gt 0; do
;;
--cc)
@@ -22,7 +22,7 @@ index 150004d..95d0759 100644
;;
--prefix)
-@@ -142,29 +142,14 @@ while test $# -gt 0; do
+@@ -143,32 +143,17 @@ while test $# -gt 0; do
;;
--libs)
@@ -38,6 +38,9 @@ index 150004d..95d0759 100644
- fi
+ echo -lcurl
;;
+ --ssl-backends)
+ echo "@SSL_BACKENDS@"
+ ;;
--static-libs)
- if test "X@ENABLE_STATIC@" != "Xno" ; then
@@ -58,8 +61,8 @@ diff --git a/docs/curl-config.1 b/docs/curl-config.1
index 14a9d2b..ffcc004 100644
--- a/docs/curl-config.1
+++ b/docs/curl-config.1
-@@ -66,7 +66,9 @@ be listed using uppercase and are separated by newlines. There may be none,
- one, or several protocols in the list. (Added in 7.13.0)
+@@ -70,7 +70,9 @@ no, one or several names. If more than one name, they will appear
+ comma-separated. (Added in 7.58.0)
.IP "--static-libs"
Shows the complete set of libs and other linker options you will need in order
-to link your application with libcurl statically. (Added in 7.17.1)
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index c8dbaa2..e392a31 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16508,18 +16508,11 @@ $as_echo "yes" >&6; }
+@@ -16523,18 +16523,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/curl-7.57.0.tar.xz.asc b/curl-7.57.0.tar.xz.asc
deleted file mode 100644
index 5362dcc..0000000
--- a/curl-7.57.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAloefhsACgkQXMkI/bce
-EsJ5Wwf/W2iMekYTk+zF2iCvCSlTT93gRl1RXIi5v3lMO3H13Xv66304ny5/XEI8
-Mf0dfif/+ADV4Cm9Gsfs5Gx3d6IDtzRW66gpoNnEt/u6xLKlJWPAKHBEAOW7bDZU
-78qgEAmH1CVbzD+yc1vkSTZWc3ilfezjMfwUa5E5RkTtcoD6mTWzeMLm5doFxc3s
-NvPu40IlJ2Ss3jqRoKgvkGeUuOiQYUb7DDDCaSF6jZjB88J1HFYWU+i7zjVoAdD3
-jRVan6R5RJbJqvo9yKT0YWxbR2RKoQIydg8Xa7ocKTM6205vc94AXSHLSkjHMr+H
-5UgyAJvkk2FaoJIwLJUSTYE3RDlqog==
-=Kzqh
------END PGP SIGNATURE-----
diff --git a/curl-7.58.0.tar.xz.asc b/curl-7.58.0.tar.xz.asc
new file mode 100644
index 0000000..715eacb
--- /dev/null
+++ b/curl-7.58.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlpoMGsACgkQXMkI/bce
+EsIxtwgAnazhBf4KjF3bw1XNxgjkWVUwqLlLwEElg4tD6g/uYw9VeZQyy2wQGmgc
+yKx2WrfqLDmE1gAqKgvGLdS6qvMtv0x/3gNjOy4/LVYBlVqP+k5p0XZhV3jcg929
+Hkv/Fgp1yvtks98CGEIp6xJSjlnL3x5VEsMslXO7dpfq+6gvnbBVBP7QUOb/CYDg
+LHHAIZFSQuTeLKAvvl1koZAZnZ5zD3dtwL8rK4CVD0ugwJplJvGbvoIMNu9uagUZ
+CpBV0Pyv0AUsMTohszyOovi/RizHWl8xTynreJh+sx++NZEX2KjsnISpZAxmD6r5
+dtt21mdhrRSsAXmHD8q5LnbrKosbvQ==
+=ZqfQ
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index a00237e..88dd5db 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,6 +1,6 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.57.0
+Version: 7.58.0
Release: 1%{?dist}
License: MIT
Group: Applications/Internet
@@ -298,6 +298,11 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
+* Wed Jan 24 2018 Kamil Dudka - 7.58.0-1
+- new upstream release, which fixes the following vulnerabilities
+ CVE-2018-1000005 - curl: HTTP/2 trailer out-of-bounds read
+ CVE-2018-1000007 - curl: HTTP authentication leak in redirects
+
* Wed Nov 29 2017 Kamil Dudka - 7.57.0-1
- new upstream release, which fixes the following vulnerabilities
CVE-2017-8816 - curl: NTLM buffer overflow via integer overflow
diff --git a/sources b/sources
index cd5eae2..d1edf19 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.57.0.tar.xz) = 200076753e3d7b9f3edd381937cb72710f4051b2f041102b49626e4e82c3f50d2bf4917b9ddb957fde37753e9457c81087c792528077916ae5c04875944a6b8d
+SHA512 (curl-7.58.0.tar.xz) = 965affc74ab8f8c94d1b79ebb8012ca4c1a482c7a3282f2661f6382163e47e3ea657398c1a4202008d0c683a3d2266a05a64a26bd514a64a08e4fe83929dcae5
From cbbefe6fb95979859c4be9a5d92a74419211cbbb Mon Sep 17 00:00:00 2001
From: Andreas Schneider
Date: Wed, 24 Jan 2018 16:24:30 +0100
Subject: [PATCH 007/260] Resolves: #1531483 - use libssh (instead of libssh2)
... to implement SCP/SFTP in libcurl
---
curl.spec | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/curl.spec b/curl.spec
index 88dd5db..ff74841 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.58.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Group: Applications/Internet
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -26,7 +26,7 @@ BuildRequires: libidn2-devel
BuildRequires: libmetalink-devel
BuildRequires: libnghttp2-devel
BuildRequires: libpsl-devel
-BuildRequires: libssh2-devel
+BuildRequires: libssh-devel
BuildRequires: openldap-devel
BuildRequires: openssh-clients
BuildRequires: openssh-server
@@ -70,10 +70,6 @@ BuildRequires: valgrind
# using an older version of libcurl could result in CURLE_UNKNOWN_OPTION
Requires: libcurl%{?_isa} >= %{version}-%{release}
-# require at least the version of libssh2 that we were built against,
-# to ensure that we have the necessary symbols available (#525002, #642796)
-%global libssh2_version %(pkg-config --modversion libssh2 2>/dev/null || echo 0)
-
# require at least the version of openssl-libs that we were built against,
# to ensure that we have the necessary symbols available (#1462184, #1462211)
%global openssl_version %(pkg-config --modversion openssl 2>/dev/null || echo 0)
@@ -89,7 +85,6 @@ resume, proxy tunneling and a busload of other useful tricks.
%package -n libcurl
Summary: A library for getting files from web servers
Group: Development/Libraries
-Requires: libssh2%{?_isa} >= %{libssh2_version}
Requires: openssl-libs%{?_isa} >= 1:%{openssl_version}
Provides: libcurl-full = %{version}-%{release}
Provides: libcurl-full%{?_isa} = %{version}-%{release}
@@ -192,7 +187,7 @@ export common_configure_opts=" \
--without-libidn2 \
--without-libmetalink \
--without-libpsl \
- --without-libssh2
+ --without-libssh
)
# configure full build
@@ -205,7 +200,7 @@ export common_configure_opts=" \
--with-libidn2 \
--with-libmetalink \
--with-libpsl \
- --with-libssh2
+ --with-libssh
)
# avoid using rpath
@@ -298,6 +293,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
+* Wed Jan 24 2018 Andreas Schneider - 7.58.0-2
+- use libssh (instead of libssh2) to implement SCP/SFTP in libcurl (#1531483)
+
* Wed Jan 24 2018 Kamil Dudka - 7.58.0-1
- new upstream release, which fixes the following vulnerabilities
CVE-2018-1000005 - curl: HTTP/2 trailer out-of-bounds read
From 3ad2894efb0d9c5b300e8968551c92fa2c9e4322 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 31 Jan 2018 14:41:00 +0100
Subject: [PATCH 008/260] disable brp-ldconfig to make RemovePathPostfixes work
... with shared libraries again
Suggested at:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/54Y4DZXHYSDXJDHJTBTBYLXC7OJ73JDU/
---
curl.spec | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index ff74841..9ad0660 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.58.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: MIT
Group: Applications/Internet
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -133,6 +133,8 @@ Provides: libcurl = %{version}-%{release}
Provides: libcurl%{?_isa} = %{version}-%{release}
Conflicts: libcurl
RemovePathPostfixes: .minimal
+# needed for RemovePathPostfixes to work with shared libraries
+%undefine __brp_ldconfig
%description -n libcurl-minimal
This is a replacement of the 'libcurl' package for minimal installations. It
@@ -293,6 +295,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
+* Wed Jan 31 2018 Kamil Dudka - 7.58.0-3
+- disable brp-ldconfig to make RemovePathPostfixes work with shared libs again
+
* Wed Jan 24 2018 Andreas Schneider - 7.58.0-2
- use libssh (instead of libssh2) to implement SCP/SFTP in libcurl (#1531483)
From bf966a954e3aa1da5ea3df99ad393893dce41ecf Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 1 Feb 2018 12:55:07 +0100
Subject: [PATCH 009/260] Related: #1540549 - temporarily work around internal
compiler error on x86_64
---
curl.spec | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/curl.spec b/curl.spec
index 9ad0660..a5d888e 100644
--- a/curl.spec
+++ b/curl.spec
@@ -156,6 +156,12 @@ be installed.
#aclocal -I m4
#automake
+# temporarily work around internal compiler error on x86_64 (#1540549)
+%ifarch x86_64
+sed -e 's|-c -o tftpd-tftpd.o|-fcf-protection=none &|' \
+ -i tests/server/Makefile.in
+%endif
+
# disable test 1112 (#565305) and test 1801
#
printf "1112\n1801\n" >> tests/data/DISABLED
@@ -296,6 +302,7 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%changelog
* Wed Jan 31 2018 Kamil Dudka - 7.58.0-3
+- temporarily work around internal compiler error on x86_64 (#1540549)
- disable brp-ldconfig to make RemovePathPostfixes work with shared libs again
* Wed Jan 24 2018 Andreas Schneider - 7.58.0-2
From b76e2f2c65fce0fe858e5cf8a397ea33786f150c Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 1 Feb 2018 14:05:00 +0100
Subject: [PATCH 010/260] Related: #1540549 - use the workaround for f28 only
... so that it does not break the build with old versions of GCC
---
curl.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/curl.spec b/curl.spec
index a5d888e..21d98da 100644
--- a/curl.spec
+++ b/curl.spec
@@ -158,9 +158,11 @@ be installed.
# temporarily work around internal compiler error on x86_64 (#1540549)
%ifarch x86_64
+%if 0%{?fedora} >= 28
sed -e 's|-c -o tftpd-tftpd.o|-fcf-protection=none &|' \
-i tests/server/Makefile.in
%endif
+%endif
# disable test 1112 (#565305) and test 1801
#
From 1bbb30f4f6a280aea08e37fefc010f2bbe99a5ed Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 7 Feb 2018 06:08:47 +0000
Subject: [PATCH 011/260] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
curl.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index 21d98da..53e669a 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.58.0
-Release: 3%{?dist}
+Release: 4%{?dist}
License: MIT
Group: Applications/Internet
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -303,6 +303,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
+* Wed Feb 07 2018 Fedora Release Engineering - 7.58.0-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
+
* Wed Jan 31 2018 Kamil Dudka - 7.58.0-3
- temporarily work around internal compiler error on x86_64 (#1540549)
- disable brp-ldconfig to make RemovePathPostfixes work with shared libs again
From 960515d8a16319ffb781e2c8907f00df3289d8f1 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Tue, 13 Feb 2018 10:26:20 +0100
Subject: [PATCH 012/260] Related: #1540549 - drop temporary workaround for the
GCC bug
---
curl.spec | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/curl.spec b/curl.spec
index 53e669a..929d0a1 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.58.0
-Release: 4%{?dist}
+Release: 5%{?dist}
License: MIT
Group: Applications/Internet
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -156,14 +156,6 @@ be installed.
#aclocal -I m4
#automake
-# temporarily work around internal compiler error on x86_64 (#1540549)
-%ifarch x86_64
-%if 0%{?fedora} >= 28
-sed -e 's|-c -o tftpd-tftpd.o|-fcf-protection=none &|' \
- -i tests/server/Makefile.in
-%endif
-%endif
-
# disable test 1112 (#565305) and test 1801
#
printf "1112\n1801\n" >> tests/data/DISABLED
@@ -303,6 +295,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
+* Tue Feb 13 2018 Kamil Dudka - 7.58.0-5
+- drop temporary workaround for #1540549
+
* Wed Feb 07 2018 Fedora Release Engineering - 7.58.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
From 5012445acacbc2b052f52535e671ec66b0ccc9dd Mon Sep 17 00:00:00 2001
From: Igor Gnatenko
Date: Tue, 13 Feb 2018 23:11:49 +0100
Subject: [PATCH 013/260] Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now
Signed-off-by: Igor Gnatenko
---
curl.spec | 1 -
1 file changed, 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index 929d0a1..8b8d641 100644
--- a/curl.spec
+++ b/curl.spec
@@ -18,7 +18,6 @@ Patch104: 0104-curl-7.19.7-localhost6.patch
Provides: curl-full = %{version}-%{release}
Provides: webclient
URL: https://curl.haxx.se/
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
#BuildRequires: automake
BuildRequires: groff
BuildRequires: krb5-devel
From a16f4de7a219f90e075e3871b41072b3c00639a7 Mon Sep 17 00:00:00 2001
From: Paul Howarth
Date: Thu, 15 Feb 2018 09:52:27 +0000
Subject: [PATCH 014/260] Update scriptlets, enforce versioned libssh
dependency
- switch to %ldconfig_scriptlets
- drop legacy BuildRoot: and Group: tags
- enforce versioned libssh dependency for libcurl
---
curl.spec | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/curl.spec b/curl.spec
index 8b8d641..26c56f3 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,9 +1,8 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.58.0
-Release: 5%{?dist}
+Release: 6%{?dist}
License: MIT
-Group: Applications/Internet
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
# patch making libcurl multilib ready
@@ -69,6 +68,10 @@ BuildRequires: valgrind
# using an older version of libcurl could result in CURLE_UNKNOWN_OPTION
Requires: libcurl%{?_isa} >= %{version}-%{release}
+# require at least the version of libssh that we were built against,
+# to ensure that we have the necessary symbols available (#525002, #642796)
+%global libssh_version %(pkg-config --modversion libssh 2>/dev/null || echo 0)
+
# require at least the version of openssl-libs that we were built against,
# to ensure that we have the necessary symbols available (#1462184, #1462211)
%global openssl_version %(pkg-config --modversion openssl 2>/dev/null || echo 0)
@@ -83,7 +86,7 @@ resume, proxy tunneling and a busload of other useful tricks.
%package -n libcurl
Summary: A library for getting files from web servers
-Group: Development/Libraries
+Requires: libssh%{?_isa} >= %{libssh_version}
Requires: openssl-libs%{?_isa} >= 1:%{openssl_version}
Provides: libcurl-full = %{version}-%{release}
Provides: libcurl-full%{?_isa} = %{version}-%{release}
@@ -98,7 +101,6 @@ resume, http proxy tunneling and more.
%package -n libcurl-devel
Summary: Files needed for building applications with libcurl
-Group: Development/Libraries
Requires: libcurl%{?_isa} = %{version}-%{release}
Provides: curl-devel = %{version}-%{release}
@@ -251,13 +253,9 @@ LD_LIBRARY_PATH="$RPM_BUILD_ROOT%{_libdir}:$LD_LIBRARY_PATH" \
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
-%post -n libcurl -p /sbin/ldconfig
+%ldconfig_scriptlets -n libcurl
-%postun -n libcurl -p /sbin/ldconfig
-
-%post -n libcurl-minimal -p /sbin/ldconfig
-
-%postun -n libcurl-minimal -p /sbin/ldconfig
+%ldconfig_scriptlets -n libcurl-minimal
%files
%doc CHANGES README*
@@ -294,6 +292,11 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
+* Thu Feb 15 2018 Paul Howarth - 7.58.0-6
+- switch to %%ldconfig_scriptlets
+- drop legacy BuildRoot: and Group: tags
+- enforce versioned libssh dependency for libcurl
+
* Tue Feb 13 2018 Kamil Dudka - 7.58.0-5
- drop temporary workaround for #1540549
From bdc6ab544bcac65c5a3c8e4dcf55b2531c1db934 Mon Sep 17 00:00:00 2001
From: Paul Howarth
Date: Mon, 19 Feb 2018 10:09:14 +0000
Subject: [PATCH 015/260] Robustness improvements to spec file
- Add explicity-used build requirements
- Fix libcurl soname version number in %files list to avoid accidental soname
bumps
---
curl.spec | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/curl.spec b/curl.spec
index 26c56f3..42aa486 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.58.0
-Release: 6%{?dist}
+Release: 7%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -18,6 +18,8 @@ Provides: curl-full = %{version}-%{release}
Provides: webclient
URL: https://curl.haxx.se/
#BuildRequires: automake
+BuildRequires: coreutils
+BuildRequires: gcc
BuildRequires: groff
BuildRequires: krb5-devel
BuildRequires: libidn2-devel
@@ -25,12 +27,14 @@ BuildRequires: libmetalink-devel
BuildRequires: libnghttp2-devel
BuildRequires: libpsl-devel
BuildRequires: libssh-devel
+BuildRequires: make
BuildRequires: openldap-devel
BuildRequires: openssh-clients
BuildRequires: openssh-server
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: python
+BuildRequires: sed
BuildRequires: stunnel
BuildRequires: zlib-devel
@@ -268,8 +272,8 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%files -n libcurl
%license COPYING
-%{_libdir}/libcurl.so.[0-9]
-%{_libdir}/libcurl.so.[0-9].[0-9].[0-9]
+%{_libdir}/libcurl.so.4
+%{_libdir}/libcurl.so.4.[0-9].[0-9]
%files -n libcurl-devel
%doc docs/examples/*.c docs/examples/Makefile.example docs/INTERNALS.md
@@ -288,10 +292,15 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%files -n libcurl-minimal
%license COPYING
-%{_libdir}/libcurl.so.[0-9].minimal
-%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
+%{_libdir}/libcurl.so.4.minimal
+%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Mon Feb 19 2018 Paul Howarth - 7.58.0-7
+- Add explicity-used build requirements
+- Fix libcurl soname version number in %%files list to avoid accidental soname
+ bumps
+
* Thu Feb 15 2018 Paul Howarth - 7.58.0-6
- switch to %%ldconfig_scriptlets
- drop legacy BuildRoot: and Group: tags
From 43b81665b069d75c32e5705a609df817f7a182c0 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 12 Mar 2018 10:28:21 +0100
Subject: [PATCH 016/260] http2: mark the connection for close on GOAWAY
---
0001-curl-7.58.0-h2-goaway.patch | 206 +++++++++++++++++++++++++++++++
curl.spec | 9 +-
2 files changed, 214 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.58.0-h2-goaway.patch
diff --git a/0001-curl-7.58.0-h2-goaway.patch b/0001-curl-7.58.0-h2-goaway.patch
new file mode 100644
index 0000000..de813f9
--- /dev/null
+++ b/0001-curl-7.58.0-h2-goaway.patch
@@ -0,0 +1,206 @@
+From d9a3018050ce24e1ee416c33f4907f238e860ce3 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Sat, 10 Mar 2018 23:48:43 +0100
+Subject: [PATCH] http2: mark the connection for close on GOAWAY
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+... don't consider it an error!
+
+Assisted-by: Jay Satiro
+Reported-by: Ćukasz Domeradzki
+Fixes #2365
+Closes #2375
+
+Upstream-commit: 8b498a875c975294545581282289991bbcfeabf4
+Signed-off-by: Kamil Dudka
+---
+ lib/http.h | 5 ++---
+ lib/http2.c | 33 +++++++++++++++++++++------------
+ lib/multi.c | 9 +++------
+ 3 files changed, 26 insertions(+), 21 deletions(-)
+
+diff --git a/lib/http.h b/lib/http.h
+index d2781bc..2ce44bb 100644
+--- a/lib/http.h
++++ b/lib/http.h
+@@ -7,7 +7,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -172,8 +172,6 @@ struct HTTP {
+ size_t pauselen; /* the number of bytes left in data */
+ bool closed; /* TRUE on HTTP2 stream close */
+ bool close_handled; /* TRUE if stream closure is handled by libcurl */
+- uint32_t error_code; /* HTTP/2 error code */
+-
+ char *mem; /* points to a buffer in memory to store received data */
+ size_t len; /* size of the buffer 'mem' points to */
+ size_t memlen; /* size of data copied to mem */
+@@ -226,6 +224,7 @@ struct http_conn {
+ /* list of settings that will be sent */
+ nghttp2_settings_entry local_settings[3];
+ size_t local_settings_num;
++ uint32_t error_code; /* HTTP/2 error code */
+ #else
+ int unused; /* prevent a compiler warning */
+ #endif
+diff --git a/lib/http2.c b/lib/http2.c
+index 6992879..13a79d1 100644
+--- a/lib/http2.c
++++ b/lib/http2.c
+@@ -204,7 +204,6 @@ void Curl_http2_setup_req(struct Curl_easy *data)
+ http->status_code = -1;
+ http->pausedata = NULL;
+ http->pauselen = 0;
+- http->error_code = NGHTTP2_NO_ERROR;
+ http->closed = FALSE;
+ http->close_handled = FALSE;
+ http->mem = data->state.buffer;
+@@ -217,6 +216,7 @@ void Curl_http2_setup_conn(struct connectdata *conn)
+ {
+ conn->proto.httpc.settings.max_concurrent_streams =
+ DEFAULT_MAX_CONCURRENT_STREAMS;
++ conn->proto.httpc.error_code = NGHTTP2_NO_ERROR;
+ }
+
+ /*
+@@ -777,6 +777,7 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id,
+ (void)stream_id;
+
+ if(stream_id) {
++ struct http_conn *httpc;
+ /* get the stream from the hash based on Stream ID, stream ID zero is for
+ connection-oriented stuff */
+ data_s = nghttp2_session_get_stream_user_data(session, stream_id);
+@@ -791,10 +792,11 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id,
+ if(!stream)
+ return NGHTTP2_ERR_CALLBACK_FAILURE;
+
+- stream->error_code = error_code;
+ stream->closed = TRUE;
+ data_s->state.drain++;
+- conn->proto.httpc.drain_total++;
++ httpc = &conn->proto.httpc;
++ httpc->drain_total++;
++ httpc->error_code = error_code;
+
+ /* remove the entry from the hash as the stream is now gone */
+ nghttp2_session_set_stream_user_data(session, stream_id, 0);
+@@ -1225,13 +1227,14 @@ static int h2_session_send(struct Curl_easy *data,
+ * This function returns 0 if it succeeds, or -1 and error code will
+ * be assigned to *err.
+ */
+-static int h2_process_pending_input(struct Curl_easy *data,
++static int h2_process_pending_input(struct connectdata *conn,
+ struct http_conn *httpc,
+ CURLcode *err)
+ {
+ ssize_t nread;
+ char *inbuf;
+ ssize_t rv;
++ struct Curl_easy *data = conn->data;
+
+ nread = httpc->inbuflen - httpc->nread_inbuf;
+ inbuf = httpc->inbuf + httpc->nread_inbuf;
+@@ -1269,7 +1272,13 @@ static int h2_process_pending_input(struct Curl_easy *data,
+ if(should_close_session(httpc)) {
+ DEBUGF(infof(data,
+ "h2_process_pending_input: nothing to do in this session\n"));
+- *err = CURLE_HTTP2;
++ if(httpc->error_code)
++ *err = CURLE_HTTP2;
++ else {
++ /* not an error per se, but should still close the connection */
++ connclose(conn, "GOAWAY received");
++ *err = CURLE_OK;
++ }
+ return -1;
+ }
+
+@@ -1300,7 +1309,7 @@ CURLcode Curl_http2_done_sending(struct connectdata *conn)
+ that it can signal EOF to nghttp2 */
+ (void)nghttp2_session_resume_data(h2, stream->stream_id);
+
+- (void)h2_process_pending_input(conn->data, httpc, &result);
++ (void)h2_process_pending_input(conn, httpc, &result);
+ }
+ }
+ return result;
+@@ -1324,7 +1333,7 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn,
+ data->state.drain = 0;
+
+ if(httpc->pause_stream_id == 0) {
+- if(h2_process_pending_input(data, httpc, err) != 0) {
++ if(h2_process_pending_input(conn, httpc, err) != 0) {
+ return -1;
+ }
+ }
+@@ -1333,10 +1342,10 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn,
+
+ /* Reset to FALSE to prevent infinite loop in readwrite_data function. */
+ stream->closed = FALSE;
+- if(stream->error_code != NGHTTP2_NO_ERROR) {
++ if(httpc->error_code != NGHTTP2_NO_ERROR) {
+ failf(data, "HTTP/2 stream %u was not closed cleanly: %s (err %d)",
+- stream->stream_id, Curl_http2_strerror(stream->error_code),
+- stream->error_code);
++ stream->stream_id, Curl_http2_strerror(httpc->error_code),
++ httpc->error_code);
+ *err = CURLE_HTTP2_STREAM;
+ return -1;
+ }
+@@ -1484,7 +1493,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
+ /* We have paused nghttp2, but we have no pause data (see
+ on_data_chunk_recv). */
+ httpc->pause_stream_id = 0;
+- if(h2_process_pending_input(data, httpc, &result) != 0) {
++ if(h2_process_pending_input(conn, httpc, &result) != 0) {
+ *err = result;
+ return -1;
+ }
+@@ -1514,7 +1523,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
+ frames, then we have to call it again with 0-length data.
+ Without this, on_stream_close callback will not be called,
+ and stream could be hanged. */
+- if(h2_process_pending_input(data, httpc, &result) != 0) {
++ if(h2_process_pending_input(conn, httpc, &result) != 0) {
+ *err = result;
+ return -1;
+ }
+diff --git a/lib/multi.c b/lib/multi.c
+index 43823cc..50f4d87 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -535,11 +535,8 @@ static CURLcode multi_done(struct connectdata **connp,
+ result = CURLE_ABORTED_BY_CALLBACK;
+ }
+
+- if(conn->send_pipe.size + conn->recv_pipe.size != 0 &&
+- !data->set.reuse_forbid &&
+- !conn->bits.close) {
+- /* Stop if pipeline is not empty and we do not have to close
+- connection. */
++ if(conn->send_pipe.size || conn->recv_pipe.size) {
++ /* Stop if pipeline is not empty . */
+ data->easy_conn = NULL;
+ DEBUGF(infof(data, "Connection still in use, no more multi_done now!\n"));
+ return CURLE_OK;
+--
+2.14.3
+
diff --git a/curl.spec b/curl.spec
index 42aa486..0d50f4d 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.58.0
-Release: 7%{?dist}
+Release: 8%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# http2: mark the connection for close on GOAWAY
+Patch1: 0001-curl-7.58.0-h2-goaway.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -151,6 +154,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -296,6 +300,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Mon Mar 12 2018 Kamil Dudka - 7.58.0-8
+- http2: mark the connection for close on GOAWAY
+
* Mon Feb 19 2018 Paul Howarth - 7.58.0-7
- Add explicity-used build requirements
- Fix libcurl soname version number in %%files list to avoid accidental soname
From bdef0a1bf6d59f497b501aa78ab864f2486c24b0 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 14 Mar 2018 10:23:40 +0100
Subject: [PATCH 017/260] new upstream release - 7.59.0
Resolves: CVE-2018-1000120 - FTP path trickery leads to NIL byte out of bounds write
Resolves: CVE-2018-1000121 - LDAP NULL pointer dereference
Resolves: CVE-2018-1000122 - RTSP RTP buffer over-read
---
0001-curl-7.58.0-h2-goaway.patch | 206 -------------------------------
0102-curl-7.36.0-debug.patch | 2 +-
curl-7.58.0.tar.xz.asc | 11 --
curl-7.59.0.tar.xz.asc | 11 ++
curl.spec | 14 ++-
sources | 2 +-
6 files changed, 21 insertions(+), 225 deletions(-)
delete mode 100644 0001-curl-7.58.0-h2-goaway.patch
delete mode 100644 curl-7.58.0.tar.xz.asc
create mode 100644 curl-7.59.0.tar.xz.asc
diff --git a/0001-curl-7.58.0-h2-goaway.patch b/0001-curl-7.58.0-h2-goaway.patch
deleted file mode 100644
index de813f9..0000000
--- a/0001-curl-7.58.0-h2-goaway.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From d9a3018050ce24e1ee416c33f4907f238e860ce3 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Sat, 10 Mar 2018 23:48:43 +0100
-Subject: [PATCH] http2: mark the connection for close on GOAWAY
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-... don't consider it an error!
-
-Assisted-by: Jay Satiro
-Reported-by: Ćukasz Domeradzki
-Fixes #2365
-Closes #2375
-
-Upstream-commit: 8b498a875c975294545581282289991bbcfeabf4
-Signed-off-by: Kamil Dudka
----
- lib/http.h | 5 ++---
- lib/http2.c | 33 +++++++++++++++++++++------------
- lib/multi.c | 9 +++------
- 3 files changed, 26 insertions(+), 21 deletions(-)
-
-diff --git a/lib/http.h b/lib/http.h
-index d2781bc..2ce44bb 100644
---- a/lib/http.h
-+++ b/lib/http.h
-@@ -7,7 +7,7 @@
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
-- * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al.
-+ * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -172,8 +172,6 @@ struct HTTP {
- size_t pauselen; /* the number of bytes left in data */
- bool closed; /* TRUE on HTTP2 stream close */
- bool close_handled; /* TRUE if stream closure is handled by libcurl */
-- uint32_t error_code; /* HTTP/2 error code */
--
- char *mem; /* points to a buffer in memory to store received data */
- size_t len; /* size of the buffer 'mem' points to */
- size_t memlen; /* size of data copied to mem */
-@@ -226,6 +224,7 @@ struct http_conn {
- /* list of settings that will be sent */
- nghttp2_settings_entry local_settings[3];
- size_t local_settings_num;
-+ uint32_t error_code; /* HTTP/2 error code */
- #else
- int unused; /* prevent a compiler warning */
- #endif
-diff --git a/lib/http2.c b/lib/http2.c
-index 6992879..13a79d1 100644
---- a/lib/http2.c
-+++ b/lib/http2.c
-@@ -204,7 +204,6 @@ void Curl_http2_setup_req(struct Curl_easy *data)
- http->status_code = -1;
- http->pausedata = NULL;
- http->pauselen = 0;
-- http->error_code = NGHTTP2_NO_ERROR;
- http->closed = FALSE;
- http->close_handled = FALSE;
- http->mem = data->state.buffer;
-@@ -217,6 +216,7 @@ void Curl_http2_setup_conn(struct connectdata *conn)
- {
- conn->proto.httpc.settings.max_concurrent_streams =
- DEFAULT_MAX_CONCURRENT_STREAMS;
-+ conn->proto.httpc.error_code = NGHTTP2_NO_ERROR;
- }
-
- /*
-@@ -777,6 +777,7 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id,
- (void)stream_id;
-
- if(stream_id) {
-+ struct http_conn *httpc;
- /* get the stream from the hash based on Stream ID, stream ID zero is for
- connection-oriented stuff */
- data_s = nghttp2_session_get_stream_user_data(session, stream_id);
-@@ -791,10 +792,11 @@ static int on_stream_close(nghttp2_session *session, int32_t stream_id,
- if(!stream)
- return NGHTTP2_ERR_CALLBACK_FAILURE;
-
-- stream->error_code = error_code;
- stream->closed = TRUE;
- data_s->state.drain++;
-- conn->proto.httpc.drain_total++;
-+ httpc = &conn->proto.httpc;
-+ httpc->drain_total++;
-+ httpc->error_code = error_code;
-
- /* remove the entry from the hash as the stream is now gone */
- nghttp2_session_set_stream_user_data(session, stream_id, 0);
-@@ -1225,13 +1227,14 @@ static int h2_session_send(struct Curl_easy *data,
- * This function returns 0 if it succeeds, or -1 and error code will
- * be assigned to *err.
- */
--static int h2_process_pending_input(struct Curl_easy *data,
-+static int h2_process_pending_input(struct connectdata *conn,
- struct http_conn *httpc,
- CURLcode *err)
- {
- ssize_t nread;
- char *inbuf;
- ssize_t rv;
-+ struct Curl_easy *data = conn->data;
-
- nread = httpc->inbuflen - httpc->nread_inbuf;
- inbuf = httpc->inbuf + httpc->nread_inbuf;
-@@ -1269,7 +1272,13 @@ static int h2_process_pending_input(struct Curl_easy *data,
- if(should_close_session(httpc)) {
- DEBUGF(infof(data,
- "h2_process_pending_input: nothing to do in this session\n"));
-- *err = CURLE_HTTP2;
-+ if(httpc->error_code)
-+ *err = CURLE_HTTP2;
-+ else {
-+ /* not an error per se, but should still close the connection */
-+ connclose(conn, "GOAWAY received");
-+ *err = CURLE_OK;
-+ }
- return -1;
- }
-
-@@ -1300,7 +1309,7 @@ CURLcode Curl_http2_done_sending(struct connectdata *conn)
- that it can signal EOF to nghttp2 */
- (void)nghttp2_session_resume_data(h2, stream->stream_id);
-
-- (void)h2_process_pending_input(conn->data, httpc, &result);
-+ (void)h2_process_pending_input(conn, httpc, &result);
- }
- }
- return result;
-@@ -1324,7 +1333,7 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn,
- data->state.drain = 0;
-
- if(httpc->pause_stream_id == 0) {
-- if(h2_process_pending_input(data, httpc, err) != 0) {
-+ if(h2_process_pending_input(conn, httpc, err) != 0) {
- return -1;
- }
- }
-@@ -1333,10 +1342,10 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn,
-
- /* Reset to FALSE to prevent infinite loop in readwrite_data function. */
- stream->closed = FALSE;
-- if(stream->error_code != NGHTTP2_NO_ERROR) {
-+ if(httpc->error_code != NGHTTP2_NO_ERROR) {
- failf(data, "HTTP/2 stream %u was not closed cleanly: %s (err %d)",
-- stream->stream_id, Curl_http2_strerror(stream->error_code),
-- stream->error_code);
-+ stream->stream_id, Curl_http2_strerror(httpc->error_code),
-+ httpc->error_code);
- *err = CURLE_HTTP2_STREAM;
- return -1;
- }
-@@ -1484,7 +1493,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
- /* We have paused nghttp2, but we have no pause data (see
- on_data_chunk_recv). */
- httpc->pause_stream_id = 0;
-- if(h2_process_pending_input(data, httpc, &result) != 0) {
-+ if(h2_process_pending_input(conn, httpc, &result) != 0) {
- *err = result;
- return -1;
- }
-@@ -1514,7 +1523,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
- frames, then we have to call it again with 0-length data.
- Without this, on_stream_close callback will not be called,
- and stream could be hanged. */
-- if(h2_process_pending_input(data, httpc, &result) != 0) {
-+ if(h2_process_pending_input(conn, httpc, &result) != 0) {
- *err = result;
- return -1;
- }
-diff --git a/lib/multi.c b/lib/multi.c
-index 43823cc..50f4d87 100644
---- a/lib/multi.c
-+++ b/lib/multi.c
-@@ -5,7 +5,7 @@
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
-- * Copyright (C) 1998 - 2017, Daniel Stenberg, , et al.
-+ * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -535,11 +535,8 @@ static CURLcode multi_done(struct connectdata **connp,
- result = CURLE_ABORTED_BY_CALLBACK;
- }
-
-- if(conn->send_pipe.size + conn->recv_pipe.size != 0 &&
-- !data->set.reuse_forbid &&
-- !conn->bits.close) {
-- /* Stop if pipeline is not empty and we do not have to close
-- connection. */
-+ if(conn->send_pipe.size || conn->recv_pipe.size) {
-+ /* Stop if pipeline is not empty . */
- data->easy_conn = NULL;
- DEBUGF(infof(data, "Connection still in use, no more multi_done now!\n"));
- return CURLE_OK;
---
-2.14.3
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index e392a31..13f07df 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16523,18 +16523,11 @@ $as_echo "yes" >&6; }
+@@ -16524,18 +16524,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/curl-7.58.0.tar.xz.asc b/curl-7.58.0.tar.xz.asc
deleted file mode 100644
index 715eacb..0000000
--- a/curl-7.58.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlpoMGsACgkQXMkI/bce
-EsIxtwgAnazhBf4KjF3bw1XNxgjkWVUwqLlLwEElg4tD6g/uYw9VeZQyy2wQGmgc
-yKx2WrfqLDmE1gAqKgvGLdS6qvMtv0x/3gNjOy4/LVYBlVqP+k5p0XZhV3jcg929
-Hkv/Fgp1yvtks98CGEIp6xJSjlnL3x5VEsMslXO7dpfq+6gvnbBVBP7QUOb/CYDg
-LHHAIZFSQuTeLKAvvl1koZAZnZ5zD3dtwL8rK4CVD0ugwJplJvGbvoIMNu9uagUZ
-CpBV0Pyv0AUsMTohszyOovi/RizHWl8xTynreJh+sx++NZEX2KjsnISpZAxmD6r5
-dtt21mdhrRSsAXmHD8q5LnbrKosbvQ==
-=ZqfQ
------END PGP SIGNATURE-----
diff --git a/curl-7.59.0.tar.xz.asc b/curl-7.59.0.tar.xz.asc
new file mode 100644
index 0000000..e74f7b2
--- /dev/null
+++ b/curl-7.59.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlqoxTwACgkQXMkI/bce
+EsJrHQf7B0ik8F5dfGYumYWkXHc9poJU+dJ0o6pwzg4QsP+4mwVTw/gnrXDm1hVk
+iFPIAdgTkxiIDZi+6mDfZA9dZ8Aq38XbYjRIwXTW4KrjTtEFQXtwlEClrHrJyXfl
++2YC52BcY0D2JVDqUAB9cVSSgaHHf1jd4h32a8YMrwco4jP5rSxbmZe4psU2m8TC
+skaZEoSIRJzg5oV+AgDSQMrq+fLsc5lIDKTl+7v6sjnGlcYeRC1SiBePyrh5g/o5
+w4JJH839MyjrYvi6MyCBHeyCFYDrxKvQw8zRwivfZ1oipM2SaSVq8c60PdR85Zw5
+/SNOU/7Qpvhua0GhAfaI/CTwwewy6w==
+=OcVv
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 0d50f4d..0083ed1 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.58.0
-Release: 8%{?dist}
+Version: 7.59.0
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# http2: mark the connection for close on GOAWAY
-Patch1: 0001-curl-7.58.0-h2-goaway.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -154,7 +151,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -300,6 +296,12 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Mar 14 2018 Kamil Dudka - 7.59.0-1
+- new upstream release, which fixes the following vulnerabilities
+ CVE-2018-1000120 - FTP path trickery leads to NIL byte out of bounds write
+ CVE-2018-1000121 - LDAP NULL pointer dereference
+ CVE-2018-1000122 - RTSP RTP buffer over-read
+
* Mon Mar 12 2018 Kamil Dudka - 7.58.0-8
- http2: mark the connection for close on GOAWAY
diff --git a/sources b/sources
index d1edf19..f353b13 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.58.0.tar.xz) = 965affc74ab8f8c94d1b79ebb8012ca4c1a482c7a3282f2661f6382163e47e3ea657398c1a4202008d0c683a3d2266a05a64a26bd514a64a08e4fe83929dcae5
+SHA512 (curl-7.59.0.tar.xz) = 6982a5950b564d6b2a4f4b96296b6db3db24a096acc68aa96966821b57f66362f5a69d9f2da762b5d2b1011a4a47478ebacaf05e26604f78bb013098749dd8a6
From 6402b496fc8694007323fb04774d5bdb44e14bbe Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 14 Mar 2018 14:42:24 +0100
Subject: [PATCH 018/260] ftp: fix typo in recursive callback detection for
seeking
---
...typo-in-recursive-callback-detection.patch | 29 +++++++++++++++++++
curl.spec | 9 +++++-
2 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch
diff --git a/0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch b/0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch
new file mode 100644
index 0000000..224630c
--- /dev/null
+++ b/0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch
@@ -0,0 +1,29 @@
+From 1b02cb2b51148915b2ba025bb262ef34f369fa4b Mon Sep 17 00:00:00 2001
+From: dasimx
+Date: Wed, 14 Mar 2018 11:02:05 +0100
+Subject: [PATCH] FTP: fix typo in recursive callback detection for seeking
+
+Fixes #2380
+
+Upstream-commit: 920f73a6906dce87c6ee87c32b109a287189965d
+Signed-off-by: Kamil Dudka
+---
+ lib/ftp.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/ftp.c b/lib/ftp.c
+index e2cc38b..0cc583b 100644
+--- a/lib/ftp.c
++++ b/lib/ftp.c
+@@ -1621,7 +1621,7 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn,
+ Curl_set_in_callback(data, true);
+ seekerr = conn->seek_func(conn->seek_client, data->state.resume_from,
+ SEEK_SET);
+- Curl_set_in_callback(data, true);
++ Curl_set_in_callback(data, false);
+ }
+
+ if(seekerr != CURL_SEEKFUNC_OK) {
+--
+2.14.3
+
diff --git a/curl.spec b/curl.spec
index 0083ed1..d722f07 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.59.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# ftp: fix typo in recursive callback detection for seeking
+Patch1: 0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -151,6 +154,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -296,6 +300,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Mar 14 2018 Kamil Dudka - 7.59.0-2
+- ftp: fix typo in recursive callback detection for seeking
+
* Wed Mar 14 2018 Kamil Dudka - 7.59.0-1
- new upstream release, which fixes the following vulnerabilities
CVE-2018-1000120 - FTP path trickery leads to NIL byte out of bounds write
From a1b38730cec8a39decb90b3b05d2746b72ebc0ee Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 15 Mar 2018 14:22:08 +0100
Subject: [PATCH 019/260] make the test-suite use Python 3
Unfortunately, smbserver.py does not work with Python 3 because
there is no 'impacket' module available for Python 3:
https://github.com/CoreSecurity/impacket/issues/61
---
0103-curl-7.59.0-python3.patch | 140 +++++++++++++++++++++++++++++++++
curl.spec | 14 +++-
2 files changed, 152 insertions(+), 2 deletions(-)
create mode 100644 0103-curl-7.59.0-python3.patch
diff --git a/0103-curl-7.59.0-python3.patch b/0103-curl-7.59.0-python3.patch
new file mode 100644
index 0000000..8a39f85
--- /dev/null
+++ b/0103-curl-7.59.0-python3.patch
@@ -0,0 +1,140 @@
+From bdba7b54224814055185513de1e7ff6619031553 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Thu, 15 Mar 2018 13:21:40 +0100
+Subject: [PATCH 1/2] tests/http_pipe.py: migrate to Python 3
+
+---
+ tests/http_pipe.py | 4 ++--
+ tests/runtests.pl | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/http_pipe.py b/tests/http_pipe.py
+index bc32173..75ac165 100755
+--- a/tests/http_pipe.py
++++ b/tests/http_pipe.py
+@@ -383,13 +383,13 @@ class PipelineRequestHandler(socketserver.BaseRequestHandler):
+ self.request.setblocking(True)
+ if not new_data:
+ return
+- new_requests = self._request_parser.ParseAdditionalData(new_data)
++ new_requests = self._request_parser.ParseAdditionalData(new_data.decode('utf8'))
+ self._response_builder.QueueRequests(
+ new_requests, self._request_parser.were_all_requests_http_1_1)
+ self._num_queued += len(new_requests)
+ self._last_queued_time = time.time()
+ elif fileno in wlist:
+- num_bytes_sent = self.request.send(self._send_buffer[0:4096])
++ num_bytes_sent = self.request.send(self._send_buffer[0:4096].encode('utf8'))
+ self._send_buffer = self._send_buffer[num_bytes_sent:]
+ time.sleep(0.05)
+
+diff --git a/tests/runtests.pl b/tests/runtests.pl
+index d6aa5ca..4d395ef 100755
+--- a/tests/runtests.pl
++++ b/tests/runtests.pl
+@@ -1437,7 +1437,7 @@ sub runhttpserver {
+ elsif($alt eq "pipe") {
+ # basically the same, but another ID
+ $idnum = 3;
+- $exe = "python $srcdir/http_pipe.py";
++ $exe = "python3 $srcdir/http_pipe.py";
+ $verbose_flag .= "1 ";
+ }
+ elsif($alt eq "unix") {
+--
+2.14.3
+
+
+From 3c4c7340e455b7256c0786759422f34ec3e2d440 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Thu, 15 Mar 2018 14:49:56 +0100
+Subject: [PATCH 2/2] tests/{negtelnet,smb}server.py: migrate to Python 3
+
+Unfortunately, smbserver.py does not work with Python 3 because
+there is no 'impacket' module available for Python 3:
+
+https://github.com/CoreSecurity/impacket/issues/61
+---
+ tests/negtelnetserver.py | 12 ++++++------
+ tests/smbserver.py | 4 ++--
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/tests/negtelnetserver.py b/tests/negtelnetserver.py
+index 8cfd409..72ee771 100755
+--- a/tests/negtelnetserver.py
++++ b/tests/negtelnetserver.py
+@@ -23,7 +23,7 @@ IDENT = "NTEL"
+
+ # The strings that indicate the test framework is checking our aliveness
+ VERIFIED_REQ = b"verifiedserver"
+-VERIFIED_RSP = b"WE ROOLZ: {pid}"
++VERIFIED_RSP = "WE ROOLZ: {pid}"
+
+
+ def telnetserver(options):
+@@ -34,7 +34,7 @@ def telnetserver(options):
+ if options.pidfile:
+ pid = os.getpid()
+ with open(options.pidfile, "w") as f:
+- f.write(b"{0}".format(pid))
++ f.write("{0}".format(pid))
+
+ local_bind = (HOST, options.port)
+ log.info("Listening on %s", local_bind)
+@@ -73,11 +73,11 @@ class NegotiatingTelnetHandler(socketserver.BaseRequestHandler):
+ response_data = VERIFIED_RSP.format(pid=os.getpid())
+ else:
+ log.debug("Received normal request - echoing back")
+- response_data = data.strip()
++ response_data = data.decode('utf8').strip()
+
+ if response_data:
+ log.debug("Sending %r", response_data)
+- self.request.sendall(response_data)
++ self.request.sendall(response_data.encode('utf8'))
+
+ except IOError:
+ log.exception("IOError hit during request")
+@@ -132,7 +132,7 @@ class Negotiator(object):
+ return buffer
+
+ def byte_to_int(self, byte):
+- return struct.unpack(b'B', byte)[0]
++ return int(byte)
+
+ def no_neg(self, byte, byte_int, buffer):
+ # Not negotiating anything thus far. Check to see if we
+@@ -197,7 +197,7 @@ class Negotiator(object):
+ self.tcp.sendall(packed_message)
+
+ def pack(self, arr):
+- return struct.pack(b'{0}B'.format(len(arr)), *arr)
++ return struct.pack('{0}B'.format(len(arr)), *arr)
+
+ def send_iac(self, arr):
+ message = [NegTokens.IAC]
+diff --git a/tests/smbserver.py b/tests/smbserver.py
+index 195ae39..b09cd44 100755
+--- a/tests/smbserver.py
++++ b/tests/smbserver.py
+@@ -24,7 +24,7 @@
+ from __future__ import (absolute_import, division, print_function)
+ # unicode_literals)
+ import argparse
+-import ConfigParser
++import configparser
+ import os
+ import sys
+ import logging
+@@ -58,7 +58,7 @@ def smbserver(options):
+ f.write("{0}".format(pid))
+
+ # Here we write a mini config for the server
+- smb_config = ConfigParser.ConfigParser()
++ smb_config = configparser.ConfigParser()
+ smb_config.add_section("global")
+ smb_config.set("global", "server_name", "SERVICE")
+ smb_config.set("global", "server_os", "UNIX")
+--
+2.14.3
+
diff --git a/curl.spec b/curl.spec
index d722f07..eb0ad83 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.59.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -14,6 +14,9 @@ Patch101: 0101-curl-7.32.0-multilib.patch
# prevent configure script from discarding -g in CFLAGS (#496778)
Patch102: 0102-curl-7.36.0-debug.patch
+# migrate tests/http_pipe.py to Python 3
+Patch103: 0103-curl-7.59.0-python3.patch
+
# use localhost6 instead of ip6-localhost in the curl test-suite
Patch104: 0104-curl-7.19.7-localhost6.patch
@@ -36,7 +39,7 @@ BuildRequires: openssh-clients
BuildRequires: openssh-server
BuildRequires: openssl-devel
BuildRequires: pkgconfig
-BuildRequires: python
+BuildRequires: python3
BuildRequires: sed
BuildRequires: stunnel
BuildRequires: zlib-devel
@@ -159,8 +162,12 @@ be installed.
# Fedora patches
%patch101 -p1
%patch102 -p1
+%patch103 -p1
%patch104 -p1
+# make tests/*.py use Python 3
+sed -e '1 s|^#!/.*python|&3|' -i tests/*.py
+
# regenerate Makefile.in files
#aclocal -I m4
#automake
@@ -300,6 +307,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu Mar 15 2018 Kamil Dudka - 7.59.0-3
+- make the test-suite use Python 3
+
* Wed Mar 14 2018 Kamil Dudka - 7.59.0-2
- ftp: fix typo in recursive callback detection for seeking
From 5a0fa9250ba51f804d18b99133055a4874bf06b7 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 16 May 2018 13:16:56 +0200
Subject: [PATCH 020/260] new upstream release, which fixes the following
vulnerabilities
Resolves: CVE-2018-1000300 - FTP shutdown response buffer overflow
Resolves: CVE-2018-1000301 - RTSP bad headers buffer over-read
---
...typo-in-recursive-callback-detection.patch | 29 -------------------
0102-curl-7.36.0-debug.patch | 2 +-
0103-curl-7.59.0-python3.patch | 2 +-
curl-7.59.0.tar.xz.asc | 11 -------
curl-7.60.0.tar.xz.asc | 11 +++++++
curl.spec | 13 +++++----
sources | 2 +-
7 files changed, 21 insertions(+), 49 deletions(-)
delete mode 100644 0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch
delete mode 100644 curl-7.59.0.tar.xz.asc
create mode 100644 curl-7.60.0.tar.xz.asc
diff --git a/0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch b/0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch
deleted file mode 100644
index 224630c..0000000
--- a/0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1b02cb2b51148915b2ba025bb262ef34f369fa4b Mon Sep 17 00:00:00 2001
-From: dasimx
-Date: Wed, 14 Mar 2018 11:02:05 +0100
-Subject: [PATCH] FTP: fix typo in recursive callback detection for seeking
-
-Fixes #2380
-
-Upstream-commit: 920f73a6906dce87c6ee87c32b109a287189965d
-Signed-off-by: Kamil Dudka
----
- lib/ftp.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/ftp.c b/lib/ftp.c
-index e2cc38b..0cc583b 100644
---- a/lib/ftp.c
-+++ b/lib/ftp.c
-@@ -1621,7 +1621,7 @@ static CURLcode ftp_state_ul_setup(struct connectdata *conn,
- Curl_set_in_callback(data, true);
- seekerr = conn->seek_func(conn->seek_client, data->state.resume_from,
- SEEK_SET);
-- Curl_set_in_callback(data, true);
-+ Curl_set_in_callback(data, false);
- }
-
- if(seekerr != CURL_SEEKFUNC_OK) {
---
-2.14.3
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 13f07df..95670f0 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16524,18 +16524,11 @@ $as_echo "yes" >&6; }
+@@ -16537,18 +16537,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/0103-curl-7.59.0-python3.patch b/0103-curl-7.59.0-python3.patch
index 8a39f85..dd10986 100644
--- a/0103-curl-7.59.0-python3.patch
+++ b/0103-curl-7.59.0-python3.patch
@@ -32,7 +32,7 @@ diff --git a/tests/runtests.pl b/tests/runtests.pl
index d6aa5ca..4d395ef 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
-@@ -1437,7 +1437,7 @@ sub runhttpserver {
+@@ -1438,7 +1438,7 @@ sub runhttpserver {
elsif($alt eq "pipe") {
# basically the same, but another ID
$idnum = 3;
diff --git a/curl-7.59.0.tar.xz.asc b/curl-7.59.0.tar.xz.asc
deleted file mode 100644
index e74f7b2..0000000
--- a/curl-7.59.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlqoxTwACgkQXMkI/bce
-EsJrHQf7B0ik8F5dfGYumYWkXHc9poJU+dJ0o6pwzg4QsP+4mwVTw/gnrXDm1hVk
-iFPIAdgTkxiIDZi+6mDfZA9dZ8Aq38XbYjRIwXTW4KrjTtEFQXtwlEClrHrJyXfl
-+2YC52BcY0D2JVDqUAB9cVSSgaHHf1jd4h32a8YMrwco4jP5rSxbmZe4psU2m8TC
-skaZEoSIRJzg5oV+AgDSQMrq+fLsc5lIDKTl+7v6sjnGlcYeRC1SiBePyrh5g/o5
-w4JJH839MyjrYvi6MyCBHeyCFYDrxKvQw8zRwivfZ1oipM2SaSVq8c60PdR85Zw5
-/SNOU/7Qpvhua0GhAfaI/CTwwewy6w==
-=OcVv
------END PGP SIGNATURE-----
diff --git a/curl-7.60.0.tar.xz.asc b/curl-7.60.0.tar.xz.asc
new file mode 100644
index 0000000..53ca282
--- /dev/null
+++ b/curl-7.60.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlr7zUoACgkQXMkI/bce
+EsK3jgf7Bvnswxxgq4wQWmqRKQvkN/zkuA2GjSm98M7mizVHl/7/imeqDl7S1vp0
+A6KCI99Epf+2EYgxrEbvZqlSQ6H30eBxOvV2yNwPhrS3UnXwNSJsbFr5bDRE4o8S
+upyP/tSgEIGJcpq0bstrD7T/DRZ1yFCLB5rOOJx4lQnPuB3C7GAmuOj1ZtIxWIn+
+D/G+X1+/oZlils2TMI7ryjRuFvOSPHdUNldwtvfaRg0i3tNYnPbWq54lhouSn31H
+ft8wNd3nnUpueWCWaKKXo+GBVDemDAMEcDbna+woW5SFLI6ZG/c822ljtld05Dk1
+KmwikC7MREQxkODmC10yrgy9I9akNg==
+=f++X
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index eb0ad83..348f6db 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.59.0
-Release: 3%{?dist}
+Version: 7.60.0
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# ftp: fix typo in recursive callback detection for seeking
-Patch1: 0001-curl-7.58.0-ftp-typo-in-recursive-callback-detection.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -157,7 +154,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -307,6 +303,11 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed May 16 2018 Kamil Dudka - 7.60.0-1
+- new upstream release, which fixes the following vulnerabilities
+ CVE-2018-1000300 - FTP shutdown response buffer overflow
+ CVE-2018-1000301 - RTSP bad headers buffer over-read
+
* Thu Mar 15 2018 Kamil Dudka - 7.59.0-3
- make the test-suite use Python 3
diff --git a/sources b/sources
index f353b13..4a1cecd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.59.0.tar.xz) = 6982a5950b564d6b2a4f4b96296b6db3db24a096acc68aa96966821b57f66362f5a69d9f2da762b5d2b1011a4a47478ebacaf05e26604f78bb013098749dd8a6
+SHA512 (curl-7.60.0.tar.xz) = 96a0c32ca846a76bba75e9e560ad4c15df79540992ed1a83713095be94ddba039f289bda9678762fd79fb9691fe810735178fb9dc970c37012dff96b8ce08abf
From 09c874db5300a1846a61cd675164d84974a4a8e0 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 16 May 2018 15:23:55 +0200
Subject: [PATCH 021/260] require glibc-debuginfo for valgrind-enabled build
... as suggested by valgrind itself:
valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld-linux-x86-64.so.2
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux-x86-64.so.2
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Note that if you are debugging a 32 bit process on a
valgrind: 64 bit system, you will need a corresponding 32 bit debuginfo
valgrind: package (e.g. libc6-dbg:i386).
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.
---
curl.spec | 1 +
1 file changed, 1 insertion(+)
diff --git a/curl.spec b/curl.spec
index 348f6db..9c12786 100644
--- a/curl.spec
+++ b/curl.spec
@@ -69,6 +69,7 @@ BuildRequires: perl(vars)
# #810992, #816175, and #886891). Nevertheless developers are free to install
# valgrind manually to improve test coverage on any architecture.
%ifarch x86_64 %{ix86}
+BuildRequires: glibc-debuginfo
BuildRequires: valgrind
%endif
From e51a34d6cc39a103b43b20a7eee32ed783f98035 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 16 May 2018 15:54:58 +0200
Subject: [PATCH 022/260] Related: #1570246 - temporarily disable valgrind
completely
... and revert the previous workaround, which does not work on Koji
---
curl.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/curl.spec b/curl.spec
index 9c12786..5f11302 100644
--- a/curl.spec
+++ b/curl.spec
@@ -69,8 +69,8 @@ BuildRequires: perl(vars)
# #810992, #816175, and #886891). Nevertheless developers are free to install
# valgrind manually to improve test coverage on any architecture.
%ifarch x86_64 %{ix86}
-BuildRequires: glibc-debuginfo
-BuildRequires: valgrind
+# temporarily disabled completely because of https://bugzilla.redhat.com/1570246
+# BuildRequires: valgrind
%endif
# using an older version of libcurl could result in CURLE_UNKNOWN_OPTION
From 4f55f71cfecf26e83feac730cb1c7eda58cc65a4 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 4 Jul 2018 15:12:27 +0200
Subject: [PATCH 023/260] Related: #1570246 - enable vlagrind again
This reverts commit e51a34d6cc39a103b43b20a7eee32ed783f98035.
---
curl.spec | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/curl.spec b/curl.spec
index 5f11302..348f6db 100644
--- a/curl.spec
+++ b/curl.spec
@@ -69,8 +69,7 @@ BuildRequires: perl(vars)
# #810992, #816175, and #886891). Nevertheless developers are free to install
# valgrind manually to improve test coverage on any architecture.
%ifarch x86_64 %{ix86}
-# temporarily disabled completely because of https://bugzilla.redhat.com/1570246
-# BuildRequires: valgrind
+BuildRequires: valgrind
%endif
# using an older version of libcurl could result in CURLE_UNKNOWN_OPTION
From befa5428f0a60d2f134dd8976cdf338cf6abbc5f Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 4 Jul 2018 15:07:32 +0200
Subject: [PATCH 024/260] do not hard-wire path of the Python 3 interpreter
---
curl.spec | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/curl.spec b/curl.spec
index 348f6db..814abf2 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.60.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -36,7 +36,7 @@ BuildRequires: openssh-clients
BuildRequires: openssh-server
BuildRequires: openssl-devel
BuildRequires: pkgconfig
-BuildRequires: python3
+BuildRequires: python3-devel
BuildRequires: sed
BuildRequires: stunnel
BuildRequires: zlib-devel
@@ -162,7 +162,7 @@ be installed.
%patch104 -p1
# make tests/*.py use Python 3
-sed -e '1 s|^#!/.*python|&3|' -i tests/*.py
+sed -e '1 s|^#!/.*python|#!%{__python3}|' -i tests/*.py
# regenerate Makefile.in files
#aclocal -I m4
@@ -303,6 +303,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Jul 04 2018 Kamil Dudka - 7.60.0-2
+- do not hard-wire path of the Python 3 interpreter
+
* Wed May 16 2018 Kamil Dudka - 7.60.0-1
- new upstream release, which fixes the following vulnerabilities
CVE-2018-1000300 - FTP shutdown response buffer overflow
From 9f5f0d1189a299bbe690ebb6233ad3f746b5b801 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Tue, 10 Jul 2018 13:51:08 +0200
Subject: [PATCH 025/260] enable support for brotli compression in libcurl-full
---
curl.spec | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index 814abf2..94a77a8 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.60.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -21,6 +21,7 @@ Provides: curl-full = %{version}-%{release}
Provides: webclient
URL: https://curl.haxx.se/
#BuildRequires: automake
+BuildRequires: brotli-devel
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: groff
@@ -198,6 +199,7 @@ export common_configure_opts=" \
--disable-ldap \
--disable-ldaps \
--disable-manual \
+ --without-brotli \
--without-libidn2 \
--without-libmetalink \
--without-libpsl \
@@ -211,6 +213,7 @@ export common_configure_opts=" \
--enable-ldap \
--enable-ldaps \
--enable-manual \
+ --with-brotli \
--with-libidn2 \
--with-libmetalink \
--with-libpsl \
@@ -303,6 +306,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Tue Jul 10 2018 Kamil Dudka - 7.60.0-3
+- enable support for brotli compression in libcurl-full
+
* Wed Jul 04 2018 Kamil Dudka - 7.60.0-2
- do not hard-wire path of the Python 3 interpreter
From d41d215108ce0cb639ba45ae3f20fa05a47454c5 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Tue, 10 Jul 2018 15:14:27 +0200
Subject: [PATCH 026/260] disable test 1455, which occasionally fails in Koji
... with 'bind failed with errno 98: Address already in use'
---
curl.spec | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/curl.spec b/curl.spec
index 94a77a8..4072953 100644
--- a/curl.spec
+++ b/curl.spec
@@ -169,9 +169,10 @@ sed -e '1 s|^#!/.*python|#!%{__python3}|' -i tests/*.py
#aclocal -I m4
#automake
-# disable test 1112 (#565305) and test 1801
+# disable test 1112 (#565305), test 1455 (occasionally fails with 'bind failed
+# with errno 98: Address already in use' in Koji environment), and test 1801
#
-printf "1112\n1801\n" >> tests/data/DISABLED
+printf "1112\n1455\n1801\n" >> tests/data/DISABLED
# disable test 1319 on ppc64 (server times out)
%ifarch ppc64
From a89a46eca8e5466c18dc70a0e5f7b54eb60071af Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 11 Jul 2018 14:16:32 +0200
Subject: [PATCH 027/260] new upstream release - 7.61.0
Resolves: CVE-2018-0500 - SMTP send heap buffer overflow
---
0102-curl-7.36.0-debug.patch | 2 +-
curl-7.60.0.tar.xz.asc | 11 -----------
curl-7.61.0.tar.xz.asc | 11 +++++++++++
curl.spec | 8 ++++++--
sources | 2 +-
5 files changed, 19 insertions(+), 15 deletions(-)
delete mode 100644 curl-7.60.0.tar.xz.asc
create mode 100644 curl-7.61.0.tar.xz.asc
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 95670f0..5fb54b6 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16537,18 +16537,11 @@ $as_echo "yes" >&6; }
+@@ -16409,18 +16409,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/curl-7.60.0.tar.xz.asc b/curl-7.60.0.tar.xz.asc
deleted file mode 100644
index 53ca282..0000000
--- a/curl-7.60.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlr7zUoACgkQXMkI/bce
-EsK3jgf7Bvnswxxgq4wQWmqRKQvkN/zkuA2GjSm98M7mizVHl/7/imeqDl7S1vp0
-A6KCI99Epf+2EYgxrEbvZqlSQ6H30eBxOvV2yNwPhrS3UnXwNSJsbFr5bDRE4o8S
-upyP/tSgEIGJcpq0bstrD7T/DRZ1yFCLB5rOOJx4lQnPuB3C7GAmuOj1ZtIxWIn+
-D/G+X1+/oZlils2TMI7ryjRuFvOSPHdUNldwtvfaRg0i3tNYnPbWq54lhouSn31H
-ft8wNd3nnUpueWCWaKKXo+GBVDemDAMEcDbna+woW5SFLI6ZG/c822ljtld05Dk1
-KmwikC7MREQxkODmC10yrgy9I9akNg==
-=f++X
------END PGP SIGNATURE-----
diff --git a/curl-7.61.0.tar.xz.asc b/curl-7.61.0.tar.xz.asc
new file mode 100644
index 0000000..024ef39
--- /dev/null
+++ b/curl-7.61.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAltFnUIACgkQXMkI/bce
+EsJSSggAo2pO9DacErY/wVqYm2KA76s8HDMyGkvb7HXPWe3w1Nj6nwCY8Knbp2C6
+s6LZ73gqKfe3K+kFsFE6bFy9l2MKNs64cBG19dNUGcoYek6zt1BBXC6LT8/eOWc4
+l6HKift+CBh6ErtInB2CzmoG7dvNoZA00sERJbj9w+QZK4CTBZPWjz9BRHo7V31q
+VnciTRgJ39HjL0kupdDIZgpCL741aWlkbOZu5wsRfe7nxWeiCdyOVluXluDi9t2i
+s1mTPMpkMWDIEh723QL5jOlct9/hTLXAS2yZeR6qJafcicyIboXh0ZwGQGonHADi
+aBs922AWx3v8x18thsCMQZwJSHiYEw==
+=7p0n
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 4072953..813d18b 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.60.0
-Release: 3%{?dist}
+Version: 7.61.0
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -307,6 +307,10 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Jul 11 2018 Kamil Dudka - 7.61.0-1
+- new upstream release, which fixes the following vulnerability
+ CVE-2018-0500 - SMTP send heap buffer overflow
+
* Tue Jul 10 2018 Kamil Dudka - 7.60.0-3
- enable support for brotli compression in libcurl-full
diff --git a/sources b/sources
index 4a1cecd..4248e66 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.60.0.tar.xz) = 96a0c32ca846a76bba75e9e560ad4c15df79540992ed1a83713095be94ddba039f289bda9678762fd79fb9691fe810735178fb9dc970c37012dff96b8ce08abf
+SHA512 (curl-7.61.0.tar.xz) = 1b450bbd794460fea12374a49739a49a43c3651038dc092c277769bab09a62627f8eedfa94b5c1610503bf20eeaf60643a1e32fdcf1bcf8d4085090c4a598b13
From 072eac2fb6b2bf8875ccb915628d2ca30cd9a8af Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Thu, 12 Jul 2018 22:28:24 +0000
Subject: [PATCH 028/260] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
curl.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index 813d18b..2bac3e1 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.61.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -307,6 +307,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu Jul 12 2018 Fedora Release Engineering - 7.61.0-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
+
* Wed Jul 11 2018 Kamil Dudka - 7.61.0-1
- new upstream release, which fixes the following vulnerability
CVE-2018-0500 - SMTP send heap buffer overflow
From bcdea587035cd7e9fbbf3fe1bb41e4658beb64da Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 4 Jul 2018 17:17:26 +0200
Subject: [PATCH 029/260] temporarily disable test 582 on s390x (client times
out)
---
curl.spec | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/curl.spec b/curl.spec
index 2bac3e1..c897629 100644
--- a/curl.spec
+++ b/curl.spec
@@ -179,6 +179,11 @@ printf "1112\n1455\n1801\n" >> tests/data/DISABLED
echo "1319" >> tests/data/DISABLED
%endif
+# temporarily disable test 582 on s390x (client times out)
+%ifarch s390x
+echo "582" >> tests/data/DISABLED
+%endif
+
%build
mkdir build-{full,minimal}
export common_configure_opts=" \
From 85286dc2b33ebd0343f5bdf8c79fa49e8e9183a9 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Tue, 31 Jul 2018 10:33:53 +0200
Subject: [PATCH 030/260] adapt test 323 for updated OpenSSL
---
curl.spec | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index c897629..e1149bc 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.61.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -184,6 +184,9 @@ echo "1319" >> tests/data/DISABLED
echo "582" >> tests/data/DISABLED
%endif
+# adapt test 323 for updated OpenSSL
+sed -e 's/^35$/35,52/' -i tests/data/test323
+
%build
mkdir build-{full,minimal}
export common_configure_opts=" \
@@ -312,6 +315,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Tue Jul 31 2018 Kamil Dudka - 7.61.0-3
+- adapt test 323 for updated OpenSSL
+
* Thu Jul 12 2018 Fedora Release Engineering - 7.61.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
From 3fb6e235575109530b10e9bc17c4f2ba21d17bcb Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Tue, 31 Jul 2018 10:34:24 +0200
Subject: [PATCH 031/260] disable flaky test 1900, which covers deprecated HTTP
pipelining
See https://github.com/curl/curl/pull/2705 for details.
---
curl.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index e1149bc..a56de38 100644
--- a/curl.spec
+++ b/curl.spec
@@ -172,7 +172,9 @@ sed -e '1 s|^#!/.*python|#!%{__python3}|' -i tests/*.py
# disable test 1112 (#565305), test 1455 (occasionally fails with 'bind failed
# with errno 98: Address already in use' in Koji environment), and test 1801
#
-printf "1112\n1455\n1801\n" >> tests/data/DISABLED
+# and test 1900, which is flaky and covers a deprecated feature of libcurl
+#
+printf "1112\n1455\n1801\n1900\n" >> tests/data/DISABLED
# disable test 1319 on ppc64 (server times out)
%ifarch ppc64
@@ -316,6 +318,7 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%changelog
* Tue Jul 31 2018 Kamil Dudka - 7.61.0-3
+- disable flaky test 1900, which covers deprecated HTTP pipelining
- adapt test 323 for updated OpenSSL
* Thu Jul 12 2018 Fedora Release Engineering - 7.61.0-2
From 35134a4aeeb38d3e2ce158e023acc4f3ffd0c175 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Tue, 7 Aug 2018 16:56:26 +0200
Subject: [PATCH 032/260] Related: #1610888 - relax crypto policy for the
test-suite to make it pass again
---
curl.spec | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index a56de38..2b7a4f5 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.61.0
-Release: 3%{?dist}
+Release: 4%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -248,6 +248,10 @@ export LD_LIBRARY_PATH
cd build-full/tests
make %{?_smp_mflags} V=1
+# relax crypto policy for the test-suite to make it pass again (#1610888)
+export OPENSSL_SYSTEM_CIPHERS_OVERRIDE=XXX
+export OPENSSL_CONF=
+
# run the upstream test-suite
srcdir=../../tests perl -I../../tests ../../tests/runtests.pl -a -p -v '!flaky'
@@ -317,6 +321,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Tue Aug 07 2018 Kamil Dudka - 7.61.0-4
+- relax crypto policy for the test-suite to make it pass again (#1610888)
+
* Tue Jul 31 2018 Kamil Dudka - 7.61.0-3
- disable flaky test 1900, which covers deprecated HTTP pipelining
- adapt test 323 for updated OpenSSL
From 178b0fc823a0cf52899b809e90b02860be596a1f Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 9 Aug 2018 13:37:25 +0200
Subject: [PATCH 033/260] Resolves: #1219544 - ssl: set engine implicitly when
a PKCS#11 URI is provided
---
0001-curl-7.61.0-pkcs11.patch | 272 ++++++++++++++++++++++++++++++++++
curl.spec | 9 +-
2 files changed, 280 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.61.0-pkcs11.patch
diff --git a/0001-curl-7.61.0-pkcs11.patch b/0001-curl-7.61.0-pkcs11.patch
new file mode 100644
index 0000000..d92b3e9
--- /dev/null
+++ b/0001-curl-7.61.0-pkcs11.patch
@@ -0,0 +1,272 @@
+From a9a65ae9f6516faf042b36eca2450db7d34bff47 Mon Sep 17 00:00:00 2001
+From: Anderson Toshiyuki Sasaki
+Date: Mon, 19 Feb 2018 14:31:06 +0100
+Subject: [PATCH 1/2] ssl: set engine implicitly when a PKCS#11 URI is provided
+
+This allows the use of PKCS#11 URI for certificates and keys without
+setting the corresponding type as "ENG" and the engine as "pkcs11"
+explicitly. If a PKCS#11 URI is provided for certificate, key,
+proxy_certificate or proxy_key, the corresponding type is set as "ENG"
+if not provided and the engine is set to "pkcs11" if not provided.
+
+Acked-by: Nikos Mavrogiannopoulos
+Closes #2333
+
+Upstream-commit: 298d2565e2a2f06a859b7f5a1cc24ba7c87a8ce2
+Signed-off-by: Kamil Dudka
+---
+ docs/cmdline-opts/cert.d | 7 ++++++
+ docs/cmdline-opts/key.d | 7 ++++++
+ lib/vtls/openssl.c | 38 ++++++++++++++++++++++++++++
+ src/tool_getparam.c | 2 +-
+ src/tool_operate.c | 53 ++++++++++++++++++++++++++++++++++++++++
+ tests/unit/unit1394.c | 3 +++
+ 6 files changed, 109 insertions(+), 1 deletion(-)
+
+diff --git a/docs/cmdline-opts/cert.d b/docs/cmdline-opts/cert.d
+index adf62fc..510b833 100644
+--- a/docs/cmdline-opts/cert.d
++++ b/docs/cmdline-opts/cert.d
+@@ -23,6 +23,13 @@ nickname contains ":", it needs to be preceded by "\\" so that it is not
+ recognized as password delimiter. If the nickname contains "\\", it needs to
+ be escaped as "\\\\" so that it is not recognized as an escape character.
+
++If curl is built against OpenSSL library, and the engine pkcs11 is available,
++then a PKCS#11 URI (RFC 7512) can be used to specify a certificate located in
++a PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
++PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine option will be set
++as "pkcs11" if none was provided and the --cert-type option will be set as
++"ENG" if none was provided.
++
+ (iOS and macOS only) If curl is built against Secure Transport, then the
+ certificate string can either be the name of a certificate/private key in the
+ system or user keychain, or the path to a PKCS#12-encoded certificate and
+diff --git a/docs/cmdline-opts/key.d b/docs/cmdline-opts/key.d
+index fbf583a..4877b42 100644
+--- a/docs/cmdline-opts/key.d
++++ b/docs/cmdline-opts/key.d
+@@ -7,4 +7,11 @@ Private key file name. Allows you to provide your private key in this separate
+ file. For SSH, if not specified, curl tries the following candidates in order:
+ '~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'.
+
++If curl is built against OpenSSL library, and the engine pkcs11 is available,
++then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in a
++PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
++PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine option will be set
++as "pkcs11" if none was provided and the --key-type option will be set as
++"ENG" if none was provided.
++
+ If this option is used several times, the last one will be used.
+diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
+index 0b1929b..bc46eca 100644
+--- a/lib/vtls/openssl.c
++++ b/lib/vtls/openssl.c
+@@ -558,8 +558,25 @@ static int ssl_ui_writer(UI *ui, UI_STRING *uis)
+ }
+ return (UI_method_get_writer(UI_OpenSSL()))(ui, uis);
+ }
++
++/*
++ * Check if a given string is a PKCS#11 URI
++ */
++static bool is_pkcs11_uri(const char *string)
++{
++ if(strncasecompare(string, "pkcs11:", 7)) {
++ return TRUE;
++ }
++ else {
++ return FALSE;
++ }
++}
++
+ #endif
+
++static CURLcode Curl_ossl_set_engine(struct Curl_easy *data,
++ const char *engine);
++
+ static
+ int cert_stuff(struct connectdata *conn,
+ SSL_CTX* ctx,
+@@ -622,6 +639,16 @@ int cert_stuff(struct connectdata *conn,
+ case SSL_FILETYPE_ENGINE:
+ #if defined(USE_OPENSSL_ENGINE) && defined(ENGINE_CTRL_GET_CMD_FROM_NAME)
+ {
++ /* Implicitly use pkcs11 engine if none was provided and the
++ * cert_file is a PKCS#11 URI */
++ if(!data->state.engine) {
++ if(is_pkcs11_uri(cert_file)) {
++ if(Curl_ossl_set_engine(data, "pkcs11") != CURLE_OK) {
++ return 0;
++ }
++ }
++ }
++
+ if(data->state.engine) {
+ const char *cmd_name = "LOAD_CERT_CTRL";
+ struct {
+@@ -798,6 +825,17 @@ int cert_stuff(struct connectdata *conn,
+ #ifdef USE_OPENSSL_ENGINE
+ { /* XXXX still needs some work */
+ EVP_PKEY *priv_key = NULL;
++
++ /* Implicitly use pkcs11 engine if none was provided and the
++ * key_file is a PKCS#11 URI */
++ if(!data->state.engine) {
++ if(is_pkcs11_uri(key_file)) {
++ if(Curl_ossl_set_engine(data, "pkcs11") != CURLE_OK) {
++ return 0;
++ }
++ }
++ }
++
+ if(data->state.engine) {
+ UI_METHOD *ui_method =
+ UI_create_method((char *)"curl user interface");
+diff --git a/src/tool_getparam.c b/src/tool_getparam.c
+index cc3fcf3..a7bb7f9 100644
+--- a/src/tool_getparam.c
++++ b/src/tool_getparam.c
+@@ -342,7 +342,7 @@ void parse_cert_parameter(const char *cert_parameter,
+ * looks like a RFC7512 PKCS#11 URI which can be used as-is.
+ * Also if cert_parameter contains no colon nor backslash, this
+ * means no passphrase was given and no characters escaped */
+- if(!strncmp(cert_parameter, "pkcs11:", 7) ||
++ if(curl_strnequal(cert_parameter, "pkcs11:", 7) ||
+ !strpbrk(cert_parameter, ":\\")) {
+ *certname = strdup(cert_parameter);
+ return;
+diff --git a/src/tool_operate.c b/src/tool_operate.c
+index 26fc251..25d450c 100644
+--- a/src/tool_operate.c
++++ b/src/tool_operate.c
+@@ -113,6 +113,19 @@ static bool is_fatal_error(CURLcode code)
+ return FALSE;
+ }
+
++/*
++ * Check if a given string is a PKCS#11 URI
++ */
++static bool is_pkcs11_uri(const char *string)
++{
++ if(curl_strnequal(string, "pkcs11:", 7)) {
++ return TRUE;
++ }
++ else {
++ return FALSE;
++ }
++}
++
+ #ifdef __VMS
+ /*
+ * get_vms_file_size does what it takes to get the real size of the file
+@@ -1073,6 +1086,46 @@ static CURLcode operate_do(struct GlobalConfig *global,
+ my_setopt_str(curl, CURLOPT_PINNEDPUBLICKEY, config->pinnedpubkey);
+
+ if(curlinfo->features & CURL_VERSION_SSL) {
++ /* Check if config->cert is a PKCS#11 URI and set the
++ * config->cert_type if necessary */
++ if(config->cert) {
++ if(!config->cert_type) {
++ if(is_pkcs11_uri(config->cert)) {
++ config->cert_type = strdup("ENG");
++ }
++ }
++ }
++
++ /* Check if config->key is a PKCS#11 URI and set the
++ * config->key_type if necessary */
++ if(config->key) {
++ if(!config->key_type) {
++ if(is_pkcs11_uri(config->key)) {
++ config->key_type = strdup("ENG");
++ }
++ }
++ }
++
++ /* Check if config->proxy_cert is a PKCS#11 URI and set the
++ * config->proxy_type if necessary */
++ if(config->proxy_cert) {
++ if(!config->proxy_cert_type) {
++ if(is_pkcs11_uri(config->proxy_cert)) {
++ config->proxy_cert_type = strdup("ENG");
++ }
++ }
++ }
++
++ /* Check if config->proxy_key is a PKCS#11 URI and set the
++ * config->proxy_key_type if necessary */
++ if(config->proxy_key) {
++ if(!config->proxy_key_type) {
++ if(is_pkcs11_uri(config->proxy_key)) {
++ config->proxy_key_type = strdup("ENG");
++ }
++ }
++ }
++
+ my_setopt_str(curl, CURLOPT_SSLCERT, config->cert);
+ my_setopt_str(curl, CURLOPT_PROXY_SSLCERT, config->proxy_cert);
+ my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type);
+diff --git a/tests/unit/unit1394.c b/tests/unit/unit1394.c
+index 667991d..010f052 100644
+--- a/tests/unit/unit1394.c
++++ b/tests/unit/unit1394.c
+@@ -56,6 +56,9 @@ UNITTEST_START
+ "foo:bar\\\\", "foo", "bar\\\\",
+ "foo:bar:", "foo", "bar:",
+ "foo\\::bar\\:", "foo:", "bar\\:",
++ "pkcs11:foobar", "pkcs11:foobar", NULL,
++ "PKCS11:foobar", "PKCS11:foobar", NULL,
++ "PkCs11:foobar", "PkCs11:foobar", NULL,
+ #ifdef WIN32
+ "c:\\foo:bar:baz", "c:\\foo", "bar:baz",
+ "c:\\foo\\:bar:baz", "c:\\foo:bar", "baz",
+--
+2.17.1
+
+
+From 2be42ac65f4c345ed3ddc97917c8ef54e13fcbfd Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Thu, 9 Aug 2018 15:34:22 +0200
+Subject: [PATCH 2/2] docs: add files needed to regenerate curl.1 man page
+
+Bug: https://github.com/curl/curl/pull/2856
+---
+ docs/cmdline-opts/disallow-username-in-url.d | 7 +++++++
+ docs/cmdline-opts/haproxy-protocol.d | 11 +++++++++++
+ 2 files changed, 18 insertions(+)
+ create mode 100644 docs/cmdline-opts/disallow-username-in-url.d
+ create mode 100644 docs/cmdline-opts/haproxy-protocol.d
+
+diff --git a/docs/cmdline-opts/disallow-username-in-url.d b/docs/cmdline-opts/disallow-username-in-url.d
+new file mode 100644
+index 0000000..a7f46ea
+--- /dev/null
++++ b/docs/cmdline-opts/disallow-username-in-url.d
+@@ -0,0 +1,7 @@
++Long: disallow-username-in-url
++Help: Disallow username in url
++Protocols: HTTP
++Added: 7.61.0
++See-also: proto
++---
++This tells curl to exit if passed a url containing a username.
+diff --git a/docs/cmdline-opts/haproxy-protocol.d b/docs/cmdline-opts/haproxy-protocol.d
+new file mode 100644
+index 0000000..cc41c9c
+--- /dev/null
++++ b/docs/cmdline-opts/haproxy-protocol.d
+@@ -0,0 +1,11 @@
++Long: haproxy-protocol
++Help: Send HAProxy PROXY protocol v1 header
++Protocols: HTTP
++Added: 7.60.0
++---
++Send a HAProxy PROXY protocol v1 header at the beginning of the connection. This
++is used by some load balancers and reverse proxies to indicate the client's
++true IP address and port.
++
++This option is primarily useful when sending test requests to a service that
++expects this header.
+--
+2.17.1
+
diff --git a/curl.spec b/curl.spec
index 2b7a4f5..db7d3a4 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.61.0
-Release: 4%{?dist}
+Release: 5%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# ssl: set engine implicitly when a PKCS#11 URI is provided (#1219544)
+Patch1: 0001-curl-7.61.0-pkcs11.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -155,6 +158,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -321,6 +325,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu Aug 09 2018 Kamil Dudka - 7.61.0-5
+- ssl: set engine implicitly when a PKCS#11 URI is provided (#1219544)
+
* Tue Aug 07 2018 Kamil Dudka - 7.61.0-4
- relax crypto policy for the test-suite to make it pass again (#1610888)
From 023b327acc85474414b8935401fd90238f89b5bb Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 15 Aug 2018 13:56:12 +0200
Subject: [PATCH 034/260] Resolves: #1595135 - scp/sftp: fix infinite connect
loop on invalid private key
---
0002-curl-7.61.0-libssh.patch | 130 ++++++++++++++++++++++++++++++++++
curl.spec | 15 ++--
2 files changed, 141 insertions(+), 4 deletions(-)
create mode 100644 0002-curl-7.61.0-libssh.patch
diff --git a/0002-curl-7.61.0-libssh.patch b/0002-curl-7.61.0-libssh.patch
new file mode 100644
index 0000000..75966b4
--- /dev/null
+++ b/0002-curl-7.61.0-libssh.patch
@@ -0,0 +1,130 @@
+From 155d4ffb7d40daf2afa0102f91f810675220ab6e Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Tue, 14 Aug 2018 13:14:49 +0200
+Subject: [PATCH] ssh-libssh: reduce excessive verbose output about pubkey auth
+
+The verbose message "Authentication using SSH public key file" was
+printed each time the ssh_userauth_publickey_auto() was called, which
+meant each time a packet was transferred over network because the API
+operates in non-blocking mode.
+
+This patch makes sure that the verbose message is printed just once
+(when the authentication state is entered by the SSH state machine).
+
+Upstream-commit: 1e843a31a49484aeddf8f358e71392205f5fd6b1
+Signed-off-by: Kamil Dudka
+---
+ lib/ssh-libssh.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
+index cecf477ac..f40f074b9 100644
+--- a/lib/ssh-libssh.c
++++ b/lib/ssh-libssh.c
+@@ -618,6 +618,7 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
+ sshc->auth_methods = ssh_userauth_list(sshc->ssh_session, NULL);
+ if(sshc->auth_methods & SSH_AUTH_METHOD_PUBLICKEY) {
+ state(conn, SSH_AUTH_PKEY_INIT);
++ infof(data, "Authentication using SSH public key file\n");
+ }
+ else if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) {
+ state(conn, SSH_AUTH_GSSAPI);
+@@ -670,8 +671,6 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
+
+ }
+ else {
+- infof(data, "Authentication using SSH public key file\n");
+-
+ rc = ssh_userauth_publickey_auto(sshc->ssh_session, NULL,
+ data->set.ssl.key_passwd);
+ if(rc == SSH_AUTH_AGAIN) {
+--
+2.17.1
+
+From 4b445519694ab620bd6376066844a7076e8ce4ab Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Tue, 14 Aug 2018 12:47:18 +0200
+Subject: [PATCH] ssh-libssh: fix infinite connect loop on invalid private key
+
+Added test 656 (based on test 604) to verify the fix.
+
+Bug: https://bugzilla.redhat.com/1595135
+
+Closes #2879
+
+Upstream-commit: a4c7911a48dadb4f68ba6b38bb1bf3f061b747f6
+Signed-off-by: Kamil Dudka
+---
+ lib/ssh-libssh.c | 1 +
+ tests/data/Makefile.inc | 2 +-
+ tests/data/test656 | 33 +++++++++++++++++++++++++++++++++
+ 3 files changed, 35 insertions(+), 1 deletion(-)
+ create mode 100644 tests/data/test656
+
+diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
+index f40f074b9..12d618cfe 100644
+--- a/lib/ssh-libssh.c
++++ b/lib/ssh-libssh.c
+@@ -663,6 +663,7 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
+ if(rc != SSH_OK) {
+ failf(data, "Could not load private key file %s",
+ data->set.str[STRING_SSH_PRIVATE_KEY]);
++ MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);
+ break;
+ }
+
+diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
+index 20274b37c..518a5a543 100644
+--- a/tests/data/Makefile.inc
++++ b/tests/data/Makefile.inc
+@@ -83,7 +83,7 @@ test617 test618 test619 test620 test621 test622 test623 test624 test625 \
+ test626 test627 test628 test629 test630 test631 test632 test633 test634 \
+ test635 test636 test637 test638 test639 test640 test641 test642 \
+ test643 test644 test645 test646 test647 test648 test649 test650 test651 \
+-test652 test653 test654 test655 \
++test652 test653 test654 test655 test656 \
+ \
+ test700 test701 test702 test703 test704 test705 test706 test707 test708 \
+ test709 test710 test711 test712 test713 test714 test715 \
+diff --git a/tests/data/test656 b/tests/data/test656
+new file mode 100644
+index 000000000..4107d3d17
+--- /dev/null
++++ b/tests/data/test656
+@@ -0,0 +1,33 @@
++
++
++
++SFTP
++FAILURE
++
++
++
++#
++# Client-side
++
++
++sftp
++
++
++SFTP retrieval with nonexistent private key file
++
++
++--key DOES_NOT_EXIST --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%PWD/not-a-valid-file-moooo --insecure --connect-timeout 8
++
++
++
++#
++# Verify data after the test has been "shot"
++
++
++disable
++
++
++67
++
++
++
+--
+2.17.1
+
diff --git a/curl.spec b/curl.spec
index db7d3a4..8c2b8bb 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,16 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.61.0
-Release: 5%{?dist}
+Release: 6%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
# ssl: set engine implicitly when a PKCS#11 URI is provided (#1219544)
Patch1: 0001-curl-7.61.0-pkcs11.patch
+# scp/sftp: fix infinite connect loop on invalid private key (#1595135)
+Patch2: 0002-curl-7.61.0-libssh.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -23,7 +26,7 @@ Patch104: 0104-curl-7.19.7-localhost6.patch
Provides: curl-full = %{version}-%{release}
Provides: webclient
URL: https://curl.haxx.se/
-#BuildRequires: automake
+BuildRequires: automake
BuildRequires: brotli-devel
BuildRequires: coreutils
BuildRequires: gcc
@@ -159,6 +162,7 @@ be installed.
# upstream patches
%patch1 -p1
+%patch2 -p1
# Fedora patches
%patch101 -p1
@@ -170,8 +174,8 @@ be installed.
sed -e '1 s|^#!/.*python|#!%{__python3}|' -i tests/*.py
# regenerate Makefile.in files
-#aclocal -I m4
-#automake
+aclocal -I m4
+automake
# disable test 1112 (#565305), test 1455 (occasionally fails with 'bind failed
# with errno 98: Address already in use' in Koji environment), and test 1801
@@ -325,6 +329,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Aug 15 2018 Kamil Dudka - 7.61.0-6
+- scp/sftp: fix infinite connect loop on invalid private key (#1595135)
+
* Thu Aug 09 2018 Kamil Dudka - 7.61.0-5
- ssl: set engine implicitly when a PKCS#11 URI is provided (#1219544)
From 8bff7e0d6b511d2b351c51f86933ac2eaa7c6180 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 27 Aug 2018 15:58:33 +0200
Subject: [PATCH 035/260] Related: #1622594 - tests: make ssh-keygen always
produce PEM format
The default format produced by openssh-7.8p1 cannot be consumed
by currently available versions of libssh and libssh2.
---
0105-curl-7.61.0-tests-ssh-keygen.patch | 33 +++++++++++++++++++++++++
curl.spec | 9 ++++++-
2 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 0105-curl-7.61.0-tests-ssh-keygen.patch
diff --git a/0105-curl-7.61.0-tests-ssh-keygen.patch b/0105-curl-7.61.0-tests-ssh-keygen.patch
new file mode 100644
index 0000000..b8b9ffb
--- /dev/null
+++ b/0105-curl-7.61.0-tests-ssh-keygen.patch
@@ -0,0 +1,33 @@
+From daded1aff280104d16e405fcd1be1a857c74b191 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Mon, 27 Aug 2018 15:53:35 +0200
+Subject: [PATCH] tests: make ssh-keygen always produce PEM format
+
+The default format produced by openssh-7.8p1 cannot be consumed
+by currently available versions of libssh and libssh2.
+---
+ tests/sshserver.pl | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/sshserver.pl b/tests/sshserver.pl
+index 9b3d122..d477a02 100755
+--- a/tests/sshserver.pl
++++ b/tests/sshserver.pl
+@@ -372,12 +372,12 @@ if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) ||
+ # Make sure all files are gone so ssh-keygen doesn't complain
+ unlink($hstprvkeyf, $hstpubkeyf, $cliprvkeyf, $clipubkeyf);
+ logmsg 'generating host keys...' if($verbose);
+- if(system "\"$sshkeygen\" -q -t rsa -f $hstprvkeyf -C 'curl test server' -N ''") {
++ if(system "\"$sshkeygen\" -q -t rsa -f $hstprvkeyf -C 'curl test server' -N '' -m PEM") {
+ logmsg 'Could not generate host key';
+ exit 1;
+ }
+ logmsg 'generating client keys...' if($verbose);
+- if(system "\"$sshkeygen\" -q -t rsa -f $cliprvkeyf -C 'curl test client' -N ''") {
++ if(system "\"$sshkeygen\" -q -t rsa -f $cliprvkeyf -C 'curl test client' -N '' -m PEM") {
+ logmsg 'Could not generate client key';
+ exit 1;
+ }
+--
+2.17.1
+
diff --git a/curl.spec b/curl.spec
index 8c2b8bb..41e828b 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.61.0
-Release: 6%{?dist}
+Release: 7%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -23,6 +23,9 @@ Patch103: 0103-curl-7.59.0-python3.patch
# use localhost6 instead of ip6-localhost in the curl test-suite
Patch104: 0104-curl-7.19.7-localhost6.patch
+# tests: make ssh-keygen always produce PEM format (#1622594)
+Patch105: 0105-curl-7.61.0-tests-ssh-keygen.patch
+
Provides: curl-full = %{version}-%{release}
Provides: webclient
URL: https://curl.haxx.se/
@@ -169,6 +172,7 @@ be installed.
%patch102 -p1
%patch103 -p1
%patch104 -p1
+%patch105 -p1
# make tests/*.py use Python 3
sed -e '1 s|^#!/.*python|#!%{__python3}|' -i tests/*.py
@@ -329,6 +333,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Mon Aug 27 2018 Kamil Dudka - 7.61.0-7
+- tests: make ssh-keygen always produce PEM format (#1622594)
+
* Wed Aug 15 2018 Kamil Dudka - 7.61.0-6
- scp/sftp: fix infinite connect loop on invalid private key (#1595135)
From e7b6b91818749a26ce0f5a152d6c7387dc883efb Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Tue, 4 Sep 2018 15:20:55 +0200
Subject: [PATCH 036/260] make the --tls13-ciphers option work
---
0003-curl-7.61.0-tls13-ciphers.patch | 101 +++++++++++++++++++++++++++
curl.spec | 9 ++-
2 files changed, 109 insertions(+), 1 deletion(-)
create mode 100644 0003-curl-7.61.0-tls13-ciphers.patch
diff --git a/0003-curl-7.61.0-tls13-ciphers.patch b/0003-curl-7.61.0-tls13-ciphers.patch
new file mode 100644
index 0000000..a55ca64
--- /dev/null
+++ b/0003-curl-7.61.0-tls13-ciphers.patch
@@ -0,0 +1,101 @@
+From 426b00d0587797d79806f9682b058d5c90a0ab79 Mon Sep 17 00:00:00 2001
+From: Jay Satiro
+Date: Fri, 31 Aug 2018 19:46:29 -0400
+Subject: [PATCH 1/2] openssl: Fix setting TLS 1.3 cipher suites
+
+The flag indicating TLS 1.3 cipher support in the OpenSSL backend was
+missing.
+
+Bug: https://github.com/curl/curl/pull/2607#issuecomment-417283187
+Reported-by: Kamil Dudka
+
+Closes #2926
+
+Upstream-commit: 978574b502294ae06eb97d4f590b54ed5d24cd7f
+Signed-off-by: Kamil Dudka
+---
+ lib/vtls/openssl.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
+index bc46eca..fad4287 100644
+--- a/lib/vtls/openssl.c
++++ b/lib/vtls/openssl.c
+@@ -3804,6 +3804,9 @@ const struct Curl_ssl Curl_ssl_openssl = {
+ SSLSUPP_CERTINFO |
+ SSLSUPP_PINNEDPUBKEY |
+ SSLSUPP_SSL_CTX |
++#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
++ SSLSUPP_TLS13_CIPHERSUITES |
++#endif
+ SSLSUPP_HTTPS_PROXY,
+
+ sizeof(struct ssl_backend_data),
+--
+2.17.1
+
+
+From 081afa4e2eb5e853833bd87ca43f48ab550fe657 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Mon, 3 Sep 2018 13:04:00 +0200
+Subject: [PATCH 2/2] url, vtls: make CURLOPT{,_PROXY}_TLS13_CIPHERS work
+
+This is a follow-up to PR #2607 and PR #2926.
+
+Closes #2936
+
+Upstream-commit: 52c13d6328ff56b2d2e8313e88cfdfc78acda365
+Signed-off-by: Kamil Dudka
+---
+ lib/url.c | 4 ++++
+ lib/vtls/vtls.c | 5 ++++-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/lib/url.c b/lib/url.c
+index 27b2c1e..46898c4 100644
+--- a/lib/url.c
++++ b/lib/url.c
+@@ -4356,6 +4356,10 @@ static CURLcode create_conn(struct Curl_easy *data,
+ data->set.str[STRING_SSL_CIPHER_LIST_ORIG];
+ data->set.proxy_ssl.primary.cipher_list =
+ data->set.str[STRING_SSL_CIPHER_LIST_PROXY];
++ data->set.ssl.primary.cipher_list13 =
++ data->set.str[STRING_SSL_CIPHER13_LIST_ORIG];
++ data->set.proxy_ssl.primary.cipher_list13 =
++ data->set.str[STRING_SSL_CIPHER13_LIST_PROXY];
+
+ data->set.ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE_ORIG];
+ data->set.proxy_ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY];
+diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
+index bf96518..b61c640 100644
+--- a/lib/vtls/vtls.c
++++ b/lib/vtls/vtls.c
+@@ -96,7 +96,8 @@ Curl_ssl_config_matches(struct ssl_primary_config* data,
+ Curl_safe_strcasecompare(data->clientcert, needle->clientcert) &&
+ Curl_safe_strcasecompare(data->random_file, needle->random_file) &&
+ Curl_safe_strcasecompare(data->egdsocket, needle->egdsocket) &&
+- Curl_safe_strcasecompare(data->cipher_list, needle->cipher_list))
++ Curl_safe_strcasecompare(data->cipher_list, needle->cipher_list) &&
++ Curl_safe_strcasecompare(data->cipher_list13, needle->cipher_list13))
+ return TRUE;
+
+ return FALSE;
+@@ -119,6 +120,7 @@ Curl_clone_primary_ssl_config(struct ssl_primary_config *source,
+ CLONE_STRING(random_file);
+ CLONE_STRING(egdsocket);
+ CLONE_STRING(cipher_list);
++ CLONE_STRING(cipher_list13);
+
+ return TRUE;
+ }
+@@ -131,6 +133,7 @@ void Curl_free_primary_ssl_config(struct ssl_primary_config* sslc)
+ Curl_safefree(sslc->random_file);
+ Curl_safefree(sslc->egdsocket);
+ Curl_safefree(sslc->cipher_list);
++ Curl_safefree(sslc->cipher_list13);
+ }
+
+ #ifdef USE_SSL
+--
+2.17.1
+
diff --git a/curl.spec b/curl.spec
index 41e828b..dbd4d40 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.61.0
-Release: 7%{?dist}
+Release: 8%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -11,6 +11,9 @@ Patch1: 0001-curl-7.61.0-pkcs11.patch
# scp/sftp: fix infinite connect loop on invalid private key (#1595135)
Patch2: 0002-curl-7.61.0-libssh.patch
+# make the --tls13-ciphers option work
+Patch3: 0003-curl-7.61.0-tls13-ciphers.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -166,6 +169,7 @@ be installed.
# upstream patches
%patch1 -p1
%patch2 -p1
+%patch3 -p1
# Fedora patches
%patch101 -p1
@@ -333,6 +337,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Tue Sep 04 2018 Kamil Dudka - 7.61.0-8
+- make the --tls13-ciphers option work
+
* Mon Aug 27 2018 Kamil Dudka - 7.61.0-7
- tests: make ssh-keygen always produce PEM format (#1622594)
From 20b63790e4e0f1c1ef978d2f337c858d90f6e262 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 5 Sep 2018 09:57:41 +0200
Subject: [PATCH 037/260] new upstream release - 7.61.1
Resolves: CVE-2018-14618 - NTLM password overflow via integer overflow
---
0001-curl-7.61.0-pkcs11.patch | 272 ---------------------------
0002-curl-7.61.0-libssh.patch | 130 -------------
0003-curl-7.61.0-tls13-ciphers.patch | 101 ----------
0102-curl-7.36.0-debug.patch | 2 +-
0103-curl-7.59.0-python3.patch | 2 +-
curl-7.61.0.tar.xz.asc | 11 --
curl-7.61.1.tar.xz.asc | 11 ++
curl.spec | 20 +-
sources | 2 +-
9 files changed, 20 insertions(+), 531 deletions(-)
delete mode 100644 0001-curl-7.61.0-pkcs11.patch
delete mode 100644 0002-curl-7.61.0-libssh.patch
delete mode 100644 0003-curl-7.61.0-tls13-ciphers.patch
delete mode 100644 curl-7.61.0.tar.xz.asc
create mode 100644 curl-7.61.1.tar.xz.asc
diff --git a/0001-curl-7.61.0-pkcs11.patch b/0001-curl-7.61.0-pkcs11.patch
deleted file mode 100644
index d92b3e9..0000000
--- a/0001-curl-7.61.0-pkcs11.patch
+++ /dev/null
@@ -1,272 +0,0 @@
-From a9a65ae9f6516faf042b36eca2450db7d34bff47 Mon Sep 17 00:00:00 2001
-From: Anderson Toshiyuki Sasaki
-Date: Mon, 19 Feb 2018 14:31:06 +0100
-Subject: [PATCH 1/2] ssl: set engine implicitly when a PKCS#11 URI is provided
-
-This allows the use of PKCS#11 URI for certificates and keys without
-setting the corresponding type as "ENG" and the engine as "pkcs11"
-explicitly. If a PKCS#11 URI is provided for certificate, key,
-proxy_certificate or proxy_key, the corresponding type is set as "ENG"
-if not provided and the engine is set to "pkcs11" if not provided.
-
-Acked-by: Nikos Mavrogiannopoulos
-Closes #2333
-
-Upstream-commit: 298d2565e2a2f06a859b7f5a1cc24ba7c87a8ce2
-Signed-off-by: Kamil Dudka
----
- docs/cmdline-opts/cert.d | 7 ++++++
- docs/cmdline-opts/key.d | 7 ++++++
- lib/vtls/openssl.c | 38 ++++++++++++++++++++++++++++
- src/tool_getparam.c | 2 +-
- src/tool_operate.c | 53 ++++++++++++++++++++++++++++++++++++++++
- tests/unit/unit1394.c | 3 +++
- 6 files changed, 109 insertions(+), 1 deletion(-)
-
-diff --git a/docs/cmdline-opts/cert.d b/docs/cmdline-opts/cert.d
-index adf62fc..510b833 100644
---- a/docs/cmdline-opts/cert.d
-+++ b/docs/cmdline-opts/cert.d
-@@ -23,6 +23,13 @@ nickname contains ":", it needs to be preceded by "\\" so that it is not
- recognized as password delimiter. If the nickname contains "\\", it needs to
- be escaped as "\\\\" so that it is not recognized as an escape character.
-
-+If curl is built against OpenSSL library, and the engine pkcs11 is available,
-+then a PKCS#11 URI (RFC 7512) can be used to specify a certificate located in
-+a PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
-+PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine option will be set
-+as "pkcs11" if none was provided and the --cert-type option will be set as
-+"ENG" if none was provided.
-+
- (iOS and macOS only) If curl is built against Secure Transport, then the
- certificate string can either be the name of a certificate/private key in the
- system or user keychain, or the path to a PKCS#12-encoded certificate and
-diff --git a/docs/cmdline-opts/key.d b/docs/cmdline-opts/key.d
-index fbf583a..4877b42 100644
---- a/docs/cmdline-opts/key.d
-+++ b/docs/cmdline-opts/key.d
-@@ -7,4 +7,11 @@ Private key file name. Allows you to provide your private key in this separate
- file. For SSH, if not specified, curl tries the following candidates in order:
- '~/.ssh/id_rsa', '~/.ssh/id_dsa', './id_rsa', './id_dsa'.
-
-+If curl is built against OpenSSL library, and the engine pkcs11 is available,
-+then a PKCS#11 URI (RFC 7512) can be used to specify a private key located in a
-+PKCS#11 device. A string beginning with "pkcs11:" will be interpreted as a
-+PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine option will be set
-+as "pkcs11" if none was provided and the --key-type option will be set as
-+"ENG" if none was provided.
-+
- If this option is used several times, the last one will be used.
-diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
-index 0b1929b..bc46eca 100644
---- a/lib/vtls/openssl.c
-+++ b/lib/vtls/openssl.c
-@@ -558,8 +558,25 @@ static int ssl_ui_writer(UI *ui, UI_STRING *uis)
- }
- return (UI_method_get_writer(UI_OpenSSL()))(ui, uis);
- }
-+
-+/*
-+ * Check if a given string is a PKCS#11 URI
-+ */
-+static bool is_pkcs11_uri(const char *string)
-+{
-+ if(strncasecompare(string, "pkcs11:", 7)) {
-+ return TRUE;
-+ }
-+ else {
-+ return FALSE;
-+ }
-+}
-+
- #endif
-
-+static CURLcode Curl_ossl_set_engine(struct Curl_easy *data,
-+ const char *engine);
-+
- static
- int cert_stuff(struct connectdata *conn,
- SSL_CTX* ctx,
-@@ -622,6 +639,16 @@ int cert_stuff(struct connectdata *conn,
- case SSL_FILETYPE_ENGINE:
- #if defined(USE_OPENSSL_ENGINE) && defined(ENGINE_CTRL_GET_CMD_FROM_NAME)
- {
-+ /* Implicitly use pkcs11 engine if none was provided and the
-+ * cert_file is a PKCS#11 URI */
-+ if(!data->state.engine) {
-+ if(is_pkcs11_uri(cert_file)) {
-+ if(Curl_ossl_set_engine(data, "pkcs11") != CURLE_OK) {
-+ return 0;
-+ }
-+ }
-+ }
-+
- if(data->state.engine) {
- const char *cmd_name = "LOAD_CERT_CTRL";
- struct {
-@@ -798,6 +825,17 @@ int cert_stuff(struct connectdata *conn,
- #ifdef USE_OPENSSL_ENGINE
- { /* XXXX still needs some work */
- EVP_PKEY *priv_key = NULL;
-+
-+ /* Implicitly use pkcs11 engine if none was provided and the
-+ * key_file is a PKCS#11 URI */
-+ if(!data->state.engine) {
-+ if(is_pkcs11_uri(key_file)) {
-+ if(Curl_ossl_set_engine(data, "pkcs11") != CURLE_OK) {
-+ return 0;
-+ }
-+ }
-+ }
-+
- if(data->state.engine) {
- UI_METHOD *ui_method =
- UI_create_method((char *)"curl user interface");
-diff --git a/src/tool_getparam.c b/src/tool_getparam.c
-index cc3fcf3..a7bb7f9 100644
---- a/src/tool_getparam.c
-+++ b/src/tool_getparam.c
-@@ -342,7 +342,7 @@ void parse_cert_parameter(const char *cert_parameter,
- * looks like a RFC7512 PKCS#11 URI which can be used as-is.
- * Also if cert_parameter contains no colon nor backslash, this
- * means no passphrase was given and no characters escaped */
-- if(!strncmp(cert_parameter, "pkcs11:", 7) ||
-+ if(curl_strnequal(cert_parameter, "pkcs11:", 7) ||
- !strpbrk(cert_parameter, ":\\")) {
- *certname = strdup(cert_parameter);
- return;
-diff --git a/src/tool_operate.c b/src/tool_operate.c
-index 26fc251..25d450c 100644
---- a/src/tool_operate.c
-+++ b/src/tool_operate.c
-@@ -113,6 +113,19 @@ static bool is_fatal_error(CURLcode code)
- return FALSE;
- }
-
-+/*
-+ * Check if a given string is a PKCS#11 URI
-+ */
-+static bool is_pkcs11_uri(const char *string)
-+{
-+ if(curl_strnequal(string, "pkcs11:", 7)) {
-+ return TRUE;
-+ }
-+ else {
-+ return FALSE;
-+ }
-+}
-+
- #ifdef __VMS
- /*
- * get_vms_file_size does what it takes to get the real size of the file
-@@ -1073,6 +1086,46 @@ static CURLcode operate_do(struct GlobalConfig *global,
- my_setopt_str(curl, CURLOPT_PINNEDPUBLICKEY, config->pinnedpubkey);
-
- if(curlinfo->features & CURL_VERSION_SSL) {
-+ /* Check if config->cert is a PKCS#11 URI and set the
-+ * config->cert_type if necessary */
-+ if(config->cert) {
-+ if(!config->cert_type) {
-+ if(is_pkcs11_uri(config->cert)) {
-+ config->cert_type = strdup("ENG");
-+ }
-+ }
-+ }
-+
-+ /* Check if config->key is a PKCS#11 URI and set the
-+ * config->key_type if necessary */
-+ if(config->key) {
-+ if(!config->key_type) {
-+ if(is_pkcs11_uri(config->key)) {
-+ config->key_type = strdup("ENG");
-+ }
-+ }
-+ }
-+
-+ /* Check if config->proxy_cert is a PKCS#11 URI and set the
-+ * config->proxy_type if necessary */
-+ if(config->proxy_cert) {
-+ if(!config->proxy_cert_type) {
-+ if(is_pkcs11_uri(config->proxy_cert)) {
-+ config->proxy_cert_type = strdup("ENG");
-+ }
-+ }
-+ }
-+
-+ /* Check if config->proxy_key is a PKCS#11 URI and set the
-+ * config->proxy_key_type if necessary */
-+ if(config->proxy_key) {
-+ if(!config->proxy_key_type) {
-+ if(is_pkcs11_uri(config->proxy_key)) {
-+ config->proxy_key_type = strdup("ENG");
-+ }
-+ }
-+ }
-+
- my_setopt_str(curl, CURLOPT_SSLCERT, config->cert);
- my_setopt_str(curl, CURLOPT_PROXY_SSLCERT, config->proxy_cert);
- my_setopt_str(curl, CURLOPT_SSLCERTTYPE, config->cert_type);
-diff --git a/tests/unit/unit1394.c b/tests/unit/unit1394.c
-index 667991d..010f052 100644
---- a/tests/unit/unit1394.c
-+++ b/tests/unit/unit1394.c
-@@ -56,6 +56,9 @@ UNITTEST_START
- "foo:bar\\\\", "foo", "bar\\\\",
- "foo:bar:", "foo", "bar:",
- "foo\\::bar\\:", "foo:", "bar\\:",
-+ "pkcs11:foobar", "pkcs11:foobar", NULL,
-+ "PKCS11:foobar", "PKCS11:foobar", NULL,
-+ "PkCs11:foobar", "PkCs11:foobar", NULL,
- #ifdef WIN32
- "c:\\foo:bar:baz", "c:\\foo", "bar:baz",
- "c:\\foo\\:bar:baz", "c:\\foo:bar", "baz",
---
-2.17.1
-
-
-From 2be42ac65f4c345ed3ddc97917c8ef54e13fcbfd Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Thu, 9 Aug 2018 15:34:22 +0200
-Subject: [PATCH 2/2] docs: add files needed to regenerate curl.1 man page
-
-Bug: https://github.com/curl/curl/pull/2856
----
- docs/cmdline-opts/disallow-username-in-url.d | 7 +++++++
- docs/cmdline-opts/haproxy-protocol.d | 11 +++++++++++
- 2 files changed, 18 insertions(+)
- create mode 100644 docs/cmdline-opts/disallow-username-in-url.d
- create mode 100644 docs/cmdline-opts/haproxy-protocol.d
-
-diff --git a/docs/cmdline-opts/disallow-username-in-url.d b/docs/cmdline-opts/disallow-username-in-url.d
-new file mode 100644
-index 0000000..a7f46ea
---- /dev/null
-+++ b/docs/cmdline-opts/disallow-username-in-url.d
-@@ -0,0 +1,7 @@
-+Long: disallow-username-in-url
-+Help: Disallow username in url
-+Protocols: HTTP
-+Added: 7.61.0
-+See-also: proto
-+---
-+This tells curl to exit if passed a url containing a username.
-diff --git a/docs/cmdline-opts/haproxy-protocol.d b/docs/cmdline-opts/haproxy-protocol.d
-new file mode 100644
-index 0000000..cc41c9c
---- /dev/null
-+++ b/docs/cmdline-opts/haproxy-protocol.d
-@@ -0,0 +1,11 @@
-+Long: haproxy-protocol
-+Help: Send HAProxy PROXY protocol v1 header
-+Protocols: HTTP
-+Added: 7.60.0
-+---
-+Send a HAProxy PROXY protocol v1 header at the beginning of the connection. This
-+is used by some load balancers and reverse proxies to indicate the client's
-+true IP address and port.
-+
-+This option is primarily useful when sending test requests to a service that
-+expects this header.
---
-2.17.1
-
diff --git a/0002-curl-7.61.0-libssh.patch b/0002-curl-7.61.0-libssh.patch
deleted file mode 100644
index 75966b4..0000000
--- a/0002-curl-7.61.0-libssh.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 155d4ffb7d40daf2afa0102f91f810675220ab6e Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Tue, 14 Aug 2018 13:14:49 +0200
-Subject: [PATCH] ssh-libssh: reduce excessive verbose output about pubkey auth
-
-The verbose message "Authentication using SSH public key file" was
-printed each time the ssh_userauth_publickey_auto() was called, which
-meant each time a packet was transferred over network because the API
-operates in non-blocking mode.
-
-This patch makes sure that the verbose message is printed just once
-(when the authentication state is entered by the SSH state machine).
-
-Upstream-commit: 1e843a31a49484aeddf8f358e71392205f5fd6b1
-Signed-off-by: Kamil Dudka
----
- lib/ssh-libssh.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
-index cecf477ac..f40f074b9 100644
---- a/lib/ssh-libssh.c
-+++ b/lib/ssh-libssh.c
-@@ -618,6 +618,7 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
- sshc->auth_methods = ssh_userauth_list(sshc->ssh_session, NULL);
- if(sshc->auth_methods & SSH_AUTH_METHOD_PUBLICKEY) {
- state(conn, SSH_AUTH_PKEY_INIT);
-+ infof(data, "Authentication using SSH public key file\n");
- }
- else if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) {
- state(conn, SSH_AUTH_GSSAPI);
-@@ -670,8 +671,6 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
-
- }
- else {
-- infof(data, "Authentication using SSH public key file\n");
--
- rc = ssh_userauth_publickey_auto(sshc->ssh_session, NULL,
- data->set.ssl.key_passwd);
- if(rc == SSH_AUTH_AGAIN) {
---
-2.17.1
-
-From 4b445519694ab620bd6376066844a7076e8ce4ab Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Tue, 14 Aug 2018 12:47:18 +0200
-Subject: [PATCH] ssh-libssh: fix infinite connect loop on invalid private key
-
-Added test 656 (based on test 604) to verify the fix.
-
-Bug: https://bugzilla.redhat.com/1595135
-
-Closes #2879
-
-Upstream-commit: a4c7911a48dadb4f68ba6b38bb1bf3f061b747f6
-Signed-off-by: Kamil Dudka
----
- lib/ssh-libssh.c | 1 +
- tests/data/Makefile.inc | 2 +-
- tests/data/test656 | 33 +++++++++++++++++++++++++++++++++
- 3 files changed, 35 insertions(+), 1 deletion(-)
- create mode 100644 tests/data/test656
-
-diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
-index f40f074b9..12d618cfe 100644
---- a/lib/ssh-libssh.c
-+++ b/lib/ssh-libssh.c
-@@ -663,6 +663,7 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
- if(rc != SSH_OK) {
- failf(data, "Could not load private key file %s",
- data->set.str[STRING_SSH_PRIVATE_KEY]);
-+ MOVE_TO_ERROR_STATE(CURLE_LOGIN_DENIED);
- break;
- }
-
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
-index 20274b37c..518a5a543 100644
---- a/tests/data/Makefile.inc
-+++ b/tests/data/Makefile.inc
-@@ -83,7 +83,7 @@ test617 test618 test619 test620 test621 test622 test623 test624 test625 \
- test626 test627 test628 test629 test630 test631 test632 test633 test634 \
- test635 test636 test637 test638 test639 test640 test641 test642 \
- test643 test644 test645 test646 test647 test648 test649 test650 test651 \
--test652 test653 test654 test655 \
-+test652 test653 test654 test655 test656 \
- \
- test700 test701 test702 test703 test704 test705 test706 test707 test708 \
- test709 test710 test711 test712 test713 test714 test715 \
-diff --git a/tests/data/test656 b/tests/data/test656
-new file mode 100644
-index 000000000..4107d3d17
---- /dev/null
-+++ b/tests/data/test656
-@@ -0,0 +1,33 @@
-+
-+
-+
-+SFTP
-+FAILURE
-+
-+
-+
-+#
-+# Client-side
-+
-+
-+sftp
-+
-+
-+SFTP retrieval with nonexistent private key file
-+
-+
-+--key DOES_NOT_EXIST --pubkey curl_client_key.pub -u %USER: sftp://%HOSTIP:%SSHPORT%PWD/not-a-valid-file-moooo --insecure --connect-timeout 8
-+
-+
-+
-+#
-+# Verify data after the test has been "shot"
-+
-+
-+disable
-+
-+
-+67
-+
-+
-+
---
-2.17.1
-
diff --git a/0003-curl-7.61.0-tls13-ciphers.patch b/0003-curl-7.61.0-tls13-ciphers.patch
deleted file mode 100644
index a55ca64..0000000
--- a/0003-curl-7.61.0-tls13-ciphers.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 426b00d0587797d79806f9682b058d5c90a0ab79 Mon Sep 17 00:00:00 2001
-From: Jay Satiro
-Date: Fri, 31 Aug 2018 19:46:29 -0400
-Subject: [PATCH 1/2] openssl: Fix setting TLS 1.3 cipher suites
-
-The flag indicating TLS 1.3 cipher support in the OpenSSL backend was
-missing.
-
-Bug: https://github.com/curl/curl/pull/2607#issuecomment-417283187
-Reported-by: Kamil Dudka
-
-Closes #2926
-
-Upstream-commit: 978574b502294ae06eb97d4f590b54ed5d24cd7f
-Signed-off-by: Kamil Dudka
----
- lib/vtls/openssl.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
-index bc46eca..fad4287 100644
---- a/lib/vtls/openssl.c
-+++ b/lib/vtls/openssl.c
-@@ -3804,6 +3804,9 @@ const struct Curl_ssl Curl_ssl_openssl = {
- SSLSUPP_CERTINFO |
- SSLSUPP_PINNEDPUBKEY |
- SSLSUPP_SSL_CTX |
-+#ifdef HAVE_SSL_CTX_SET_CIPHERSUITES
-+ SSLSUPP_TLS13_CIPHERSUITES |
-+#endif
- SSLSUPP_HTTPS_PROXY,
-
- sizeof(struct ssl_backend_data),
---
-2.17.1
-
-
-From 081afa4e2eb5e853833bd87ca43f48ab550fe657 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Mon, 3 Sep 2018 13:04:00 +0200
-Subject: [PATCH 2/2] url, vtls: make CURLOPT{,_PROXY}_TLS13_CIPHERS work
-
-This is a follow-up to PR #2607 and PR #2926.
-
-Closes #2936
-
-Upstream-commit: 52c13d6328ff56b2d2e8313e88cfdfc78acda365
-Signed-off-by: Kamil Dudka
----
- lib/url.c | 4 ++++
- lib/vtls/vtls.c | 5 ++++-
- 2 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/lib/url.c b/lib/url.c
-index 27b2c1e..46898c4 100644
---- a/lib/url.c
-+++ b/lib/url.c
-@@ -4356,6 +4356,10 @@ static CURLcode create_conn(struct Curl_easy *data,
- data->set.str[STRING_SSL_CIPHER_LIST_ORIG];
- data->set.proxy_ssl.primary.cipher_list =
- data->set.str[STRING_SSL_CIPHER_LIST_PROXY];
-+ data->set.ssl.primary.cipher_list13 =
-+ data->set.str[STRING_SSL_CIPHER13_LIST_ORIG];
-+ data->set.proxy_ssl.primary.cipher_list13 =
-+ data->set.str[STRING_SSL_CIPHER13_LIST_PROXY];
-
- data->set.ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE_ORIG];
- data->set.proxy_ssl.CRLfile = data->set.str[STRING_SSL_CRLFILE_PROXY];
-diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
-index bf96518..b61c640 100644
---- a/lib/vtls/vtls.c
-+++ b/lib/vtls/vtls.c
-@@ -96,7 +96,8 @@ Curl_ssl_config_matches(struct ssl_primary_config* data,
- Curl_safe_strcasecompare(data->clientcert, needle->clientcert) &&
- Curl_safe_strcasecompare(data->random_file, needle->random_file) &&
- Curl_safe_strcasecompare(data->egdsocket, needle->egdsocket) &&
-- Curl_safe_strcasecompare(data->cipher_list, needle->cipher_list))
-+ Curl_safe_strcasecompare(data->cipher_list, needle->cipher_list) &&
-+ Curl_safe_strcasecompare(data->cipher_list13, needle->cipher_list13))
- return TRUE;
-
- return FALSE;
-@@ -119,6 +120,7 @@ Curl_clone_primary_ssl_config(struct ssl_primary_config *source,
- CLONE_STRING(random_file);
- CLONE_STRING(egdsocket);
- CLONE_STRING(cipher_list);
-+ CLONE_STRING(cipher_list13);
-
- return TRUE;
- }
-@@ -131,6 +133,7 @@ void Curl_free_primary_ssl_config(struct ssl_primary_config* sslc)
- Curl_safefree(sslc->random_file);
- Curl_safefree(sslc->egdsocket);
- Curl_safefree(sslc->cipher_list);
-+ Curl_safefree(sslc->cipher_list13);
- }
-
- #ifdef USE_SSL
---
-2.17.1
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 5fb54b6..bbb253f 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16409,18 +16409,11 @@ $as_echo "yes" >&6; }
+@@ -16414,18 +16414,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/0103-curl-7.59.0-python3.patch b/0103-curl-7.59.0-python3.patch
index dd10986..f66b6c0 100644
--- a/0103-curl-7.59.0-python3.patch
+++ b/0103-curl-7.59.0-python3.patch
@@ -32,7 +32,7 @@ diff --git a/tests/runtests.pl b/tests/runtests.pl
index d6aa5ca..4d395ef 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
-@@ -1438,7 +1438,7 @@ sub runhttpserver {
+@@ -1439,7 +1439,7 @@ sub runhttpserver {
elsif($alt eq "pipe") {
# basically the same, but another ID
$idnum = 3;
diff --git a/curl-7.61.0.tar.xz.asc b/curl-7.61.0.tar.xz.asc
deleted file mode 100644
index 024ef39..0000000
--- a/curl-7.61.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAltFnUIACgkQXMkI/bce
-EsJSSggAo2pO9DacErY/wVqYm2KA76s8HDMyGkvb7HXPWe3w1Nj6nwCY8Knbp2C6
-s6LZ73gqKfe3K+kFsFE6bFy9l2MKNs64cBG19dNUGcoYek6zt1BBXC6LT8/eOWc4
-l6HKift+CBh6ErtInB2CzmoG7dvNoZA00sERJbj9w+QZK4CTBZPWjz9BRHo7V31q
-VnciTRgJ39HjL0kupdDIZgpCL741aWlkbOZu5wsRfe7nxWeiCdyOVluXluDi9t2i
-s1mTPMpkMWDIEh723QL5jOlct9/hTLXAS2yZeR6qJafcicyIboXh0ZwGQGonHADi
-aBs922AWx3v8x18thsCMQZwJSHiYEw==
-=7p0n
------END PGP SIGNATURE-----
diff --git a/curl-7.61.1.tar.xz.asc b/curl-7.61.1.tar.xz.asc
new file mode 100644
index 0000000..6a1e664
--- /dev/null
+++ b/curl-7.61.1.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAluPblgACgkQXMkI/bce
+EsJynAgArST/gB9eVYIQTTAdXxCOSnArBK/Ne/UNW83QIgOawj0HvEpj9+1SNfTi
+EwC5YSwymyMuKGTDLNswTnJ0MripRKylekfu1QGGzmIOkqovTiHz60xiFuWYI3vy
+fYuAAse5MJz64GCVFwOM4me8SgEjtb/hIbhiCLqilOyXnqtocDm4FPCMAYQ1mTFy
+RJBbwgDLwtktfBDCQyMXTeETGuk3bTrtvSwRv8+Rq8qehOt5s58Fqeztv8EVNi+B
+Qzsi5NXMulgl3C0P3dN/cC81+OL75ehuE91AFXUmbNOnlYNTOxHR2dioaXaEyhKb
+51KLH2D0G75wlfMbgMhX/rguuXT2rg==
+=vM6i
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index dbd4d40..d4edfd9 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,19 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.61.0
-Release: 8%{?dist}
+Version: 7.61.1
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# ssl: set engine implicitly when a PKCS#11 URI is provided (#1219544)
-Patch1: 0001-curl-7.61.0-pkcs11.patch
-
-# scp/sftp: fix infinite connect loop on invalid private key (#1595135)
-Patch2: 0002-curl-7.61.0-libssh.patch
-
-# make the --tls13-ciphers option work
-Patch3: 0003-curl-7.61.0-tls13-ciphers.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -167,9 +158,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
# Fedora patches
%patch101 -p1
@@ -337,6 +325,10 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Sep 05 2018 Kamil Dudka - 7.61.1-1
+- new upstream release, which fixes the following vulnerability
+ CVE-2018-14618 - NTLM password overflow via integer overflow
+
* Tue Sep 04 2018 Kamil Dudka - 7.61.0-8
- make the --tls13-ciphers option work
diff --git a/sources b/sources
index 4248e66..717a22e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.61.0.tar.xz) = 1b450bbd794460fea12374a49739a49a43c3651038dc092c277769bab09a62627f8eedfa94b5c1610503bf20eeaf60643a1e32fdcf1bcf8d4085090c4a598b13
+SHA512 (curl-7.61.1.tar.xz) = e6f82a7292c70841162480c8880d25046bcfa64058f4ff76f7d398c85da569af1c244442c9c58a3478d59264365ff8e39eed2fb564cb137118588f7862e64e9a
From ece57c4aa470860579c18e7181321cbe894a55a1 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 4 Oct 2018 15:37:53 +0200
Subject: [PATCH 038/260] Related: #1622594 - drop
0105-curl-7.61.0-tests-ssh-keygen.patch no longer needed
---
0105-curl-7.61.0-tests-ssh-keygen.patch | 33 -------------------------
curl.spec | 9 +++----
2 files changed, 4 insertions(+), 38 deletions(-)
delete mode 100644 0105-curl-7.61.0-tests-ssh-keygen.patch
diff --git a/0105-curl-7.61.0-tests-ssh-keygen.patch b/0105-curl-7.61.0-tests-ssh-keygen.patch
deleted file mode 100644
index b8b9ffb..0000000
--- a/0105-curl-7.61.0-tests-ssh-keygen.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From daded1aff280104d16e405fcd1be1a857c74b191 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Mon, 27 Aug 2018 15:53:35 +0200
-Subject: [PATCH] tests: make ssh-keygen always produce PEM format
-
-The default format produced by openssh-7.8p1 cannot be consumed
-by currently available versions of libssh and libssh2.
----
- tests/sshserver.pl | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tests/sshserver.pl b/tests/sshserver.pl
-index 9b3d122..d477a02 100755
---- a/tests/sshserver.pl
-+++ b/tests/sshserver.pl
-@@ -372,12 +372,12 @@ if((! -e $hstprvkeyf) || (! -s $hstprvkeyf) ||
- # Make sure all files are gone so ssh-keygen doesn't complain
- unlink($hstprvkeyf, $hstpubkeyf, $cliprvkeyf, $clipubkeyf);
- logmsg 'generating host keys...' if($verbose);
-- if(system "\"$sshkeygen\" -q -t rsa -f $hstprvkeyf -C 'curl test server' -N ''") {
-+ if(system "\"$sshkeygen\" -q -t rsa -f $hstprvkeyf -C 'curl test server' -N '' -m PEM") {
- logmsg 'Could not generate host key';
- exit 1;
- }
- logmsg 'generating client keys...' if($verbose);
-- if(system "\"$sshkeygen\" -q -t rsa -f $cliprvkeyf -C 'curl test client' -N ''") {
-+ if(system "\"$sshkeygen\" -q -t rsa -f $cliprvkeyf -C 'curl test client' -N '' -m PEM") {
- logmsg 'Could not generate client key';
- exit 1;
- }
---
-2.17.1
-
diff --git a/curl.spec b/curl.spec
index d4edfd9..93e2d57 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.61.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -17,9 +17,6 @@ Patch103: 0103-curl-7.59.0-python3.patch
# use localhost6 instead of ip6-localhost in the curl test-suite
Patch104: 0104-curl-7.19.7-localhost6.patch
-# tests: make ssh-keygen always produce PEM format (#1622594)
-Patch105: 0105-curl-7.61.0-tests-ssh-keygen.patch
-
Provides: curl-full = %{version}-%{release}
Provides: webclient
URL: https://curl.haxx.se/
@@ -164,7 +161,6 @@ be installed.
%patch102 -p1
%patch103 -p1
%patch104 -p1
-%patch105 -p1
# make tests/*.py use Python 3
sed -e '1 s|^#!/.*python|#!%{__python3}|' -i tests/*.py
@@ -325,6 +321,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu Oct 04 2018 Kamil Dudka - 7.61.1-2
+- drop 0105-curl-7.61.0-tests-ssh-keygen.patch no longer needed (#1622594)
+
* Wed Sep 05 2018 Kamil Dudka - 7.61.1-1
- new upstream release, which fixes the following vulnerability
CVE-2018-14618 - NTLM password overflow via integer overflow
From 84125cbefe7feae53efed8b177e41106c7ed7262 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 4 Oct 2018 15:40:31 +0200
Subject: [PATCH 039/260] test320: update expected output for gnutls-3.6.4
---
0001-curl-7.61.1-test320-gnutls.patch | 63 +++++++++++++++++++++++++++
curl.spec | 5 +++
2 files changed, 68 insertions(+)
create mode 100644 0001-curl-7.61.1-test320-gnutls.patch
diff --git a/0001-curl-7.61.1-test320-gnutls.patch b/0001-curl-7.61.1-test320-gnutls.patch
new file mode 100644
index 0000000..a9cbaac
--- /dev/null
+++ b/0001-curl-7.61.1-test320-gnutls.patch
@@ -0,0 +1,63 @@
+From 3cd5b375e31fb98e4782dc3a77e7316ad9eb26cf Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Thu, 4 Oct 2018 15:34:13 +0200
+Subject: [PATCH] test320: strip out more HTML when comparing
+
+To make the test case work with different gnutls-serv versions better.
+
+Reported-by: Kamil Dudka
+Fixes #3093
+Closes #3094
+
+Upstream-commit: 94ad57b0246b5658c2a9139dbe6a80efa4c4e2f3
+Signed-off-by: Kamil Dudka
+---
+ tests/data/test320 | 24 ++++--------------------
+ 1 file changed, 4 insertions(+), 20 deletions(-)
+
+diff --git a/tests/data/test320 b/tests/data/test320
+index 457a11eb2..87311d4f2 100644
+--- a/tests/data/test320
++++ b/tests/data/test320
+@@ -62,34 +62,18 @@ simple TLS-SRP HTTPS GET, check user in response
+ HTTP/1.0 200 OK
+ Content-type: text/html
+
+-
+-
+-
+-
+-
+-
+-If your browser supports session resuming, then you should see the same session ID, when you press the reload button.
+-Connected as user 'jsmith'.
+-
+-
|
+-| Key Exchange: | SRP |
+-| Compression | NULL |
+-| Cipher | AES-NNN-CBC |
+-| MAC | SHA1 |
+-| Ciphersuite | SRP_SHA_AES_NNN_CBC_SHA1 |
+-
Your HTTP header was:
Host: %HOSTIP:%HTTPTLSPORT
++FINE
+ User-Agent: curl-test-suite
+ Accept: */*
+
+-
+-
+-
+
+
+-s/^Session ID:.*//
++s/^
Connected as user 'jsmith'.*/FINE/
+ s/Protocol version:.*[0-9]//
+ s/GNUTLS/GnuTLS/
+ s/(AES[-_])\d\d\d([-_]CBC)/$1NNN$2/
++s/^<.*\n//
++s/^\n//
+
+
+
+--
+2.17.1
+
diff --git a/curl.spec b/curl.spec
index 93e2d57..61b9341 100644
--- a/curl.spec
+++ b/curl.spec
@@ -5,6 +5,9 @@ Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# test320: update expected output for gnutls-3.6.4
+Patch1: 0001-curl-7.61.1-test320-gnutls.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -155,6 +158,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -322,6 +326,7 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%changelog
* Thu Oct 04 2018 Kamil Dudka - 7.61.1-2
+- test320: update expected output for gnutls-3.6.4
- drop 0105-curl-7.61.0-tests-ssh-keygen.patch no longer needed (#1622594)
* Wed Sep 05 2018 Kamil Dudka - 7.61.1-1
From 800bb58ef3610df46777baebf996060460cbbb0c Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Fri, 5 Oct 2018 13:59:35 +0200
Subject: [PATCH 040/260] Resolves: #1631804 - enforce versioned libpsl
dependency for libcurl
---
curl.spec | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/curl.spec b/curl.spec
index 61b9341..f057d54 100644
--- a/curl.spec
+++ b/curl.spec
@@ -79,6 +79,10 @@ BuildRequires: valgrind
# using an older version of libcurl could result in CURLE_UNKNOWN_OPTION
Requires: libcurl%{?_isa} >= %{version}-%{release}
+# require at least the version of libpsl that we were built against,
+# to ensure that we have the necessary symbols available (#1631804)
+%global libpsl_version %(pkg-config --modversion libpsl 2>/dev/null || echo 0)
+
# require at least the version of libssh that we were built against,
# to ensure that we have the necessary symbols available (#525002, #642796)
%global libssh_version %(pkg-config --modversion libssh 2>/dev/null || echo 0)
@@ -97,6 +101,7 @@ resume, proxy tunneling and a busload of other useful tricks.
%package -n libcurl
Summary: A library for getting files from web servers
+Requires: libpsl%{?_isa} >= %{libpsl_version}
Requires: libssh%{?_isa} >= %{libssh_version}
Requires: openssl-libs%{?_isa} >= 1:%{openssl_version}
Provides: libcurl-full = %{version}-%{release}
@@ -326,6 +331,7 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%changelog
* Thu Oct 04 2018 Kamil Dudka - 7.61.1-2
+- enforce versioned libpsl dependency for libcurl (#1631804)
- test320: update expected output for gnutls-3.6.4
- drop 0105-curl-7.61.0-tests-ssh-keygen.patch no longer needed (#1622594)
From 2346b66a23a6369c284f5b649aa5af42ad7960a7 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 8 Oct 2018 13:45:20 +0200
Subject: [PATCH 041/260] update the documentation of --tlsv1.0 in curl(1) man
page
---
0002-curl-7.61.1-tlsv1.0-man.patch | 28 ++++++++++++++++++++++++++++
curl.spec | 12 +++++++++++-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 0002-curl-7.61.1-tlsv1.0-man.patch
diff --git a/0002-curl-7.61.1-tlsv1.0-man.patch b/0002-curl-7.61.1-tlsv1.0-man.patch
new file mode 100644
index 0000000..f384366
--- /dev/null
+++ b/0002-curl-7.61.1-tlsv1.0-man.patch
@@ -0,0 +1,28 @@
+From c574e05b0035f0d78e6bf6040d3f80430112ab4f Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Fri, 7 Sep 2018 16:50:45 +0200
+Subject: [PATCH] docs/cmdline-opts: update the documentation of --tlsv1.0
+
+... to reflect the changes in 6015cefb1b2cfde4b4850121c42405275e5e77d9
+
+Closes #2955
+
+Upstream-commit: 9ba22ce6b52751ed1e2abdd177b0a1d241819b4e
+Signed-off-by: Kamil Dudka
+---
+ docs/cmdline-opts/tlsv1.0.d | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/docs/cmdline-opts/tlsv1.0.d b/docs/cmdline-opts/tlsv1.0.d
+index 8789025e0..54e259682 100644
+--- a/docs/cmdline-opts/tlsv1.0.d
++++ b/docs/cmdline-opts/tlsv1.0.d
+@@ -3,4 +3,4 @@ Help: Use TLSv1.0
+ Protocols: TLS
+ Added: 7.34.0
+ ---
+-Forces curl to use TLS version 1.0 when connecting to a remote TLS server.
++Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server.
+--
+2.17.1
+
diff --git a/curl.spec b/curl.spec
index f057d54..946836a 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,16 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.61.1
-Release: 2%{?dist}
+Release: 3%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
# test320: update expected output for gnutls-3.6.4
Patch1: 0001-curl-7.61.1-test320-gnutls.patch
+# update the documentation of --tlsv1.0 in curl(1) man page
+Patch2: 0002-curl-7.61.1-tlsv1.0-man.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -45,6 +48,9 @@ BuildRequires: sed
BuildRequires: stunnel
BuildRequires: zlib-devel
+# needed to compress content of tool_hugehelp.c after changing curl.1 man page
+BuildRequires: perl(IO::Compress::Gzip)
+
# gnutls-serv is used by the upstream test-suite
BuildRequires: gnutls-utils
@@ -164,6 +170,7 @@ be installed.
# upstream patches
%patch1 -p1
+%patch2 -p1
# Fedora patches
%patch101 -p1
@@ -330,6 +337,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu Oct 11 2018 Kamil Dudka - 7.61.1-3
+- update the documentation of --tlsv1.0 in curl(1) man page
+
* Thu Oct 04 2018 Kamil Dudka - 7.61.1-2
- enforce versioned libpsl dependency for libcurl (#1631804)
- test320: update expected output for gnutls-3.6.4
From 9be316eea198f1bf9647692c3386f90325104192 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 11 Oct 2018 16:06:50 +0200
Subject: [PATCH 042/260] enable TLS 1.3 post-handshake auth in OpenSSL
Bug: https://github.com/curl/curl/pull/3027
---
0003-curl-7.61.1-TLS-1.3-PHA.patch | 46 ++++++++++++++++++++++++++++++
curl.spec | 5 ++++
2 files changed, 51 insertions(+)
create mode 100644 0003-curl-7.61.1-TLS-1.3-PHA.patch
diff --git a/0003-curl-7.61.1-TLS-1.3-PHA.patch b/0003-curl-7.61.1-TLS-1.3-PHA.patch
new file mode 100644
index 0000000..99273ac
--- /dev/null
+++ b/0003-curl-7.61.1-TLS-1.3-PHA.patch
@@ -0,0 +1,46 @@
+From bb8ad3da3fb4ab3f6556daa1f67b259c12a3c7de Mon Sep 17 00:00:00 2001
+From: Christian Heimes
+Date: Fri, 21 Sep 2018 10:37:43 +0200
+Subject: [PATCH] OpenSSL: enable TLS 1.3 post-handshake auth
+
+OpenSSL 1.1.1 requires clients to opt-in for post-handshake
+authentication.
+
+Fixes: https://github.com/curl/curl/issues/3026
+Signed-off-by: Christian Heimes
+
+Closes https://github.com/curl/curl/pull/3027
+
+Upstream-commit: b939bc47b27cd57c6ebb852ad653933e4124b452
+Signed-off-by: Kamil Dudka
+---
+ lib/vtls/openssl.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
+index a487f55..78970d1 100644
+--- a/lib/vtls/openssl.c
++++ b/lib/vtls/openssl.c
+@@ -178,6 +178,7 @@ static unsigned long OpenSSL_version_num(void)
+ !defined(LIBRESSL_VERSION_NUMBER) && \
+ !defined(OPENSSL_IS_BORINGSSL))
+ #define HAVE_SSL_CTX_SET_CIPHERSUITES
++#define HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
+ #endif
+
+ #if defined(LIBRESSL_VERSION_NUMBER)
+@@ -2467,6 +2468,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
+ }
+ #endif
+
++#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
++ /* OpenSSL 1.1.1 requires clients to opt-in for PHA */
++ SSL_CTX_set_post_handshake_auth(BACKEND->ctx, 1);
++#endif
++
+ #ifdef USE_TLS_SRP
+ if(ssl_authtype == CURL_TLSAUTH_SRP) {
+ char * const ssl_username = SSL_SET_OPTION(username);
+--
+2.17.1
+
diff --git a/curl.spec b/curl.spec
index 946836a..d3366ac 100644
--- a/curl.spec
+++ b/curl.spec
@@ -11,6 +11,9 @@ Patch1: 0001-curl-7.61.1-test320-gnutls.patch
# update the documentation of --tlsv1.0 in curl(1) man page
Patch2: 0002-curl-7.61.1-tlsv1.0-man.patch
+# enable TLS 1.3 post-handshake auth in OpenSSL
+Patch3: 0003-curl-7.61.1-TLS-1.3-PHA.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -171,6 +174,7 @@ be installed.
# upstream patches
%patch1 -p1
%patch2 -p1
+%patch3 -p1
# Fedora patches
%patch101 -p1
@@ -338,6 +342,7 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%changelog
* Thu Oct 11 2018 Kamil Dudka - 7.61.1-3
+- enable TLS 1.3 post-handshake auth in OpenSSL
- update the documentation of --tlsv1.0 in curl(1) man page
* Thu Oct 04 2018 Kamil Dudka - 7.61.1-2
From 34a4d8f84827412e621e7a424df1a2341ec0c292 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 31 Oct 2018 10:49:24 +0100
Subject: [PATCH 043/260] new upstream release - 7.62.0
Resolves: CVE-2018-16839 - SASL password overflow via integer overflow
Resolves: CVE-2018-16840 - use-after-free in handle close
Resolves: CVE-2018-16842 - warning message out-of-buffer read
---
0001-curl-7.61.1-test320-gnutls.patch | 63 ------------------
0002-curl-7.61.1-tlsv1.0-man.patch | 28 --------
0003-curl-7.61.1-TLS-1.3-PHA.patch | 46 -------------
0101-curl-7.32.0-multilib.patch | 2 +-
0102-curl-7.36.0-debug.patch | 2 +-
0103-curl-7.59.0-python3.patch | 93 ++-------------------------
curl-7.61.1.tar.xz.asc | 11 ----
curl-7.62.0.tar.xz.asc | 11 ++++
curl.spec | 22 +++----
sources | 2 +-
10 files changed, 27 insertions(+), 253 deletions(-)
delete mode 100644 0001-curl-7.61.1-test320-gnutls.patch
delete mode 100644 0002-curl-7.61.1-tlsv1.0-man.patch
delete mode 100644 0003-curl-7.61.1-TLS-1.3-PHA.patch
delete mode 100644 curl-7.61.1.tar.xz.asc
create mode 100644 curl-7.62.0.tar.xz.asc
diff --git a/0001-curl-7.61.1-test320-gnutls.patch b/0001-curl-7.61.1-test320-gnutls.patch
deleted file mode 100644
index a9cbaac..0000000
--- a/0001-curl-7.61.1-test320-gnutls.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 3cd5b375e31fb98e4782dc3a77e7316ad9eb26cf Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Thu, 4 Oct 2018 15:34:13 +0200
-Subject: [PATCH] test320: strip out more HTML when comparing
-
-To make the test case work with different gnutls-serv versions better.
-
-Reported-by: Kamil Dudka
-Fixes #3093
-Closes #3094
-
-Upstream-commit: 94ad57b0246b5658c2a9139dbe6a80efa4c4e2f3
-Signed-off-by: Kamil Dudka
----
- tests/data/test320 | 24 ++++--------------------
- 1 file changed, 4 insertions(+), 20 deletions(-)
-
-diff --git a/tests/data/test320 b/tests/data/test320
-index 457a11eb2..87311d4f2 100644
---- a/tests/data/test320
-+++ b/tests/data/test320
-@@ -62,34 +62,18 @@ simple TLS-SRP HTTPS GET, check user in response
- HTTP/1.0 200 OK
- Content-type: text/html
-
--
--
--
--
--
--
--If your browser supports session resuming, then you should see the same session ID, when you press the reload button.
--Connected as user 'jsmith'.
--
--
|
--| Key Exchange: | SRP |
--| Compression | NULL |
--| Cipher | AES-NNN-CBC |
--| MAC | SHA1 |
--| Ciphersuite | SRP_SHA_AES_NNN_CBC_SHA1 |
--
Your HTTP header was:
Host: %HOSTIP:%HTTPTLSPORT
-+FINE
- User-Agent: curl-test-suite
- Accept: */*
-
--
--
--
-
-
--s/^Session ID:.*//
-+s/^
Connected as user 'jsmith'.*/FINE/
- s/Protocol version:.*[0-9]//
- s/GNUTLS/GnuTLS/
- s/(AES[-_])\d\d\d([-_]CBC)/$1NNN$2/
-+s/^<.*\n//
-+s/^\n//
-
-
-
---
-2.17.1
-
diff --git a/0002-curl-7.61.1-tlsv1.0-man.patch b/0002-curl-7.61.1-tlsv1.0-man.patch
deleted file mode 100644
index f384366..0000000
--- a/0002-curl-7.61.1-tlsv1.0-man.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c574e05b0035f0d78e6bf6040d3f80430112ab4f Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Fri, 7 Sep 2018 16:50:45 +0200
-Subject: [PATCH] docs/cmdline-opts: update the documentation of --tlsv1.0
-
-... to reflect the changes in 6015cefb1b2cfde4b4850121c42405275e5e77d9
-
-Closes #2955
-
-Upstream-commit: 9ba22ce6b52751ed1e2abdd177b0a1d241819b4e
-Signed-off-by: Kamil Dudka
----
- docs/cmdline-opts/tlsv1.0.d | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/docs/cmdline-opts/tlsv1.0.d b/docs/cmdline-opts/tlsv1.0.d
-index 8789025e0..54e259682 100644
---- a/docs/cmdline-opts/tlsv1.0.d
-+++ b/docs/cmdline-opts/tlsv1.0.d
-@@ -3,4 +3,4 @@ Help: Use TLSv1.0
- Protocols: TLS
- Added: 7.34.0
- ---
--Forces curl to use TLS version 1.0 when connecting to a remote TLS server.
-+Forces curl to use TLS version 1.0 or later when connecting to a remote TLS server.
---
-2.17.1
-
diff --git a/0003-curl-7.61.1-TLS-1.3-PHA.patch b/0003-curl-7.61.1-TLS-1.3-PHA.patch
deleted file mode 100644
index 99273ac..0000000
--- a/0003-curl-7.61.1-TLS-1.3-PHA.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From bb8ad3da3fb4ab3f6556daa1f67b259c12a3c7de Mon Sep 17 00:00:00 2001
-From: Christian Heimes
-Date: Fri, 21 Sep 2018 10:37:43 +0200
-Subject: [PATCH] OpenSSL: enable TLS 1.3 post-handshake auth
-
-OpenSSL 1.1.1 requires clients to opt-in for post-handshake
-authentication.
-
-Fixes: https://github.com/curl/curl/issues/3026
-Signed-off-by: Christian Heimes
-
-Closes https://github.com/curl/curl/pull/3027
-
-Upstream-commit: b939bc47b27cd57c6ebb852ad653933e4124b452
-Signed-off-by: Kamil Dudka
----
- lib/vtls/openssl.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
-index a487f55..78970d1 100644
---- a/lib/vtls/openssl.c
-+++ b/lib/vtls/openssl.c
-@@ -178,6 +178,7 @@ static unsigned long OpenSSL_version_num(void)
- !defined(LIBRESSL_VERSION_NUMBER) && \
- !defined(OPENSSL_IS_BORINGSSL))
- #define HAVE_SSL_CTX_SET_CIPHERSUITES
-+#define HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
- #endif
-
- #if defined(LIBRESSL_VERSION_NUMBER)
-@@ -2467,6 +2468,11 @@ static CURLcode ossl_connect_step1(struct connectdata *conn, int sockindex)
- }
- #endif
-
-+#ifdef HAVE_SSL_CTX_SET_POST_HANDSHAKE_AUTH
-+ /* OpenSSL 1.1.1 requires clients to opt-in for PHA */
-+ SSL_CTX_set_post_handshake_auth(BACKEND->ctx, 1);
-+#endif
-+
- #ifdef USE_TLS_SRP
- if(ssl_authtype == CURL_TLSAUTH_SRP) {
- char * const ssl_username = SSL_SET_OPTION(username);
---
-2.17.1
-
diff --git a/0101-curl-7.32.0-multilib.patch b/0101-curl-7.32.0-multilib.patch
index 532980e..613106d 100644
--- a/0101-curl-7.32.0-multilib.patch
+++ b/0101-curl-7.32.0-multilib.patch
@@ -22,7 +22,7 @@ index 150004d..95d0759 100644
;;
--prefix)
-@@ -143,32 +143,17 @@ while test $# -gt 0; do
+@@ -155,32 +155,17 @@ while test $# -gt 0; do
;;
--libs)
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index bbb253f..495fe63 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16414,18 +16414,11 @@ $as_echo "yes" >&6; }
+@@ -16421,18 +16421,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/0103-curl-7.59.0-python3.patch b/0103-curl-7.59.0-python3.patch
index f66b6c0..56485fe 100644
--- a/0103-curl-7.59.0-python3.patch
+++ b/0103-curl-7.59.0-python3.patch
@@ -1,88 +1,23 @@
-From bdba7b54224814055185513de1e7ff6619031553 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Thu, 15 Mar 2018 13:21:40 +0100
-Subject: [PATCH 1/2] tests/http_pipe.py: migrate to Python 3
-
----
- tests/http_pipe.py | 4 ++--
- tests/runtests.pl | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/tests/http_pipe.py b/tests/http_pipe.py
-index bc32173..75ac165 100755
---- a/tests/http_pipe.py
-+++ b/tests/http_pipe.py
-@@ -383,13 +383,13 @@ class PipelineRequestHandler(socketserver.BaseRequestHandler):
- self.request.setblocking(True)
- if not new_data:
- return
-- new_requests = self._request_parser.ParseAdditionalData(new_data)
-+ new_requests = self._request_parser.ParseAdditionalData(new_data.decode('utf8'))
- self._response_builder.QueueRequests(
- new_requests, self._request_parser.were_all_requests_http_1_1)
- self._num_queued += len(new_requests)
- self._last_queued_time = time.time()
- elif fileno in wlist:
-- num_bytes_sent = self.request.send(self._send_buffer[0:4096])
-+ num_bytes_sent = self.request.send(self._send_buffer[0:4096].encode('utf8'))
- self._send_buffer = self._send_buffer[num_bytes_sent:]
- time.sleep(0.05)
-
-diff --git a/tests/runtests.pl b/tests/runtests.pl
-index d6aa5ca..4d395ef 100755
---- a/tests/runtests.pl
-+++ b/tests/runtests.pl
-@@ -1439,7 +1439,7 @@ sub runhttpserver {
- elsif($alt eq "pipe") {
- # basically the same, but another ID
- $idnum = 3;
-- $exe = "python $srcdir/http_pipe.py";
-+ $exe = "python3 $srcdir/http_pipe.py";
- $verbose_flag .= "1 ";
- }
- elsif($alt eq "unix") {
---
-2.14.3
-
-
From 3c4c7340e455b7256c0786759422f34ec3e2d440 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 15 Mar 2018 14:49:56 +0100
-Subject: [PATCH 2/2] tests/{negtelnet,smb}server.py: migrate to Python 3
+Subject: [PATCH] tests/{negtelnet,smb}server.py: migrate to Python 3
Unfortunately, smbserver.py does not work with Python 3 because
there is no 'impacket' module available for Python 3:
https://github.com/CoreSecurity/impacket/issues/61
---
- tests/negtelnetserver.py | 12 ++++++------
- tests/smbserver.py | 4 ++--
- 2 files changed, 8 insertions(+), 8 deletions(-)
+ tests/negtelnetserver.py | 4 ++--
+ tests/smbserver.py | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/negtelnetserver.py b/tests/negtelnetserver.py
index 8cfd409..72ee771 100755
--- a/tests/negtelnetserver.py
+++ b/tests/negtelnetserver.py
-@@ -23,7 +23,7 @@ IDENT = "NTEL"
-
- # The strings that indicate the test framework is checking our aliveness
- VERIFIED_REQ = b"verifiedserver"
--VERIFIED_RSP = b"WE ROOLZ: {pid}"
-+VERIFIED_RSP = "WE ROOLZ: {pid}"
-
-
- def telnetserver(options):
-@@ -34,7 +34,7 @@ def telnetserver(options):
- if options.pidfile:
- pid = os.getpid()
- with open(options.pidfile, "w") as f:
-- f.write(b"{0}".format(pid))
-+ f.write("{0}".format(pid))
-
- local_bind = (HOST, options.port)
- log.info("Listening on %s", local_bind)
@@ -73,11 +73,11 @@ class NegotiatingTelnetHandler(socketserver.BaseRequestHandler):
- response_data = VERIFIED_RSP.format(pid=os.getpid())
+ response_data = response.encode('ascii')
else:
log.debug("Received normal request - echoing back")
- response_data = data.strip()
@@ -95,24 +30,6 @@ index 8cfd409..72ee771 100755
except IOError:
log.exception("IOError hit during request")
-@@ -132,7 +132,7 @@ class Negotiator(object):
- return buffer
-
- def byte_to_int(self, byte):
-- return struct.unpack(b'B', byte)[0]
-+ return int(byte)
-
- def no_neg(self, byte, byte_int, buffer):
- # Not negotiating anything thus far. Check to see if we
-@@ -197,7 +197,7 @@ class Negotiator(object):
- self.tcp.sendall(packed_message)
-
- def pack(self, arr):
-- return struct.pack(b'{0}B'.format(len(arr)), *arr)
-+ return struct.pack('{0}B'.format(len(arr)), *arr)
-
- def send_iac(self, arr):
- message = [NegTokens.IAC]
diff --git a/tests/smbserver.py b/tests/smbserver.py
index 195ae39..b09cd44 100755
--- a/tests/smbserver.py
diff --git a/curl-7.61.1.tar.xz.asc b/curl-7.61.1.tar.xz.asc
deleted file mode 100644
index 6a1e664..0000000
--- a/curl-7.61.1.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAluPblgACgkQXMkI/bce
-EsJynAgArST/gB9eVYIQTTAdXxCOSnArBK/Ne/UNW83QIgOawj0HvEpj9+1SNfTi
-EwC5YSwymyMuKGTDLNswTnJ0MripRKylekfu1QGGzmIOkqovTiHz60xiFuWYI3vy
-fYuAAse5MJz64GCVFwOM4me8SgEjtb/hIbhiCLqilOyXnqtocDm4FPCMAYQ1mTFy
-RJBbwgDLwtktfBDCQyMXTeETGuk3bTrtvSwRv8+Rq8qehOt5s58Fqeztv8EVNi+B
-Qzsi5NXMulgl3C0P3dN/cC81+OL75ehuE91AFXUmbNOnlYNTOxHR2dioaXaEyhKb
-51KLH2D0G75wlfMbgMhX/rguuXT2rg==
-=vM6i
------END PGP SIGNATURE-----
diff --git a/curl-7.62.0.tar.xz.asc b/curl-7.62.0.tar.xz.asc
new file mode 100644
index 0000000..230438a
--- /dev/null
+++ b/curl-7.62.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlvZT5wACgkQXMkI/bce
+EsJG4gf+IY2RkT9d7SIBAanHOD2NeT4UtPAOVRVtpW8dD9TIJq4IKOqv8CpcCCRq
+OZPJovdxM0qmXcrX2Dlf3zpPuY+bSzBW/xUYsKBBTTXhdUh5dv1Tz3HR6JzMHyT4
+hQm1mj6eFHFvayUKxoeQwiw3SkvW6WIlAySwEBzIzaE7icwvJ2dPO7xUOJWLXk/F
+pDRCAuHqIIgNzNph0EKXkvLWz5poBzGaK9kpJxmeaS3aWpe0EZ4+N6ju2GfHK5jO
+VQSuLWDHCZulv1eve+LOxgRjp/5kqQ/PPc3/99mEOxGRUxwCWVMEWGklAungn4bX
+nBPWNGArGJq2+kMP7v5pr0onBz6wxg==
+=CWQL
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index d3366ac..70e148e 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,19 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.61.1
-Release: 3%{?dist}
+Version: 7.62.0
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# test320: update expected output for gnutls-3.6.4
-Patch1: 0001-curl-7.61.1-test320-gnutls.patch
-
-# update the documentation of --tlsv1.0 in curl(1) man page
-Patch2: 0002-curl-7.61.1-tlsv1.0-man.patch
-
-# enable TLS 1.3 post-handshake auth in OpenSSL
-Patch3: 0003-curl-7.61.1-TLS-1.3-PHA.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -172,9 +163,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
# Fedora patches
%patch101 -p1
@@ -341,6 +329,12 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Oct 31 2018 Kamil Dudka - 7.62.0-1
+- new upstream release, which fixes the following vulnerabilities
+ CVE-2018-16839 - SASL password overflow via integer overflow
+ CVE-2018-16840 - use-after-free in handle close
+ CVE-2018-16842 - warning message out-of-buffer read
+
* Thu Oct 11 2018 Kamil Dudka - 7.61.1-3
- enable TLS 1.3 post-handshake auth in OpenSSL
- update the documentation of --tlsv1.0 in curl(1) man page
diff --git a/sources b/sources
index 717a22e..f127541 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.61.1.tar.xz) = e6f82a7292c70841162480c8880d25046bcfa64058f4ff76f7d398c85da569af1c244442c9c58a3478d59264365ff8e39eed2fb564cb137118588f7862e64e9a
+SHA512 (curl-7.62.0.tar.xz) = 3aace2fc85e1d5ac06a3208980f887b5f1de5e2a1460e130b15cff3f7e5700b958cbb8f296483290961ef41f550245590067f86558dbba25e3d3ac10cec1adcd
From a94ce82de00deaf7134abcceb2ff0c94de4e7be3 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 12 Dec 2018 09:45:07 +0100
Subject: [PATCH 044/260] new upstream release - 7.63.0
---
0102-curl-7.36.0-debug.patch | 2 +-
curl-7.62.0.tar.xz.asc | 11 -----------
curl-7.63.0.tar.xz.asc | 11 +++++++++++
curl.spec | 5 ++++-
sources | 2 +-
5 files changed, 17 insertions(+), 14 deletions(-)
delete mode 100644 curl-7.62.0.tar.xz.asc
create mode 100644 curl-7.63.0.tar.xz.asc
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 495fe63..60de5b3 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16421,18 +16421,11 @@ $as_echo "yes" >&6; }
+@@ -16415,18 +16415,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/curl-7.62.0.tar.xz.asc b/curl-7.62.0.tar.xz.asc
deleted file mode 100644
index 230438a..0000000
--- a/curl-7.62.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlvZT5wACgkQXMkI/bce
-EsJG4gf+IY2RkT9d7SIBAanHOD2NeT4UtPAOVRVtpW8dD9TIJq4IKOqv8CpcCCRq
-OZPJovdxM0qmXcrX2Dlf3zpPuY+bSzBW/xUYsKBBTTXhdUh5dv1Tz3HR6JzMHyT4
-hQm1mj6eFHFvayUKxoeQwiw3SkvW6WIlAySwEBzIzaE7icwvJ2dPO7xUOJWLXk/F
-pDRCAuHqIIgNzNph0EKXkvLWz5poBzGaK9kpJxmeaS3aWpe0EZ4+N6ju2GfHK5jO
-VQSuLWDHCZulv1eve+LOxgRjp/5kqQ/PPc3/99mEOxGRUxwCWVMEWGklAungn4bX
-nBPWNGArGJq2+kMP7v5pr0onBz6wxg==
-=CWQL
------END PGP SIGNATURE-----
diff --git a/curl-7.63.0.tar.xz.asc b/curl-7.63.0.tar.xz.asc
new file mode 100644
index 0000000..1dd44ac
--- /dev/null
+++ b/curl-7.63.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlwQtYIACgkQXMkI/bce
+EsKPHgf/RhfKPvl1Q8ftuEOXakF/ZIvINukj49vOMFmfQRHfmGWh5ajaGj0qVF6x
+U5HtrDoFOP5m74tj6jrzr2Ala/HGeyZmiTWwRLMgu+Tvq4djIv2pzZUJpgawJS52
+LCb2DUS2F+E1AsZQYvyliYA+r2FO2RRX1kbwdu+0RyuFy5WmWwkI02VahAIYV48o
+44IqtXshxfSAlfEqQ8MgXtU1KW0SWtfKVP2HpsurugjGyknoXxHP7yoDMgDAkMk0
+fNYyPDZbUXXN+6Oyo4Xh8rz4dpVLBkIoCZb4WG2pFZSrfP2+FTL5/vRo/tUyjFfv
+2LHmDUOOFH3VMwMYlnMCgaaXG7/jtg==
+=TkSP
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 70e148e..b39182e 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,6 +1,6 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.62.0
+Version: 7.63.0
Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -329,6 +329,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Dec 12 2018 Kamil Dudka - 7.63.0-1
+- new upstream release
+
* Wed Oct 31 2018 Kamil Dudka - 7.62.0-1
- new upstream release, which fixes the following vulnerabilities
CVE-2018-16839 - SASL password overflow via integer overflow
diff --git a/sources b/sources
index f127541..c40ff26 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.62.0.tar.xz) = 3aace2fc85e1d5ac06a3208980f887b5f1de5e2a1460e130b15cff3f7e5700b958cbb8f296483290961ef41f550245590067f86558dbba25e3d3ac10cec1adcd
+SHA512 (curl-7.63.0.tar.xz) = c905eb157c6b0093f1b1a506e4782b83af423fd6de1ce0ab5372164a686ef292ffb10d7999d3dec2de602f63ee41b65e1a1008409dd8c959a597644c0ecb395b
From c91c27bce90e913a6fdfd4cb42172496d0e264a8 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 12 Dec 2018 14:39:00 +0100
Subject: [PATCH 045/260] libtest: avoid symbol lookup error in libstubgss.so
---
0105-curl-7.63.0-libstubgss-ldadd.patch | 25 +++++++++++++++++++++++++
curl.spec | 4 ++++
2 files changed, 29 insertions(+)
create mode 100644 0105-curl-7.63.0-libstubgss-ldadd.patch
diff --git a/0105-curl-7.63.0-libstubgss-ldadd.patch b/0105-curl-7.63.0-libstubgss-ldadd.patch
new file mode 100644
index 0000000..e87b05b
--- /dev/null
+++ b/0105-curl-7.63.0-libstubgss-ldadd.patch
@@ -0,0 +1,25 @@
+From d8a3bdce7a43cb777866c34d3dabf908254e516d Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Wed, 12 Dec 2018 14:25:32 +0100
+Subject: [PATCH] libtest: avoid symbol lookup error in libstubgss.so
+
+---
+ tests/libtest/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
+index 56c84a7..117b79f 100644
+--- a/tests/libtest/Makefile.am
++++ b/tests/libtest/Makefile.am
+@@ -123,7 +123,7 @@ libstubgss_la_CFLAGS = $(AM_CFLAGS) -g
+
+ libstubgss_la_SOURCES = stub_gssapi.c stub_gssapi.h
+
+-libstubgss_la_LIBADD =
++libstubgss_la_LIBADD = $(top_builddir)/lib/libcurl.la
+ libstubgss_la_DEPENDENCIES =
+ endif
+
+--
+2.17.2
+
diff --git a/curl.spec b/curl.spec
index b39182e..e77d447 100644
--- a/curl.spec
+++ b/curl.spec
@@ -17,6 +17,9 @@ Patch103: 0103-curl-7.59.0-python3.patch
# use localhost6 instead of ip6-localhost in the curl test-suite
Patch104: 0104-curl-7.19.7-localhost6.patch
+# libtest: avoid symbol lookup error in libstubgss.so
+Patch105: 0105-curl-7.63.0-libstubgss-ldadd.patch
+
Provides: curl-full = %{version}-%{release}
Provides: webclient
URL: https://curl.haxx.se/
@@ -169,6 +172,7 @@ be installed.
%patch102 -p1
%patch103 -p1
%patch104 -p1
+%patch105 -p1
# make tests/*.py use Python 3
sed -e '1 s|^#!/.*python|#!%{__python3}|' -i tests/*.py
From c30a9c7fdb343528c29e503b626dc566fa4deb9e Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Fri, 14 Dec 2018 11:21:54 +0100
Subject: [PATCH 046/260] Resolves: #1659329 - revert an upstream commit that
broke `fedpkg new-sources`
---
0001-curl-7.62.0-http-post-negotiate.patch | 72 ++++++++++++++++++++++
curl.spec | 9 ++-
2 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.62.0-http-post-negotiate.patch
diff --git a/0001-curl-7.62.0-http-post-negotiate.patch b/0001-curl-7.62.0-http-post-negotiate.patch
new file mode 100644
index 0000000..a391183
--- /dev/null
+++ b/0001-curl-7.62.0-http-post-negotiate.patch
@@ -0,0 +1,72 @@
+From be7395e31ae884cfaf87056f400130e3321767b3 Mon Sep 17 00:00:00 2001
+From: Elia Tufarolo
+Date: Tue, 13 Nov 2018 18:30:56 +0100
+Subject: [PATCH] http_negotiate: do not close connection until negotiation is
+ completed
+
+Fix HTTP POST using CURLAUTH_NEGOTIATE.
+
+Closes #3275
+
+Upstream-commit: 07ebaf837843124ee670e5b8c218b80b92e06e47
+Signed-off-by: Kamil Dudka
+---
+ lib/http.c | 1 -
+ lib/http_negotiate.c | 8 ++++++++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/lib/http.c b/lib/http.c
+index 46ac15a6e..afc919b09 100644
+--- a/lib/http.c
++++ b/lib/http.c
+@@ -610,7 +610,6 @@ output_auth_headers(struct connectdata *conn,
+ result = Curl_output_negotiate(conn, proxy);
+ if(result)
+ return result;
+- authstatus->done = TRUE;
+ negdata->state = GSS_AUTHSENT;
+ }
+ else
+diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
+index ddcd65b3b..444265d11 100644
+--- a/lib/http_negotiate.c
++++ b/lib/http_negotiate.c
+@@ -49,6 +49,7 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+
+ /* Point to the correct struct with this */
+ struct negotiatedata *neg_ctx;
++ struct auth *authp;
+
+ if(proxy) {
+ userp = conn->http_proxy.user;
+@@ -57,6 +58,7 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+ data->set.str[STRING_PROXY_SERVICE_NAME] : "HTTP";
+ host = conn->http_proxy.host.name;
+ neg_ctx = &data->state.proxyneg;
++ authp = &conn->data->state.authproxy;
+ }
+ else {
+ userp = conn->user;
+@@ -65,6 +67,7 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+ data->set.str[STRING_SERVICE_NAME] : "HTTP";
+ host = conn->host.name;
+ neg_ctx = &data->state.negotiate;
++ authp = &conn->data->state.authhost;
+ }
+
+ /* Not set means empty */
+@@ -95,6 +98,11 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+
+ if(result)
+ Curl_auth_spnego_cleanup(neg_ctx);
++ else
++ /* If the status is different than 0 and we encountered no errors
++ it means we have to continue. 0 is the OK value for both GSSAPI
++ (GSS_S_COMPLETE) and SSPI (SEC_E_OK) */
++ authp->done = !neg_ctx->status;
+
+ return result;
+ }
+--
+2.20.0
+
diff --git a/curl.spec b/curl.spec
index e77d447..3237389 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.63.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# revert an upstream commit that broke `fedpkg new-sources` (#1659329)
+Patch1: 0001-curl-7.62.0-http-post-negotiate.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -164,6 +167,7 @@ be installed.
%prep
%setup -q
+%patch1 -p1 -R
# upstream patches
@@ -333,6 +337,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Fri Dec 14 2018 Kamil Dudka - 7.63.0-2
+- revert an upstream commit that broke `fedpkg new-sources` (#1659329)
+
* Wed Dec 12 2018 Kamil Dudka - 7.63.0-1
- new upstream release
From 49f5a42f9621baf874c9387c2b6e8d13e8f7868e Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 19 Dec 2018 13:42:58 +0100
Subject: [PATCH 047/260] Resolves: #1658574 - curl -J: do not append to the
destination file
---
0007-curl-7.63.0-JO-preserve-local-file.patch | 115 ++++++++++++++++++
curl.spec | 11 +-
2 files changed, 125 insertions(+), 1 deletion(-)
create mode 100644 0007-curl-7.63.0-JO-preserve-local-file.patch
diff --git a/0007-curl-7.63.0-JO-preserve-local-file.patch b/0007-curl-7.63.0-JO-preserve-local-file.patch
new file mode 100644
index 0000000..12ac53e
--- /dev/null
+++ b/0007-curl-7.63.0-JO-preserve-local-file.patch
@@ -0,0 +1,115 @@
+From ff74657fb645e7175971128a171ef7d5ece40d77 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Mon, 17 Dec 2018 12:51:51 +0100
+Subject: [PATCH] curl -J: do not append to the destination file
+
+Reported-by: Kamil Dudka
+Fixes #3380
+Closes #3381
+
+Upstream-commit: 4849267197682e69cfa056c2bd7a44acd123a917
+Signed-off-by: Kamil Dudka
+---
+ src/tool_cb_hdr.c | 6 +++---
+ src/tool_cb_wrt.c | 9 ++++-----
+ src/tool_cb_wrt.h | 2 +-
+ src/tool_operate.c | 2 +-
+ 4 files changed, 9 insertions(+), 10 deletions(-)
+
+diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
+index 84b0d9c..3844904 100644
+--- a/src/tool_cb_hdr.c
++++ b/src/tool_cb_hdr.c
+@@ -157,12 +157,12 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
+ outs->filename = filename;
+ outs->alloc_filename = TRUE;
+ hdrcbdata->honor_cd_filename = FALSE; /* done now! */
+- if(!tool_create_output_file(outs, TRUE))
++ if(!tool_create_output_file(outs))
+ return failure;
+ }
+ break;
+ }
+- if(!outs->stream && !tool_create_output_file(outs, FALSE))
++ if(!outs->stream && !tool_create_output_file(outs))
+ return failure;
+ }
+
+@@ -172,7 +172,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
+ /* bold headers only for selected protocols */
+ char *value = NULL;
+
+- if(!outs->stream && !tool_create_output_file(outs, FALSE))
++ if(!outs->stream && !tool_create_output_file(outs))
+ return failure;
+
+ if(hdrcbdata->global->isatty && hdrcbdata->global->styled_output)
+diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
+index 2cb5e1b..195d6e7 100644
+--- a/src/tool_cb_wrt.c
++++ b/src/tool_cb_wrt.c
+@@ -32,8 +32,7 @@
+ #include "memdebug.h" /* keep this as LAST include */
+
+ /* create a local file for writing, return TRUE on success */
+-bool tool_create_output_file(struct OutStruct *outs,
+- bool append)
++bool tool_create_output_file(struct OutStruct *outs)
+ {
+ struct GlobalConfig *global = outs->config->global;
+ FILE *file;
+@@ -43,7 +42,7 @@ bool tool_create_output_file(struct OutStruct *outs,
+ return FALSE;
+ }
+
+- if(outs->is_cd_filename && !append) {
++ if(outs->is_cd_filename) {
+ /* don't overwrite existing files */
+ file = fopen(outs->filename, "rb");
+ if(file) {
+@@ -55,7 +54,7 @@ bool tool_create_output_file(struct OutStruct *outs,
+ }
+
+ /* open file for writing */
+- file = fopen(outs->filename, append?"ab":"wb");
++ file = fopen(outs->filename, "wb");
+ if(!file) {
+ warnf(global, "Failed to create the file %s: %s\n", outs->filename,
+ strerror(errno));
+@@ -142,7 +141,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
+ }
+ #endif
+
+- if(!outs->stream && !tool_create_output_file(outs, FALSE))
++ if(!outs->stream && !tool_create_output_file(outs))
+ return failure;
+
+ if(is_tty && (outs->bytes < 2000) && !config->terminal_binary_ok) {
+diff --git a/src/tool_cb_wrt.h b/src/tool_cb_wrt.h
+index 51e002b..188d3ea 100644
+--- a/src/tool_cb_wrt.h
++++ b/src/tool_cb_wrt.h
+@@ -30,6 +30,6 @@
+ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata);
+
+ /* create a local file for writing, return TRUE on success */
+-bool tool_create_output_file(struct OutStruct *outs, bool append);
++bool tool_create_output_file(struct OutStruct *outs);
+
+ #endif /* HEADER_CURL_TOOL_CB_WRT_H */
+diff --git a/src/tool_operate.c b/src/tool_operate.c
+index e53a9d8..429e9cf 100644
+--- a/src/tool_operate.c
++++ b/src/tool_operate.c
+@@ -1583,7 +1583,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
+ /* do not create (or even overwrite) the file in case we get no
+ data because of unmet condition */
+ curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &cond_unmet);
+- if(!cond_unmet && !tool_create_output_file(&outs, FALSE))
++ if(!cond_unmet && !tool_create_output_file(&outs))
+ result = CURLE_WRITE_ERROR;
+ }
+
+--
+2.17.2
+
diff --git a/curl.spec b/curl.spec
index 3237389..aaa75a4 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,16 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.63.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
# revert an upstream commit that broke `fedpkg new-sources` (#1659329)
Patch1: 0001-curl-7.62.0-http-post-negotiate.patch
+# curl -J: do not append to the destination file (#1658574)
+Patch7: 0007-curl-7.63.0-JO-preserve-local-file.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -167,9 +170,12 @@ be installed.
%prep
%setup -q
+
+# upstream patches to revert
%patch1 -p1 -R
# upstream patches
+%patch7 -p1
# Fedora patches
%patch101 -p1
@@ -337,6 +343,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Dec 19 2018 Kamil Dudka - 7.63.0-3
+- curl -J: do not append to the destination file (#1658574)
+
* Fri Dec 14 2018 Kamil Dudka - 7.63.0-2
- revert an upstream commit that broke `fedpkg new-sources` (#1659329)
From 32b0144f200134a2eee3b466e79f9f6488463541 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Fri, 4 Jan 2019 14:18:26 +0100
Subject: [PATCH 048/260] replace 0105-curl-7.63.0-libstubgss-ldadd.patch by
upstream patch
---
...-7.62.0-libtest-stub_gssapi-snprintf.patch | 63 +++++++++++++++++++
0105-curl-7.63.0-libstubgss-ldadd.patch | 25 --------
curl.spec | 13 ++--
3 files changed, 71 insertions(+), 30 deletions(-)
create mode 100644 0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch
delete mode 100644 0105-curl-7.63.0-libstubgss-ldadd.patch
diff --git a/0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch b/0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch
new file mode 100644
index 0000000..22868c4
--- /dev/null
+++ b/0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch
@@ -0,0 +1,63 @@
+From 510ab52ed43589d96f0fab338eb6286940a29a78 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Thu, 3 Jan 2019 12:00:58 +0100
+Subject: [PATCH] libtest/stub_gssapi: use "real" snprintf
+
+... since it doesn't link with libcurl.
+
+Reverts the commit dcd6f81025 changes from this file.
+
+Bug: https://curl.haxx.se/mail/lib-2019-01/0000.html
+Reported-by: Shlomi Fish
+Reviewed-by: Daniel Gustafsson
+Reviewed-by: Kamil Dudka
+
+Closes #3434
+
+Upstream-commit: c7c362a24c0247644f9fde05e8ea353af4a94b04
+Signed-off-by: Kamil Dudka
+---
+ tests/libtest/stub_gssapi.c | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/tests/libtest/stub_gssapi.c b/tests/libtest/stub_gssapi.c
+index 254a01b31..377b75452 100644
+--- a/tests/libtest/stub_gssapi.c
++++ b/tests/libtest/stub_gssapi.c
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 2017-2018, Daniel Stenberg, , et al.
++ * Copyright (C) 2017-2019, Daniel Stenberg, , et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -28,10 +28,7 @@
+
+ #include "stub_gssapi.h"
+
+-#define ENABLE_CURLX_PRINTF
+-/* make the curlx header define all printf() functions to use the curlx_*
+- versions instead */
+-#include "curlx.h" /* from the private lib dir */
++/* !checksrc! disable SNPRINTF all */
+
+ #define MAX_CREDS_LENGTH 250
+ #define APPROX_TOKEN_LEN 250
+@@ -207,8 +204,10 @@ OM_uint32 gss_init_sec_context(OM_uint32 *min,
+ }
+
+ /* Token format: creds:target:type:padding */
+- used = msnprintf(token, length, "%s:%s:%d:", creds,
+- (char *) target_name, ctx->sent);
++ /* Note: this is using the *real* snprintf() and not the curl provided
++ one */
++ used = snprintf(token, length, "%s:%s:%d:", creds,
++ (char *) target_name, ctx->sent);
+
+ if(used >= length) {
+ free(token);
+--
+2.17.2
+
diff --git a/0105-curl-7.63.0-libstubgss-ldadd.patch b/0105-curl-7.63.0-libstubgss-ldadd.patch
deleted file mode 100644
index e87b05b..0000000
--- a/0105-curl-7.63.0-libstubgss-ldadd.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From d8a3bdce7a43cb777866c34d3dabf908254e516d Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Wed, 12 Dec 2018 14:25:32 +0100
-Subject: [PATCH] libtest: avoid symbol lookup error in libstubgss.so
-
----
- tests/libtest/Makefile.am | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
-index 56c84a7..117b79f 100644
---- a/tests/libtest/Makefile.am
-+++ b/tests/libtest/Makefile.am
-@@ -123,7 +123,7 @@ libstubgss_la_CFLAGS = $(AM_CFLAGS) -g
-
- libstubgss_la_SOURCES = stub_gssapi.c stub_gssapi.h
-
--libstubgss_la_LIBADD =
-+libstubgss_la_LIBADD = $(top_builddir)/lib/libcurl.la
- libstubgss_la_DEPENDENCIES =
- endif
-
---
-2.17.2
-
diff --git a/curl.spec b/curl.spec
index aaa75a4..fc60ce6 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,16 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.63.0
-Release: 3%{?dist}
+Release: 4%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
# revert an upstream commit that broke `fedpkg new-sources` (#1659329)
Patch1: 0001-curl-7.62.0-http-post-negotiate.patch
+# libtest: avoid symbol lookup error in libstubgss.so
+Patch2: 0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch
+
# curl -J: do not append to the destination file (#1658574)
Patch7: 0007-curl-7.63.0-JO-preserve-local-file.patch
@@ -23,9 +26,6 @@ Patch103: 0103-curl-7.59.0-python3.patch
# use localhost6 instead of ip6-localhost in the curl test-suite
Patch104: 0104-curl-7.19.7-localhost6.patch
-# libtest: avoid symbol lookup error in libstubgss.so
-Patch105: 0105-curl-7.63.0-libstubgss-ldadd.patch
-
Provides: curl-full = %{version}-%{release}
Provides: webclient
URL: https://curl.haxx.se/
@@ -175,6 +175,7 @@ be installed.
%patch1 -p1 -R
# upstream patches
+%patch2 -p1
%patch7 -p1
# Fedora patches
@@ -182,7 +183,6 @@ be installed.
%patch102 -p1
%patch103 -p1
%patch104 -p1
-%patch105 -p1
# make tests/*.py use Python 3
sed -e '1 s|^#!/.*python|#!%{__python3}|' -i tests/*.py
@@ -343,6 +343,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Fri Jan 04 2019 Kamil Dudka - 7.63.0-4
+- replace 0105-curl-7.63.0-libstubgss-ldadd.patch by upstream patch
+
* Wed Dec 19 2018 Kamil Dudka - 7.63.0-3
- curl -J: do not append to the destination file (#1658574)
From da8449decdcb41b4b6d51b44e3eae06f831e4327 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 7 Jan 2019 12:39:58 +0100
Subject: [PATCH 049/260] replace 0001-curl-7.62.0-http-post-negotiate.patch by
upstream patch
---
0001-curl-7.62.0-http-post-negotiate.patch | 75 ++++++++++++++--------
curl.spec | 4 +-
2 files changed, 49 insertions(+), 30 deletions(-)
diff --git a/0001-curl-7.62.0-http-post-negotiate.patch b/0001-curl-7.62.0-http-post-negotiate.patch
index a391183..4bb3f0d 100644
--- a/0001-curl-7.62.0-http-post-negotiate.patch
+++ b/0001-curl-7.62.0-http-post-negotiate.patch
@@ -1,69 +1,90 @@
-From be7395e31ae884cfaf87056f400130e3321767b3 Mon Sep 17 00:00:00 2001
-From: Elia Tufarolo
-Date: Tue, 13 Nov 2018 18:30:56 +0100
-Subject: [PATCH] http_negotiate: do not close connection until negotiation is
- completed
+From 46fe12fc1d35b8d2484811b9359f0de72114dee4 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Fri, 4 Jan 2019 23:34:50 +0100
+Subject: [PATCH] Revert "http_negotiate: do not close connection until
+ negotiation is completed"
-Fix HTTP POST using CURLAUTH_NEGOTIATE.
+This reverts commit 07ebaf837843124ee670e5b8c218b80b92e06e47.
-Closes #3275
+This also reopens PR #3275 which brought the change now reverted.
-Upstream-commit: 07ebaf837843124ee670e5b8c218b80b92e06e47
+Fixes #3384
+Closes #3439
+
+Upstream-commit: ebe658c1e5a6577178981a7f406794699305be5c
Signed-off-by: Kamil Dudka
---
- lib/http.c | 1 -
- lib/http_negotiate.c | 8 ++++++++
- 2 files changed, 8 insertions(+), 1 deletion(-)
+ lib/http.c | 3 ++-
+ lib/http_negotiate.c | 10 +---------
+ 2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/lib/http.c b/lib/http.c
-index 46ac15a6e..afc919b09 100644
+index 8866fdf0a..303535af6 100644
--- a/lib/http.c
+++ b/lib/http.c
-@@ -610,7 +610,6 @@ output_auth_headers(struct connectdata *conn,
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -616,6 +616,7 @@ output_auth_headers(struct connectdata *conn,
result = Curl_output_negotiate(conn, proxy);
if(result)
return result;
-- authstatus->done = TRUE;
++ authstatus->done = TRUE;
negdata->state = GSS_AUTHSENT;
}
else
diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
-index ddcd65b3b..444265d11 100644
+index 444265d11..4713d1bd5 100644
--- a/lib/http_negotiate.c
+++ b/lib/http_negotiate.c
-@@ -49,6 +49,7 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -49,7 +49,6 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
/* Point to the correct struct with this */
struct negotiatedata *neg_ctx;
-+ struct auth *authp;
+- struct auth *authp;
if(proxy) {
userp = conn->http_proxy.user;
-@@ -57,6 +58,7 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+@@ -58,7 +57,6 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
data->set.str[STRING_PROXY_SERVICE_NAME] : "HTTP";
host = conn->http_proxy.host.name;
neg_ctx = &data->state.proxyneg;
-+ authp = &conn->data->state.authproxy;
+- authp = &conn->data->state.authproxy;
}
else {
userp = conn->user;
-@@ -65,6 +67,7 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+@@ -67,7 +65,6 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
data->set.str[STRING_SERVICE_NAME] : "HTTP";
host = conn->host.name;
neg_ctx = &data->state.negotiate;
-+ authp = &conn->data->state.authhost;
+- authp = &conn->data->state.authhost;
}
/* Not set means empty */
-@@ -95,6 +98,11 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
+@@ -98,11 +95,6 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
if(result)
Curl_auth_spnego_cleanup(neg_ctx);
-+ else
-+ /* If the status is different than 0 and we encountered no errors
-+ it means we have to continue. 0 is the OK value for both GSSAPI
-+ (GSS_S_COMPLETE) and SSPI (SEC_E_OK) */
-+ authp->done = !neg_ctx->status;
+- else
+- /* If the status is different than 0 and we encountered no errors
+- it means we have to continue. 0 is the OK value for both GSSAPI
+- (GSS_S_COMPLETE) and SSPI (SEC_E_OK) */
+- authp->done = !neg_ctx->status;
return result;
}
diff --git a/curl.spec b/curl.spec
index fc60ce6..f04fb8b 100644
--- a/curl.spec
+++ b/curl.spec
@@ -171,10 +171,8 @@ be installed.
%prep
%setup -q
-# upstream patches to revert
-%patch1 -p1 -R
-
# upstream patches
+%patch1 -p1
%patch2 -p1
%patch7 -p1
From 1a6a3b20a66509e5fad971d6dfb8b33daab8ca60 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 21 Jan 2019 10:13:55 +0100
Subject: [PATCH 050/260] Resolves: CVE-2018-20483 - xattr: strip credentials
from any URL that is stored
---
...xattr-strip-credentials-from-any-URL.patch | 284 ++++++++++++++++++
curl.spec | 9 +-
2 files changed, 292 insertions(+), 1 deletion(-)
create mode 100644 0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch
diff --git a/0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch b/0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch
new file mode 100644
index 0000000..d9fa798
--- /dev/null
+++ b/0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch
@@ -0,0 +1,284 @@
+From 9fa7298750c1d66331dc55a202277b131868c048 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Wed, 2 Jan 2019 20:18:27 +0100
+Subject: [PATCH] xattr: strip credentials from any URL that is stored
+
+Both user and password are cleared uncondtitionally.
+
+Added unit test 1621 to verify.
+
+Fixes #3423
+Closes #3433
+
+Upstream-commit: 98e6629154044e4ab1ee7cff8351c7ebcb131e88
+Signed-off-by: Kamil Dudka
+---
+ src/tool_xattr.c | 63 +++++++++++++++++++++++++----
+ tests/data/Makefile.inc | 2 +-
+ tests/data/test1621 | 27 +++++++++++++
+ tests/unit/Makefile.inc | 6 ++-
+ tests/unit/unit1621.c | 89 +++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 177 insertions(+), 10 deletions(-)
+ create mode 100644 tests/data/test1621
+ create mode 100644 tests/unit/unit1621.c
+
+diff --git a/src/tool_xattr.c b/src/tool_xattr.c
+index 92b99db..730381b 100644
+--- a/src/tool_xattr.c
++++ b/src/tool_xattr.c
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -49,6 +49,46 @@ static const struct xattr_mapping {
+ { NULL, CURLINFO_NONE } /* last element, abort loop here */
+ };
+
++/* returns TRUE if a new URL is returned, that then needs to be freed */
++/* @unittest: 1621 */
++#ifdef UNITTESTS
++bool stripcredentials(char **url);
++#else
++static
++#endif
++bool stripcredentials(char **url)
++{
++ CURLU *u;
++ CURLUcode uc;
++ char *nurl;
++ u = curl_url();
++ if(u) {
++ uc = curl_url_set(u, CURLUPART_URL, *url, 0);
++ if(uc)
++ goto error;
++
++ uc = curl_url_set(u, CURLUPART_USER, NULL, 0);
++ if(uc)
++ goto error;
++
++ uc = curl_url_set(u, CURLUPART_PASSWORD, NULL, 0);
++ if(uc)
++ goto error;
++
++ uc = curl_url_get(u, CURLUPART_URL, &nurl, 0);
++ if(uc)
++ goto error;
++
++ curl_url_cleanup(u);
++
++ *url = nurl;
++ return TRUE;
++ }
++ error:
++ curl_url_cleanup(u);
++ return FALSE;
++}
++
+ /* store metadata from the curl request alongside the downloaded
+ * file using extended attributes
+ */
+@@ -62,17 +102,24 @@ int fwrite_xattr(CURL *curl, int fd)
+ char *value = NULL;
+ CURLcode result = curl_easy_getinfo(curl, mappings[i].info, &value);
+ if(!result && value) {
++ bool freeptr = FALSE;
++ if(CURLINFO_EFFECTIVE_URL == mappings[i].info)
++ freeptr = stripcredentials(&value);
++ if(value) {
+ #ifdef HAVE_FSETXATTR_6
+- err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0, 0);
++ err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0, 0);
+ #elif defined(HAVE_FSETXATTR_5)
+- err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0);
++ err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0);
+ #elif defined(__FreeBSD_version)
+- err = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, mappings[i].attr, value,
+- strlen(value));
+- /* FreeBSD's extattr_set_fd returns the length of the extended attribute
+- */
+- err = err < 0 ? err : 0;
++ err = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, mappings[i].attr,
++ value, strlen(value));
++ /* FreeBSD's extattr_set_fd returns the length of the extended
++ attribute */
++ err = err < 0 ? err : 0;
+ #endif
++ if(freeptr)
++ curl_free(value);
++ }
+ }
+ i++;
+ }
+diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
+index dd38f89..6172b77 100644
+--- a/tests/data/Makefile.inc
++++ b/tests/data/Makefile.inc
+@@ -180,7 +180,7 @@ test1560 \
+ \
+ test1590 \
+ test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \
+-test1608 test1609 test1620 \
++test1608 test1609 test1620 test1621 \
+ \
+ test1650 test1651 test1652 test1653 \
+ \
+diff --git a/tests/data/test1621 b/tests/data/test1621
+new file mode 100644
+index 0000000..1117d1b
+--- /dev/null
++++ b/tests/data/test1621
+@@ -0,0 +1,27 @@
++
++
++
++unittest
++stripcredentials
++
++
++
++#
++# Client-side
++
++
++none
++
++
++unittest
++https
++
++
++unit tests for stripcredentials from URL
++
++
++unit1621
++
++
++
++
+diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc
+index 8b1a607..82eaec7 100644
+--- a/tests/unit/Makefile.inc
++++ b/tests/unit/Makefile.inc
+@@ -10,7 +10,7 @@ UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307 \
+ unit1330 unit1394 unit1395 unit1396 unit1397 unit1398 \
+ unit1399 \
+ unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606 unit1607 \
+- unit1608 unit1609 unit1620 \
++ unit1608 unit1609 unit1620 unit1621 \
+ unit1650 unit1651 unit1652 unit1653
+
+ unit1300_SOURCES = unit1300.c $(UNITFILES)
+@@ -100,6 +100,10 @@ unit1609_CPPFLAGS = $(AM_CPPFLAGS)
+ unit1620_SOURCES = unit1620.c $(UNITFILES)
+ unit1620_CPPFLAGS = $(AM_CPPFLAGS)
+
++unit1621_SOURCES = unit1621.c $(UNITFILES)
++unit1621_CPPFLAGS = $(AM_CPPFLAGS)
++unit1621_LDADD = $(top_builddir)/src/libcurltool.la $(top_builddir)/lib/libcurl.la
++
+ unit1650_SOURCES = unit1650.c $(UNITFILES)
+ unit1650_CPPFLAGS = $(AM_CPPFLAGS)
+
+diff --git a/tests/unit/unit1621.c b/tests/unit/unit1621.c
+new file mode 100644
+index 0000000..6e07b6e
+--- /dev/null
++++ b/tests/unit/unit1621.c
+@@ -0,0 +1,89 @@
++/***************************************************************************
++ * _ _ ____ _
++ * Project ___| | | | _ \| |
++ * / __| | | | |_) | |
++ * | (__| |_| | _ <| |___
++ * \___|\___/|_| \_\_____|
++ *
++ * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
++ *
++ * This software is licensed as described in the file COPYING, which
++ * you should have received as part of this distribution. The terms
++ * are also available at https://curl.haxx.se/docs/copyright.html.
++ *
++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
++ * copies of the Software, and permit persons to whom the Software is
++ * furnished to do so, under the terms of the COPYING file.
++ *
++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
++ * KIND, either express or implied.
++ *
++ ***************************************************************************/
++#include "curlcheck.h"
++
++#include "urldata.h"
++#include "url.h"
++
++#include "memdebug.h" /* LAST include file */
++
++static CURLcode unit_setup(void)
++{
++ return CURLE_OK;
++}
++
++static void unit_stop(void)
++{
++}
++
++#ifdef __MINGW32__
++UNITTEST_START
++{
++ return 0;
++}
++UNITTEST_STOP
++#else
++
++bool stripcredentials(char **url);
++
++struct checkthis {
++ const char *input;
++ const char *output;
++};
++
++static struct checkthis tests[] = {
++ { "ninja://foo@example.com", "ninja://foo@example.com" },
++ { "https://foo@example.com", "https://example.com/" },
++ { "https://localhost:45", "https://localhost:45/" },
++ { "https://foo@localhost:45", "https://localhost:45/" },
++ { "http://daniel:password@localhost", "http://localhost/" },
++ { "http://daniel@localhost", "http://localhost/" },
++ { "http://localhost/", "http://localhost/" },
++ { NULL, NULL } /* end marker */
++};
++
++UNITTEST_START
++{
++ bool cleanup;
++ char *url;
++ int i;
++ int rc = 0;
++
++ for(i = 0; tests[i].input; i++) {
++ url = (char *)tests[i].input;
++ cleanup = stripcredentials(&url);
++ printf("Test %u got input \"%s\", output: \"%s\"\n",
++ i, tests[i].input, url);
++
++ if(strcmp(tests[i].output, url)) {
++ fprintf(stderr, "Test %u got input \"%s\", expected output \"%s\"\n"
++ " Actual output: \"%s\"\n", i, tests[i].input, tests[i].output,
++ url);
++ rc++;
++ }
++ if(cleanup)
++ curl_free(url);
++ }
++ return rc;
++}
++UNITTEST_STOP
++#endif
+--
+2.17.2
+
diff --git a/curl.spec b/curl.spec
index f04fb8b..8582a58 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.63.0
-Release: 4%{?dist}
+Release: 5%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -14,6 +14,9 @@ Patch2: 0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch
# curl -J: do not append to the destination file (#1658574)
Patch7: 0007-curl-7.63.0-JO-preserve-local-file.patch
+# xattr: strip credentials from any URL that is stored (CVE-2018-20483)
+Patch8: 0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -175,6 +178,7 @@ be installed.
%patch1 -p1
%patch2 -p1
%patch7 -p1
+%patch8 -p1
# Fedora patches
%patch101 -p1
@@ -341,6 +345,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Mon Jan 21 2019 Kamil Dudka - 7.63.0-5
+- xattr: strip credentials from any URL that is stored (CVE-2018-20483)
+
* Fri Jan 04 2019 Kamil Dudka - 7.63.0-4
- replace 0105-curl-7.63.0-libstubgss-ldadd.patch by upstream patch
From 9221f774a1e524d8330fb2b72cda15ad83ca1c51 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Thu, 31 Jan 2019 16:37:02 +0000
Subject: [PATCH 051/260] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
curl.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index 8582a58..4600a84 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.63.0
-Release: 5%{?dist}
+Release: 6%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -345,6 +345,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu Jan 31 2019 Fedora Release Engineering - 7.63.0-6
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
+
* Mon Jan 21 2019 Kamil Dudka - 7.63.0-5
- xattr: strip credentials from any URL that is stored (CVE-2018-20483)
From 3c5dec6602592a730cbe3518e9b222bc3d3e4a0b Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 4 Feb 2019 17:45:12 +0100
Subject: [PATCH 052/260] prevent valgrind from reporting false positives on
x86_64
---
0105-curl-7.63.0-lib1560-valgrind.patch | 39 +++++++++++++++++++++++++
curl.spec | 9 +++++-
2 files changed, 47 insertions(+), 1 deletion(-)
create mode 100644 0105-curl-7.63.0-lib1560-valgrind.patch
diff --git a/0105-curl-7.63.0-lib1560-valgrind.patch b/0105-curl-7.63.0-lib1560-valgrind.patch
new file mode 100644
index 0000000..40d0a9b
--- /dev/null
+++ b/0105-curl-7.63.0-lib1560-valgrind.patch
@@ -0,0 +1,39 @@
+From f55cca0e86f59ec11ffafd5c0503c39ca3723e2e Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Mon, 4 Feb 2019 17:32:56 +0100
+Subject: [PATCH] libtest: compile lib1560.c with -fno-builtin-strcmp
+
+... to prevent valgrind from reporting false positives on x86_64:
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x10BCAA: part2id (lib1560.c:489)
+ by 0x10BCAA: updateurl (lib1560.c:521)
+ by 0x10BCAA: set_parts (lib1560.c:630)
+ by 0x10BCAA: test (lib1560.c:802)
+ by 0x4923412: (below main) (in /usr/lib64/libc-2.28.9000.so)
+
+Conditional jump or move depends on uninitialised value(s)
+ at 0x10BCC3: part2id (lib1560.c:491)
+ by 0x10BCC3: updateurl (lib1560.c:521)
+ by 0x10BCC3: set_parts (lib1560.c:630)
+ by 0x10BCC3: test (lib1560.c:802)
+ by 0x4923412: (below main) (in /usr/lib64/libc-2.28.9000.so)
+---
+ tests/libtest/Makefile.inc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
+index 080421b..ea3b806 100644
+--- a/tests/libtest/Makefile.inc
++++ b/tests/libtest/Makefile.inc
+@@ -516,6 +516,7 @@ lib1557_LDADD = $(TESTUTIL_LIBS)
+ lib1557_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1557
+
+ lib1560_SOURCES = lib1560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
++lib1560_CFLAGS = $(AM_CFLAGS) -fno-builtin-strcmp
+ lib1560_LDADD = $(TESTUTIL_LIBS)
+
+ lib1900_SOURCES = lib1900.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+--
+2.17.2
+
diff --git a/curl.spec b/curl.spec
index 4600a84..ce957f6 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.63.0
-Release: 6%{?dist}
+Release: 7%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -29,6 +29,9 @@ Patch103: 0103-curl-7.59.0-python3.patch
# use localhost6 instead of ip6-localhost in the curl test-suite
Patch104: 0104-curl-7.19.7-localhost6.patch
+# prevent valgrind from reporting false positives on x86_64
+Patch105: 0105-curl-7.63.0-lib1560-valgrind.patch
+
Provides: curl-full = %{version}-%{release}
Provides: webclient
URL: https://curl.haxx.se/
@@ -185,6 +188,7 @@ be installed.
%patch102 -p1
%patch103 -p1
%patch104 -p1
+%patch105 -p1
# make tests/*.py use Python 3
sed -e '1 s|^#!/.*python|#!%{__python3}|' -i tests/*.py
@@ -345,6 +349,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Mon Feb 04 2019 Kamil Dudka - 7.63.0-7
+- prevent valgrind from reporting false positives on x86_64
+
* Thu Jan 31 2019 Fedora Release Engineering - 7.63.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
From 2bdb62413990d788a0e9acad53ca15e9e2aed17f Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 6 Feb 2019 09:51:19 +0100
Subject: [PATCH 053/260] new upstream release - 7.64.0
Resolves: CVE-2019-3823 - SMTP end-of-response out-of-bounds read
Resolves: CVE-2019-3822 - NTLMv2 type-3 header stack buffer overflow
Resolves: CVE-2018-16890 - NTLM type-2 out-of-bounds buffer read
---
0001-curl-7.62.0-http-post-negotiate.patch | 93 ------
...-7.62.0-libtest-stub_gssapi-snprintf.patch | 63 ----
0007-curl-7.63.0-JO-preserve-local-file.patch | 115 -------
...xattr-strip-credentials-from-any-URL.patch | 284 ------------------
0102-curl-7.36.0-debug.patch | 4 +-
0105-curl-7.63.0-lib1560-valgrind.patch | 6 +-
curl-7.63.0.tar.xz.asc | 11 -
curl-7.64.0.tar.xz.asc | 11 +
curl.spec | 26 +-
sources | 2 +-
10 files changed, 25 insertions(+), 590 deletions(-)
delete mode 100644 0001-curl-7.62.0-http-post-negotiate.patch
delete mode 100644 0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch
delete mode 100644 0007-curl-7.63.0-JO-preserve-local-file.patch
delete mode 100644 0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch
delete mode 100644 curl-7.63.0.tar.xz.asc
create mode 100644 curl-7.64.0.tar.xz.asc
diff --git a/0001-curl-7.62.0-http-post-negotiate.patch b/0001-curl-7.62.0-http-post-negotiate.patch
deleted file mode 100644
index 4bb3f0d..0000000
--- a/0001-curl-7.62.0-http-post-negotiate.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 46fe12fc1d35b8d2484811b9359f0de72114dee4 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Fri, 4 Jan 2019 23:34:50 +0100
-Subject: [PATCH] Revert "http_negotiate: do not close connection until
- negotiation is completed"
-
-This reverts commit 07ebaf837843124ee670e5b8c218b80b92e06e47.
-
-This also reopens PR #3275 which brought the change now reverted.
-
-Fixes #3384
-Closes #3439
-
-Upstream-commit: ebe658c1e5a6577178981a7f406794699305be5c
-Signed-off-by: Kamil Dudka
----
- lib/http.c | 3 ++-
- lib/http_negotiate.c | 10 +---------
- 2 files changed, 3 insertions(+), 10 deletions(-)
-
-diff --git a/lib/http.c b/lib/http.c
-index 8866fdf0a..303535af6 100644
---- a/lib/http.c
-+++ b/lib/http.c
-@@ -5,7 +5,7 @@
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
-- * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al.
-+ * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -616,6 +616,7 @@ output_auth_headers(struct connectdata *conn,
- result = Curl_output_negotiate(conn, proxy);
- if(result)
- return result;
-+ authstatus->done = TRUE;
- negdata->state = GSS_AUTHSENT;
- }
- else
-diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
-index 444265d11..4713d1bd5 100644
---- a/lib/http_negotiate.c
-+++ b/lib/http_negotiate.c
-@@ -5,7 +5,7 @@
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
-- * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al.
-+ * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -49,7 +49,6 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
-
- /* Point to the correct struct with this */
- struct negotiatedata *neg_ctx;
-- struct auth *authp;
-
- if(proxy) {
- userp = conn->http_proxy.user;
-@@ -58,7 +57,6 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
- data->set.str[STRING_PROXY_SERVICE_NAME] : "HTTP";
- host = conn->http_proxy.host.name;
- neg_ctx = &data->state.proxyneg;
-- authp = &conn->data->state.authproxy;
- }
- else {
- userp = conn->user;
-@@ -67,7 +65,6 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
- data->set.str[STRING_SERVICE_NAME] : "HTTP";
- host = conn->host.name;
- neg_ctx = &data->state.negotiate;
-- authp = &conn->data->state.authhost;
- }
-
- /* Not set means empty */
-@@ -98,11 +95,6 @@ CURLcode Curl_input_negotiate(struct connectdata *conn, bool proxy,
-
- if(result)
- Curl_auth_spnego_cleanup(neg_ctx);
-- else
-- /* If the status is different than 0 and we encountered no errors
-- it means we have to continue. 0 is the OK value for both GSSAPI
-- (GSS_S_COMPLETE) and SSPI (SEC_E_OK) */
-- authp->done = !neg_ctx->status;
-
- return result;
- }
---
-2.20.0
-
diff --git a/0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch b/0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch
deleted file mode 100644
index 22868c4..0000000
--- a/0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 510ab52ed43589d96f0fab338eb6286940a29a78 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Thu, 3 Jan 2019 12:00:58 +0100
-Subject: [PATCH] libtest/stub_gssapi: use "real" snprintf
-
-... since it doesn't link with libcurl.
-
-Reverts the commit dcd6f81025 changes from this file.
-
-Bug: https://curl.haxx.se/mail/lib-2019-01/0000.html
-Reported-by: Shlomi Fish
-Reviewed-by: Daniel Gustafsson
-Reviewed-by: Kamil Dudka
-
-Closes #3434
-
-Upstream-commit: c7c362a24c0247644f9fde05e8ea353af4a94b04
-Signed-off-by: Kamil Dudka
----
- tests/libtest/stub_gssapi.c | 13 ++++++-------
- 1 file changed, 6 insertions(+), 7 deletions(-)
-
-diff --git a/tests/libtest/stub_gssapi.c b/tests/libtest/stub_gssapi.c
-index 254a01b31..377b75452 100644
---- a/tests/libtest/stub_gssapi.c
-+++ b/tests/libtest/stub_gssapi.c
-@@ -5,7 +5,7 @@
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
-- * Copyright (C) 2017-2018, Daniel Stenberg, , et al.
-+ * Copyright (C) 2017-2019, Daniel Stenberg, , et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -28,10 +28,7 @@
-
- #include "stub_gssapi.h"
-
--#define ENABLE_CURLX_PRINTF
--/* make the curlx header define all printf() functions to use the curlx_*
-- versions instead */
--#include "curlx.h" /* from the private lib dir */
-+/* !checksrc! disable SNPRINTF all */
-
- #define MAX_CREDS_LENGTH 250
- #define APPROX_TOKEN_LEN 250
-@@ -207,8 +204,10 @@ OM_uint32 gss_init_sec_context(OM_uint32 *min,
- }
-
- /* Token format: creds:target:type:padding */
-- used = msnprintf(token, length, "%s:%s:%d:", creds,
-- (char *) target_name, ctx->sent);
-+ /* Note: this is using the *real* snprintf() and not the curl provided
-+ one */
-+ used = snprintf(token, length, "%s:%s:%d:", creds,
-+ (char *) target_name, ctx->sent);
-
- if(used >= length) {
- free(token);
---
-2.17.2
-
diff --git a/0007-curl-7.63.0-JO-preserve-local-file.patch b/0007-curl-7.63.0-JO-preserve-local-file.patch
deleted file mode 100644
index 12ac53e..0000000
--- a/0007-curl-7.63.0-JO-preserve-local-file.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From ff74657fb645e7175971128a171ef7d5ece40d77 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Mon, 17 Dec 2018 12:51:51 +0100
-Subject: [PATCH] curl -J: do not append to the destination file
-
-Reported-by: Kamil Dudka
-Fixes #3380
-Closes #3381
-
-Upstream-commit: 4849267197682e69cfa056c2bd7a44acd123a917
-Signed-off-by: Kamil Dudka
----
- src/tool_cb_hdr.c | 6 +++---
- src/tool_cb_wrt.c | 9 ++++-----
- src/tool_cb_wrt.h | 2 +-
- src/tool_operate.c | 2 +-
- 4 files changed, 9 insertions(+), 10 deletions(-)
-
-diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
-index 84b0d9c..3844904 100644
---- a/src/tool_cb_hdr.c
-+++ b/src/tool_cb_hdr.c
-@@ -157,12 +157,12 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
- outs->filename = filename;
- outs->alloc_filename = TRUE;
- hdrcbdata->honor_cd_filename = FALSE; /* done now! */
-- if(!tool_create_output_file(outs, TRUE))
-+ if(!tool_create_output_file(outs))
- return failure;
- }
- break;
- }
-- if(!outs->stream && !tool_create_output_file(outs, FALSE))
-+ if(!outs->stream && !tool_create_output_file(outs))
- return failure;
- }
-
-@@ -172,7 +172,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
- /* bold headers only for selected protocols */
- char *value = NULL;
-
-- if(!outs->stream && !tool_create_output_file(outs, FALSE))
-+ if(!outs->stream && !tool_create_output_file(outs))
- return failure;
-
- if(hdrcbdata->global->isatty && hdrcbdata->global->styled_output)
-diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
-index 2cb5e1b..195d6e7 100644
---- a/src/tool_cb_wrt.c
-+++ b/src/tool_cb_wrt.c
-@@ -32,8 +32,7 @@
- #include "memdebug.h" /* keep this as LAST include */
-
- /* create a local file for writing, return TRUE on success */
--bool tool_create_output_file(struct OutStruct *outs,
-- bool append)
-+bool tool_create_output_file(struct OutStruct *outs)
- {
- struct GlobalConfig *global = outs->config->global;
- FILE *file;
-@@ -43,7 +42,7 @@ bool tool_create_output_file(struct OutStruct *outs,
- return FALSE;
- }
-
-- if(outs->is_cd_filename && !append) {
-+ if(outs->is_cd_filename) {
- /* don't overwrite existing files */
- file = fopen(outs->filename, "rb");
- if(file) {
-@@ -55,7 +54,7 @@ bool tool_create_output_file(struct OutStruct *outs,
- }
-
- /* open file for writing */
-- file = fopen(outs->filename, append?"ab":"wb");
-+ file = fopen(outs->filename, "wb");
- if(!file) {
- warnf(global, "Failed to create the file %s: %s\n", outs->filename,
- strerror(errno));
-@@ -142,7 +141,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
- }
- #endif
-
-- if(!outs->stream && !tool_create_output_file(outs, FALSE))
-+ if(!outs->stream && !tool_create_output_file(outs))
- return failure;
-
- if(is_tty && (outs->bytes < 2000) && !config->terminal_binary_ok) {
-diff --git a/src/tool_cb_wrt.h b/src/tool_cb_wrt.h
-index 51e002b..188d3ea 100644
---- a/src/tool_cb_wrt.h
-+++ b/src/tool_cb_wrt.h
-@@ -30,6 +30,6 @@
- size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata);
-
- /* create a local file for writing, return TRUE on success */
--bool tool_create_output_file(struct OutStruct *outs, bool append);
-+bool tool_create_output_file(struct OutStruct *outs);
-
- #endif /* HEADER_CURL_TOOL_CB_WRT_H */
-diff --git a/src/tool_operate.c b/src/tool_operate.c
-index e53a9d8..429e9cf 100644
---- a/src/tool_operate.c
-+++ b/src/tool_operate.c
-@@ -1583,7 +1583,7 @@ static CURLcode operate_do(struct GlobalConfig *global,
- /* do not create (or even overwrite) the file in case we get no
- data because of unmet condition */
- curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &cond_unmet);
-- if(!cond_unmet && !tool_create_output_file(&outs, FALSE))
-+ if(!cond_unmet && !tool_create_output_file(&outs))
- result = CURLE_WRITE_ERROR;
- }
-
---
-2.17.2
-
diff --git a/0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch b/0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch
deleted file mode 100644
index d9fa798..0000000
--- a/0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch
+++ /dev/null
@@ -1,284 +0,0 @@
-From 9fa7298750c1d66331dc55a202277b131868c048 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Wed, 2 Jan 2019 20:18:27 +0100
-Subject: [PATCH] xattr: strip credentials from any URL that is stored
-
-Both user and password are cleared uncondtitionally.
-
-Added unit test 1621 to verify.
-
-Fixes #3423
-Closes #3433
-
-Upstream-commit: 98e6629154044e4ab1ee7cff8351c7ebcb131e88
-Signed-off-by: Kamil Dudka
----
- src/tool_xattr.c | 63 +++++++++++++++++++++++++----
- tests/data/Makefile.inc | 2 +-
- tests/data/test1621 | 27 +++++++++++++
- tests/unit/Makefile.inc | 6 ++-
- tests/unit/unit1621.c | 89 +++++++++++++++++++++++++++++++++++++++++
- 5 files changed, 177 insertions(+), 10 deletions(-)
- create mode 100644 tests/data/test1621
- create mode 100644 tests/unit/unit1621.c
-
-diff --git a/src/tool_xattr.c b/src/tool_xattr.c
-index 92b99db..730381b 100644
---- a/src/tool_xattr.c
-+++ b/src/tool_xattr.c
-@@ -5,7 +5,7 @@
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
-- * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al.
-+ * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -49,6 +49,46 @@ static const struct xattr_mapping {
- { NULL, CURLINFO_NONE } /* last element, abort loop here */
- };
-
-+/* returns TRUE if a new URL is returned, that then needs to be freed */
-+/* @unittest: 1621 */
-+#ifdef UNITTESTS
-+bool stripcredentials(char **url);
-+#else
-+static
-+#endif
-+bool stripcredentials(char **url)
-+{
-+ CURLU *u;
-+ CURLUcode uc;
-+ char *nurl;
-+ u = curl_url();
-+ if(u) {
-+ uc = curl_url_set(u, CURLUPART_URL, *url, 0);
-+ if(uc)
-+ goto error;
-+
-+ uc = curl_url_set(u, CURLUPART_USER, NULL, 0);
-+ if(uc)
-+ goto error;
-+
-+ uc = curl_url_set(u, CURLUPART_PASSWORD, NULL, 0);
-+ if(uc)
-+ goto error;
-+
-+ uc = curl_url_get(u, CURLUPART_URL, &nurl, 0);
-+ if(uc)
-+ goto error;
-+
-+ curl_url_cleanup(u);
-+
-+ *url = nurl;
-+ return TRUE;
-+ }
-+ error:
-+ curl_url_cleanup(u);
-+ return FALSE;
-+}
-+
- /* store metadata from the curl request alongside the downloaded
- * file using extended attributes
- */
-@@ -62,17 +102,24 @@ int fwrite_xattr(CURL *curl, int fd)
- char *value = NULL;
- CURLcode result = curl_easy_getinfo(curl, mappings[i].info, &value);
- if(!result && value) {
-+ bool freeptr = FALSE;
-+ if(CURLINFO_EFFECTIVE_URL == mappings[i].info)
-+ freeptr = stripcredentials(&value);
-+ if(value) {
- #ifdef HAVE_FSETXATTR_6
-- err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0, 0);
-+ err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0, 0);
- #elif defined(HAVE_FSETXATTR_5)
-- err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0);
-+ err = fsetxattr(fd, mappings[i].attr, value, strlen(value), 0);
- #elif defined(__FreeBSD_version)
-- err = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, mappings[i].attr, value,
-- strlen(value));
-- /* FreeBSD's extattr_set_fd returns the length of the extended attribute
-- */
-- err = err < 0 ? err : 0;
-+ err = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, mappings[i].attr,
-+ value, strlen(value));
-+ /* FreeBSD's extattr_set_fd returns the length of the extended
-+ attribute */
-+ err = err < 0 ? err : 0;
- #endif
-+ if(freeptr)
-+ curl_free(value);
-+ }
- }
- i++;
- }
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
-index dd38f89..6172b77 100644
---- a/tests/data/Makefile.inc
-+++ b/tests/data/Makefile.inc
-@@ -180,7 +180,7 @@ test1560 \
- \
- test1590 \
- test1600 test1601 test1602 test1603 test1604 test1605 test1606 test1607 \
--test1608 test1609 test1620 \
-+test1608 test1609 test1620 test1621 \
- \
- test1650 test1651 test1652 test1653 \
- \
-diff --git a/tests/data/test1621 b/tests/data/test1621
-new file mode 100644
-index 0000000..1117d1b
---- /dev/null
-+++ b/tests/data/test1621
-@@ -0,0 +1,27 @@
-+
-+
-+
-+unittest
-+stripcredentials
-+
-+
-+
-+#
-+# Client-side
-+
-+
-+none
-+
-+
-+unittest
-+https
-+
-+
-+unit tests for stripcredentials from URL
-+
-+
-+unit1621
-+
-+
-+
-+
-diff --git a/tests/unit/Makefile.inc b/tests/unit/Makefile.inc
-index 8b1a607..82eaec7 100644
---- a/tests/unit/Makefile.inc
-+++ b/tests/unit/Makefile.inc
-@@ -10,7 +10,7 @@ UNITPROGS = unit1300 unit1301 unit1302 unit1303 unit1304 unit1305 unit1307 \
- unit1330 unit1394 unit1395 unit1396 unit1397 unit1398 \
- unit1399 \
- unit1600 unit1601 unit1602 unit1603 unit1604 unit1605 unit1606 unit1607 \
-- unit1608 unit1609 unit1620 \
-+ unit1608 unit1609 unit1620 unit1621 \
- unit1650 unit1651 unit1652 unit1653
-
- unit1300_SOURCES = unit1300.c $(UNITFILES)
-@@ -100,6 +100,10 @@ unit1609_CPPFLAGS = $(AM_CPPFLAGS)
- unit1620_SOURCES = unit1620.c $(UNITFILES)
- unit1620_CPPFLAGS = $(AM_CPPFLAGS)
-
-+unit1621_SOURCES = unit1621.c $(UNITFILES)
-+unit1621_CPPFLAGS = $(AM_CPPFLAGS)
-+unit1621_LDADD = $(top_builddir)/src/libcurltool.la $(top_builddir)/lib/libcurl.la
-+
- unit1650_SOURCES = unit1650.c $(UNITFILES)
- unit1650_CPPFLAGS = $(AM_CPPFLAGS)
-
-diff --git a/tests/unit/unit1621.c b/tests/unit/unit1621.c
-new file mode 100644
-index 0000000..6e07b6e
---- /dev/null
-+++ b/tests/unit/unit1621.c
-@@ -0,0 +1,89 @@
-+/***************************************************************************
-+ * _ _ ____ _
-+ * Project ___| | | | _ \| |
-+ * / __| | | | |_) | |
-+ * | (__| |_| | _ <| |___
-+ * \___|\___/|_| \_\_____|
-+ *
-+ * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
-+ *
-+ * This software is licensed as described in the file COPYING, which
-+ * you should have received as part of this distribution. The terms
-+ * are also available at https://curl.haxx.se/docs/copyright.html.
-+ *
-+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
-+ * copies of the Software, and permit persons to whom the Software is
-+ * furnished to do so, under the terms of the COPYING file.
-+ *
-+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
-+ * KIND, either express or implied.
-+ *
-+ ***************************************************************************/
-+#include "curlcheck.h"
-+
-+#include "urldata.h"
-+#include "url.h"
-+
-+#include "memdebug.h" /* LAST include file */
-+
-+static CURLcode unit_setup(void)
-+{
-+ return CURLE_OK;
-+}
-+
-+static void unit_stop(void)
-+{
-+}
-+
-+#ifdef __MINGW32__
-+UNITTEST_START
-+{
-+ return 0;
-+}
-+UNITTEST_STOP
-+#else
-+
-+bool stripcredentials(char **url);
-+
-+struct checkthis {
-+ const char *input;
-+ const char *output;
-+};
-+
-+static struct checkthis tests[] = {
-+ { "ninja://foo@example.com", "ninja://foo@example.com" },
-+ { "https://foo@example.com", "https://example.com/" },
-+ { "https://localhost:45", "https://localhost:45/" },
-+ { "https://foo@localhost:45", "https://localhost:45/" },
-+ { "http://daniel:password@localhost", "http://localhost/" },
-+ { "http://daniel@localhost", "http://localhost/" },
-+ { "http://localhost/", "http://localhost/" },
-+ { NULL, NULL } /* end marker */
-+};
-+
-+UNITTEST_START
-+{
-+ bool cleanup;
-+ char *url;
-+ int i;
-+ int rc = 0;
-+
-+ for(i = 0; tests[i].input; i++) {
-+ url = (char *)tests[i].input;
-+ cleanup = stripcredentials(&url);
-+ printf("Test %u got input \"%s\", output: \"%s\"\n",
-+ i, tests[i].input, url);
-+
-+ if(strcmp(tests[i].output, url)) {
-+ fprintf(stderr, "Test %u got input \"%s\", expected output \"%s\"\n"
-+ " Actual output: \"%s\"\n", i, tests[i].input, tests[i].output,
-+ url);
-+ rc++;
-+ }
-+ if(cleanup)
-+ curl_free(url);
-+ }
-+ return rc;
-+}
-+UNITTEST_STOP
-+#endif
---
-2.17.2
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 60de5b3..57c05c6 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16415,18 +16415,11 @@ $as_echo "yes" >&6; }
+@@ -16250,18 +16250,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
@@ -38,7 +38,7 @@ diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 0cbba7a..9175b5b 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
-@@ -157,18 +157,11 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
+@@ -166,18 +166,11 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/0105-curl-7.63.0-lib1560-valgrind.patch b/0105-curl-7.63.0-lib1560-valgrind.patch
index 40d0a9b..003655c 100644
--- a/0105-curl-7.63.0-lib1560-valgrind.patch
+++ b/0105-curl-7.63.0-lib1560-valgrind.patch
@@ -26,14 +26,14 @@ diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 080421b..ea3b806 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
-@@ -516,6 +516,7 @@ lib1557_LDADD = $(TESTUTIL_LIBS)
- lib1557_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1557
+@@ -521,6 +521,7 @@ lib1558_SOURCES = lib1558.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1558_LDADD = $(TESTUTIL_LIBS)
lib1560_SOURCES = lib1560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1560_CFLAGS = $(AM_CFLAGS) -fno-builtin-strcmp
lib1560_LDADD = $(TESTUTIL_LIBS)
- lib1900_SOURCES = lib1900.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1591_SOURCES = lib1591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
--
2.17.2
diff --git a/curl-7.63.0.tar.xz.asc b/curl-7.63.0.tar.xz.asc
deleted file mode 100644
index 1dd44ac..0000000
--- a/curl-7.63.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlwQtYIACgkQXMkI/bce
-EsKPHgf/RhfKPvl1Q8ftuEOXakF/ZIvINukj49vOMFmfQRHfmGWh5ajaGj0qVF6x
-U5HtrDoFOP5m74tj6jrzr2Ala/HGeyZmiTWwRLMgu+Tvq4djIv2pzZUJpgawJS52
-LCb2DUS2F+E1AsZQYvyliYA+r2FO2RRX1kbwdu+0RyuFy5WmWwkI02VahAIYV48o
-44IqtXshxfSAlfEqQ8MgXtU1KW0SWtfKVP2HpsurugjGyknoXxHP7yoDMgDAkMk0
-fNYyPDZbUXXN+6Oyo4Xh8rz4dpVLBkIoCZb4WG2pFZSrfP2+FTL5/vRo/tUyjFfv
-2LHmDUOOFH3VMwMYlnMCgaaXG7/jtg==
-=TkSP
------END PGP SIGNATURE-----
diff --git a/curl-7.64.0.tar.xz.asc b/curl-7.64.0.tar.xz.asc
new file mode 100644
index 0000000..21f7542
--- /dev/null
+++ b/curl-7.64.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlxahccACgkQXMkI/bce
+EsKdrAf+OoNH+Yz1HfJG5MtmEi2sgRC56iAvZBQujPG8SJYGnT3D2nLiuC2+bzA8
+eMCqisodW5f6lV/9JRvLmLS0dhxAfdf/NHlMOdtgSv+NzVGsggpHeYEZ7HucRHsQ
+AKZ6/wx7rby8yZqrn2s7yWWB0qgiajWx30r+CJEYXpuw+YwZ2qZo5ecM7fa/J9ko
+ESwb7BLF6KMkdSz1wSApwCdznB/BXOaPrUBMiOcwO7ftq/t1ZmqnUWLtdlSp8OoH
+Tw832H1kCP2OFHcOFTQmZJLagRQtLBhC522wNsagXaMwak6uhoFApcAPqoPdm4Pm
+PvTO6aAopZk+sX9VemdSQzx/4ysT3w==
+=HOlc
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index ce957f6..1a410f0 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,22 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.63.0
-Release: 7%{?dist}
+Version: 7.64.0
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# revert an upstream commit that broke `fedpkg new-sources` (#1659329)
-Patch1: 0001-curl-7.62.0-http-post-negotiate.patch
-
-# libtest: avoid symbol lookup error in libstubgss.so
-Patch2: 0002-curl-7.62.0-libtest-stub_gssapi-snprintf.patch
-
-# curl -J: do not append to the destination file (#1658574)
-Patch7: 0007-curl-7.63.0-JO-preserve-local-file.patch
-
-# xattr: strip credentials from any URL that is stored (CVE-2018-20483)
-Patch8: 0008-curl-7.63.0-xattr-strip-credentials-from-any-URL.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -178,10 +166,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
-%patch2 -p1
-%patch7 -p1
-%patch8 -p1
# Fedora patches
%patch101 -p1
@@ -349,6 +333,12 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Feb 06 2019 Kamil Dudka - 7.64.0-1
+- new upstream release, which fixes the following vulnerabilities
+ CVE-2019-3823 - SMTP end-of-response out-of-bounds read
+ CVE-2019-3822 - NTLMv2 type-3 header stack buffer overflow
+ CVE-2018-16890 - NTLM type-2 out-of-bounds buffer read
+
* Mon Feb 04 2019 Kamil Dudka - 7.63.0-7
- prevent valgrind from reporting false positives on x86_64
diff --git a/sources b/sources
index c40ff26..d5662be 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.63.0.tar.xz) = c905eb157c6b0093f1b1a506e4782b83af423fd6de1ce0ab5372164a686ef292ffb10d7999d3dec2de602f63ee41b65e1a1008409dd8c959a597644c0ecb395b
+SHA512 (curl-7.64.0.tar.xz) = 953f1f5336ce5dfd1b9f933624432d401552d91ee02d39ecde6f023c956f99ec6aae8d7746d7c34b6eb2d6452f114e67da4e64d9c8dd90b7644b7844e7b9b423
From 9ace613273f52bce8206116b7ab8fb040f7199a1 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 11 Feb 2019 13:22:07 +0100
Subject: [PATCH 054/260] make zsh completion work again
---
0001-curl-7.64.0-zsh-completion.patch | 76 +++++++++++++++++++++++++++
curl.spec | 9 +++-
2 files changed, 84 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.64.0-zsh-completion.patch
diff --git a/0001-curl-7.64.0-zsh-completion.patch b/0001-curl-7.64.0-zsh-completion.patch
new file mode 100644
index 0000000..770a15b
--- /dev/null
+++ b/0001-curl-7.64.0-zsh-completion.patch
@@ -0,0 +1,76 @@
+From 082034e2334b2d0795b2b324ff3e0635bb7d2b86 Mon Sep 17 00:00:00 2001
+From: Alessandro Ghedini
+Date: Tue, 5 Feb 2019 20:44:14 +0000
+Subject: [PATCH 1/2] zsh.pl: update regex to better match curl -h output
+
+The current regex fails to match '<...>' arguments properly (e.g. those
+with spaces in them), which causes an completion script with wrong
+descriptions for some options.
+
+The problem can be reproduced as follows:
+
+% curl --reso
+
+Upstream-commit: dbd32f3241b297b96ee11a51da1a661f528ca026
+Signed-off-by: Kamil Dudka
+---
+ scripts/zsh.pl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/zsh.pl b/scripts/zsh.pl
+index 1257190..941b322 100755
+--- a/scripts/zsh.pl
++++ b/scripts/zsh.pl
+@@ -7,7 +7,7 @@ use warnings;
+
+ my $curl = $ARGV[0] || 'curl';
+
+-my $regex = '\s+(?:(-[^\s]+),\s)?(--[^\s]+)\s([^\s.]+)?\s+(.*)';
++my $regex = '\s+(?:(-[^\s]+),\s)?(--[^\s]+)\s*(\<.+?\>)?\s+(.*)';
+ my @opts = parse_main_opts('--help', $regex);
+
+ my $opts_str;
+--
+2.17.2
+
+
+From 45abc785e101346f19599aa5f9fa1617e525ec4d Mon Sep 17 00:00:00 2001
+From: Alessandro Ghedini
+Date: Tue, 5 Feb 2019 21:06:26 +0000
+Subject: [PATCH 2/2] zsh.pl: escape ':' character
+
+':' is interpreted as separator by zsh, so if used as part of the argument
+or option's description it needs to be escaped.
+
+The problem can be reproduced as follows:
+
+% curl -E
+
+Bug: https://bugs.debian.org/921452
+
+Upstream-commit: b3cc8017b7364f588365be2b2629c49c142efdb7
+Signed-off-by: Kamil Dudka
+---
+ scripts/zsh.pl | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/scripts/zsh.pl b/scripts/zsh.pl
+index 941b322..0f9cbec 100755
+--- a/scripts/zsh.pl
++++ b/scripts/zsh.pl
+@@ -45,9 +45,12 @@ sub parse_main_opts {
+
+ my $option = '';
+
++ $arg =~ s/\:/\\\:/g if defined $arg;
++
+ $desc =~ s/'/'\\''/g if defined $desc;
+ $desc =~ s/\[/\\\[/g if defined $desc;
+ $desc =~ s/\]/\\\]/g if defined $desc;
++ $desc =~ s/\:/\\\:/g if defined $desc;
+
+ $option .= '{' . trim($short) . ',' if defined $short;
+ $option .= trim($long) if defined $long;
+--
+2.17.2
+
diff --git a/curl.spec b/curl.spec
index 1a410f0..3c8279d 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.64.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# make zsh completion work again
+Patch1: 0001-curl-7.64.0-zsh-completion.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -166,6 +169,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -333,6 +337,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Mon Feb 11 2019 Kamil Dudka - 7.64.0-2
+- make zsh completion work again
+
* Wed Feb 06 2019 Kamil Dudka - 7.64.0-1
- new upstream release, which fixes the following vulnerabilities
CVE-2019-3823 - SMTP end-of-response out-of-bounds read
From e97fdf9b7f8dfd53c0604b87a8be9678ca548434 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 25 Feb 2019 14:24:32 +0100
Subject: [PATCH 055/260] Resolves: #1680198 - prevent NetworkManager from
leaking file descriptors
---
0002-curl-7.64.0-nm-fd-leak.patch | 162 ++++++++++++++++++++++++++++++
curl.spec | 9 +-
2 files changed, 170 insertions(+), 1 deletion(-)
create mode 100644 0002-curl-7.64.0-nm-fd-leak.patch
diff --git a/0002-curl-7.64.0-nm-fd-leak.patch b/0002-curl-7.64.0-nm-fd-leak.patch
new file mode 100644
index 0000000..681e58f
--- /dev/null
+++ b/0002-curl-7.64.0-nm-fd-leak.patch
@@ -0,0 +1,162 @@
+From 377101f138873bfa481785cb7d04c326006f0b5d Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Mon, 11 Feb 2019 07:56:00 +0100
+Subject: [PATCH 1/3] connection_check: set ->data to the transfer doing the
+ check
+
+The http2 code for connection checking needs a transfer to use. Make
+sure a working one is set before handler->connection_check() is called.
+
+Reported-by: jnbr on github
+Fixes #3541
+Closes #3547
+
+Upstream-commit: 38d8e1bd4ed1ae52930ae466ecbac78e888b142f
+Signed-off-by: Kamil Dudka
+---
+ lib/url.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/url.c b/lib/url.c
+index d5a9820..229c655 100644
+--- a/lib/url.c
++++ b/lib/url.c
+@@ -965,6 +965,7 @@ static bool extract_if_dead(struct connectdata *conn,
+ /* The protocol has a special method for checking the state of the
+ connection. Use it to check if the connection is dead. */
+ unsigned int state;
++ conn->data = data; /* use this transfer for now */
+ state = conn->handler->connection_check(conn, CONNCHECK_ISDEAD);
+ dead = (state & CONNRESULT_DEAD);
+ }
+--
+2.17.2
+
+
+From 287f5d70395b3833f8901a57b29a48b87d84a9fe Mon Sep 17 00:00:00 2001
+From: Jay Satiro
+Date: Mon, 11 Feb 2019 23:00:00 -0500
+Subject: [PATCH 2/3] connection_check: restore original conn->data after the
+ check
+
+- Save the original conn->data before it's changed to the specified
+ data transfer for the connection check and then restore it afterwards.
+
+This is a follow-up to 38d8e1b 2019-02-11.
+
+History:
+
+It was discovered a month ago that before checking whether to extract a
+dead connection that that connection should be associated with a "live"
+transfer for the check (ie original conn->data ignored and set to the
+passed in data). A fix was landed in 54b201b which did that and also
+cleared conn->data after the check. The original conn->data was not
+restored, so presumably it was thought that a valid conn->data was no
+longer needed.
+
+Several days later it was discovered that a valid conn->data was needed
+after the check and follow-up fix was landed in bbae24c which partially
+reverted the original fix and attempted to limit the scope of when
+conn->data was changed to only when pruning dead connections. In that
+case conn->data was not cleared and the original conn->data not
+restored.
+
+A month later it was discovered that the original fix was somewhat
+correct; a "live" transfer is needed for the check in all cases
+because original conn->data could be null which could cause a bad deref
+at arbitrary points in the check. A fix was landed in 38d8e1b which
+expanded the scope to all cases. conn->data was not cleared and the
+original conn->data not restored.
+
+A day later it was discovered that not restoring the original conn->data
+may lead to busy loops in applications that use the event interface, and
+given this observation it's a pretty safe assumption that there is some
+code path that still needs the original conn->data. This commit is the
+follow-up fix for that, it restores the original conn->data after the
+connection check.
+
+Assisted-by: tholin@users.noreply.github.com
+Reported-by: tholin@users.noreply.github.com
+
+Fixes https://github.com/curl/curl/issues/3542
+Closes #3559
+
+Upstream-commit: 4015fae044ce52a639c9358e22a9e948f287c89f
+Signed-off-by: Kamil Dudka
+---
+ lib/url.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/url.c b/lib/url.c
+index 229c655..a77e92d 100644
+--- a/lib/url.c
++++ b/lib/url.c
+@@ -965,8 +965,10 @@ static bool extract_if_dead(struct connectdata *conn,
+ /* The protocol has a special method for checking the state of the
+ connection. Use it to check if the connection is dead. */
+ unsigned int state;
++ struct Curl_easy *olddata = conn->data;
+ conn->data = data; /* use this transfer for now */
+ state = conn->handler->connection_check(conn, CONNCHECK_ISDEAD);
++ conn->data = olddata;
+ dead = (state & CONNRESULT_DEAD);
+ }
+ else {
+@@ -995,7 +997,6 @@ struct prunedead {
+ static int call_extract_if_dead(struct connectdata *conn, void *param)
+ {
+ struct prunedead *p = (struct prunedead *)param;
+- conn->data = p->data; /* transfer to use for this check */
+ if(extract_if_dead(conn, p->data)) {
+ /* stop the iteration here, pass back the connection that was extracted */
+ p->extracted = conn;
+--
+2.17.2
+
+
+From 15e3f2eef87bff1210f43921cb15f03c68be59f7 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Tue, 19 Feb 2019 15:56:54 +0100
+Subject: [PATCH 3/3] singlesocket: fix the 'sincebefore' placement
+
+The variable wasn't properly reset within the loop and thus could remain
+set for sockets that hadn't been set before and miss notifying the app.
+
+This is a follow-up to 4c35574 (shipped in curl 7.64.0)
+
+Reported-by: buzo-ffm on github
+Detected-by: Jan Alexander Steffens
+Fixes #3585
+Closes #3589
+
+Upstream-commit: afc00e047c773faeaa60a5f86a246cbbeeba5819
+Signed-off-by: Kamil Dudka
+---
+ lib/multi.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/multi.c b/lib/multi.c
+index 130226f..28f4c47 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -2360,8 +2360,6 @@ static CURLMcode singlesocket(struct Curl_multi *multi,
+ int num;
+ unsigned int curraction;
+ int actions[MAX_SOCKSPEREASYHANDLE];
+- unsigned int comboaction;
+- bool sincebefore = FALSE;
+
+ for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++)
+ socks[i] = CURL_SOCKET_BAD;
+@@ -2380,6 +2378,8 @@ static CURLMcode singlesocket(struct Curl_multi *multi,
+ i++) {
+ unsigned int action = CURL_POLL_NONE;
+ unsigned int prevaction = 0;
++ unsigned int comboaction;
++ bool sincebefore = FALSE;
+
+ s = socks[i];
+
+--
+2.17.2
+
diff --git a/curl.spec b/curl.spec
index 3c8279d..834c964 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,16 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.64.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
# make zsh completion work again
Patch1: 0001-curl-7.64.0-zsh-completion.patch
+# prevent NetworkManager from leaking file descriptors (#1680198)
+Patch2: 0002-curl-7.64.0-nm-fd-leak.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -170,6 +173,7 @@ be installed.
# upstream patches
%patch1 -p1
+%patch2 -p1
# Fedora patches
%patch101 -p1
@@ -337,6 +341,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Mon Feb 25 2019 Kamil Dudka - 7.64.0-3
+- prevent NetworkManager from leaking file descriptors (#1680198)
+
* Mon Feb 11 2019 Kamil Dudka - 7.64.0-2
- make zsh completion work again
From 95008127cf8cce13fd350840dfd31372ab85b48f Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 27 Feb 2019 18:02:05 +0100
Subject: [PATCH 056/260] Resolves: #1683676 - fix NULL dereference if flushing
cookies with no CookieInfo set
---
0003-curl-7.64.0-cookie-segfault.patch | 42 ++++++++++++++++++++++++++
curl.spec | 9 +++++-
2 files changed, 50 insertions(+), 1 deletion(-)
create mode 100644 0003-curl-7.64.0-cookie-segfault.patch
diff --git a/0003-curl-7.64.0-cookie-segfault.patch b/0003-curl-7.64.0-cookie-segfault.patch
new file mode 100644
index 0000000..9539efa
--- /dev/null
+++ b/0003-curl-7.64.0-cookie-segfault.patch
@@ -0,0 +1,42 @@
+From d73dc8d3e70bde0ef999ecf7bcd5585b9892371c Mon Sep 17 00:00:00 2001
+From: Michael Wallner
+Date: Mon, 25 Feb 2019 19:05:02 +0100
+Subject: [PATCH] cookies: fix NULL dereference if flushing cookies with no
+ CookieInfo set
+
+Regression brought by a52e46f3900fb0 (shipped in 7.63.0)
+
+Closes #3613
+
+Upstream-commit: 8eddb8f4259193633cfc95a42603958a89b31de5
+Signed-off-by: Kamil Dudka
+---
+ lib/cookie.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/cookie.c b/lib/cookie.c
+index 4fb992a..d535170 100644
+--- a/lib/cookie.c
++++ b/lib/cookie.c
+@@ -1504,7 +1504,8 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere)
+ struct Cookie **array;
+
+ /* at first, remove expired cookies */
+- remove_expired(c);
++ if(c)
++ remove_expired(c);
+
+ if(!strcmp("-", dumphere)) {
+ /* use stdout */
+@@ -1523,7 +1524,7 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere)
+ "# This file was generated by libcurl! Edit at your own risk.\n\n",
+ out);
+
+- if(c->numcookies) {
++ if(c && c->numcookies) {
+ array = malloc(sizeof(struct Cookie *) * c->numcookies);
+ if(!array) {
+ if(!use_stdout)
+--
+2.17.2
+
diff --git a/curl.spec b/curl.spec
index 834c964..a8292a6 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.64.0
-Release: 3%{?dist}
+Release: 4%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -11,6 +11,9 @@ Patch1: 0001-curl-7.64.0-zsh-completion.patch
# prevent NetworkManager from leaking file descriptors (#1680198)
Patch2: 0002-curl-7.64.0-nm-fd-leak.patch
+# fix NULL dereference if flushing cookies with no CookieInfo set (#1683676)
+Patch3: 0003-curl-7.64.0-cookie-segfault.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -174,6 +177,7 @@ be installed.
# upstream patches
%patch1 -p1
%patch2 -p1
+%patch3 -p1
# Fedora patches
%patch101 -p1
@@ -341,6 +345,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Feb 27 2019 Kamil Dudka - 7.64.0-4
+- fix NULL dereference if flushing cookies with no CookieInfo set (#1683676)
+
* Mon Feb 25 2019 Kamil Dudka - 7.64.0-3
- prevent NetworkManager from leaking file descriptors (#1680198)
From 902ddefeb533ae02d3588bb99d78fb178999da22 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 21 Mar 2019 09:38:52 +0100
Subject: [PATCH 057/260] avoid spurious "Could not resolve host: [host name]"
error messages
---
...-curl-7.64.0-spurious-resolver-error.patch | 118 ++++++++++++++++++
curl.spec | 9 +-
2 files changed, 126 insertions(+), 1 deletion(-)
create mode 100644 0004-curl-7.64.0-spurious-resolver-error.patch
diff --git a/0004-curl-7.64.0-spurious-resolver-error.patch b/0004-curl-7.64.0-spurious-resolver-error.patch
new file mode 100644
index 0000000..3e05ad5
--- /dev/null
+++ b/0004-curl-7.64.0-spurious-resolver-error.patch
@@ -0,0 +1,118 @@
+From 5ddabe85b2e3e4fd08d06980719d71a2aed77a5b Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Thu, 28 Feb 2019 20:34:36 +0100
+Subject: [PATCH] threaded-resolver: shutdown the resolver thread without error
+ message
+
+When a transfer is done, the resolver thread will be brought down. That
+could accidentally generate an error message in the error buffer even
+though this is not an error situationand the transfer would still return
+OK. An application that still reads the error buffer could find a
+"Could not resolve host: [host name]" message there and get confused.
+
+Reported-by: Michael Schmid
+Fixes #3629
+Closes #3630
+
+Upstream-commit: 754ae103989a6ad0869d23a6a427d652b5b4a2fe
+Signed-off-by: Kamil Dudka
+---
+ lib/asyn-thread.c | 68 ++++++++++++++++++++++++++---------------------
+ 1 file changed, 38 insertions(+), 30 deletions(-)
+
+diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
+index a9679d0..55e0811 100644
+--- a/lib/asyn-thread.c
++++ b/lib/asyn-thread.c
+@@ -461,6 +461,42 @@ static CURLcode resolver_error(struct connectdata *conn)
+ return result;
+ }
+
++static CURLcode thread_wait_resolv(struct connectdata *conn,
++ struct Curl_dns_entry **entry,
++ bool report)
++{
++ struct thread_data *td = (struct thread_data*) conn->async.os_specific;
++ CURLcode result = CURLE_OK;
++
++ DEBUGASSERT(conn && td);
++ DEBUGASSERT(td->thread_hnd != curl_thread_t_null);
++
++ /* wait for the thread to resolve the name */
++ if(Curl_thread_join(&td->thread_hnd)) {
++ if(entry)
++ result = getaddrinfo_complete(conn);
++ }
++ else
++ DEBUGASSERT(0);
++
++ conn->async.done = TRUE;
++
++ if(entry)
++ *entry = conn->async.dns;
++
++ if(!conn->async.dns && report)
++ /* a name was not resolved, report error */
++ result = resolver_error(conn);
++
++ destroy_async_data(&conn->async);
++
++ if(!conn->async.dns && report)
++ connclose(conn, "asynch resolve failed");
++
++ return result;
++}
++
++
+ /*
+ * Until we gain a way to signal the resolver threads to stop early, we must
+ * simply wait for them and ignore their results.
+@@ -473,7 +509,7 @@ void Curl_resolver_kill(struct connectdata *conn)
+ unfortunately. Otherwise, we can simply cancel to clean up any resolver
+ data. */
+ if(td && td->thread_hnd != curl_thread_t_null)
+- (void)Curl_resolver_wait_resolv(conn, NULL);
++ (void)thread_wait_resolv(conn, NULL, FALSE);
+ else
+ Curl_resolver_cancel(conn);
+ }
+@@ -494,35 +530,7 @@ void Curl_resolver_kill(struct connectdata *conn)
+ CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
+ struct Curl_dns_entry **entry)
+ {
+- struct thread_data *td = (struct thread_data*) conn->async.os_specific;
+- CURLcode result = CURLE_OK;
+-
+- DEBUGASSERT(conn && td);
+- DEBUGASSERT(td->thread_hnd != curl_thread_t_null);
+-
+- /* wait for the thread to resolve the name */
+- if(Curl_thread_join(&td->thread_hnd)) {
+- if(entry)
+- result = getaddrinfo_complete(conn);
+- }
+- else
+- DEBUGASSERT(0);
+-
+- conn->async.done = TRUE;
+-
+- if(entry)
+- *entry = conn->async.dns;
+-
+- if(!conn->async.dns)
+- /* a name was not resolved, report error */
+- result = resolver_error(conn);
+-
+- destroy_async_data(&conn->async);
+-
+- if(!conn->async.dns)
+- connclose(conn, "asynch resolve failed");
+-
+- return result;
++ return thread_wait_resolv(conn, entry, TRUE);
+ }
+
+ /*
+--
+2.17.2
+
diff --git a/curl.spec b/curl.spec
index a8292a6..bed6823 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.64.0
-Release: 4%{?dist}
+Release: 5%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -14,6 +14,9 @@ Patch2: 0002-curl-7.64.0-nm-fd-leak.patch
# fix NULL dereference if flushing cookies with no CookieInfo set (#1683676)
Patch3: 0003-curl-7.64.0-cookie-segfault.patch
+# avoid spurious "Could not resolve host: [host name]" error messages
+Patch4: 0004-curl-7.64.0-spurious-resolver-error.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -178,6 +181,7 @@ be installed.
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
# Fedora patches
%patch101 -p1
@@ -345,6 +349,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Mar 21 2019 Kamil Dudka - 7.64.0-5
+- avoid spurious "Could not resolve host: [host name]" error messages
+
* Wed Feb 27 2019 Kamil Dudka - 7.64.0-4
- fix NULL dereference if flushing cookies with no CookieInfo set (#1683676)
From 7594f15bcee986a1946575804b33fabc35d43792 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 25 Mar 2019 12:35:52 +0100
Subject: [PATCH 058/260] Related: #1690971 - remove verbose "Expire in" ...
messages
---
0005-curl-7.64.0-expire-in-verbose-msgs.patch | 32 +++++++++++++++++++
curl.spec | 9 +++++-
2 files changed, 40 insertions(+), 1 deletion(-)
create mode 100644 0005-curl-7.64.0-expire-in-verbose-msgs.patch
diff --git a/0005-curl-7.64.0-expire-in-verbose-msgs.patch b/0005-curl-7.64.0-expire-in-verbose-msgs.patch
new file mode 100644
index 0000000..43d3573
--- /dev/null
+++ b/0005-curl-7.64.0-expire-in-verbose-msgs.patch
@@ -0,0 +1,32 @@
+From 2e8f4d01cdd07779e0582257cb6b53c5a91d6504 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Mon, 11 Feb 2019 22:57:33 +0100
+Subject: [PATCH] multi: remove verbose "Expire in" ... messages
+
+Reported-by: James Brown
+Bug: https://curl.haxx.se/mail/archive-2019-02/0013.html
+Closes #3558
+
+Upstream-commit: aabc7ae5ecf70973add429b5acbc86d6a57e4da5
+Signed-off-by: Kamil Dudka
+---
+ lib/multi.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/lib/multi.c b/lib/multi.c
+index 28f4c47..856cc22 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -3028,9 +3028,6 @@ void Curl_expire(struct Curl_easy *data, time_t milli, expire_id id)
+
+ DEBUGASSERT(id < EXPIRE_LAST);
+
+- infof(data, "Expire in %ld ms for %x (transfer %p)\n",
+- (long)milli, id, data);
+-
+ set = Curl_now();
+ set.tv_sec += milli/1000;
+ set.tv_usec += (unsigned int)(milli%1000)*1000;
+--
+2.17.2
+
diff --git a/curl.spec b/curl.spec
index bed6823..d504c23 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.64.0
-Release: 5%{?dist}
+Release: 6%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -17,6 +17,9 @@ Patch3: 0003-curl-7.64.0-cookie-segfault.patch
# avoid spurious "Could not resolve host: [host name]" error messages
Patch4: 0004-curl-7.64.0-spurious-resolver-error.patch
+# remove verbose "Expire in" ... messages (#1690971)
+Patch5: 0005-curl-7.64.0-expire-in-verbose-msgs.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -182,6 +185,7 @@ be installed.
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
# Fedora patches
%patch101 -p1
@@ -349,6 +353,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Mon Mar 25 2019 Kamil Dudka - 7.64.0-6
+- remove verbose "Expire in" ... messages (#1690971)
+
* Wed Mar 21 2019 Kamil Dudka - 7.64.0-5
- avoid spurious "Could not resolve host: [host name]" error messages
From 0ed971f14f1e1a245d738142d3cd2b3489bc1008 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 25 Mar 2019 12:39:00 +0100
Subject: [PATCH 059/260] fix last but one change log entry
---
curl.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index d504c23..6cf125f 100644
--- a/curl.spec
+++ b/curl.spec
@@ -356,7 +356,7 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
* Mon Mar 25 2019 Kamil Dudka - 7.64.0-6
- remove verbose "Expire in" ... messages (#1690971)
-* Wed Mar 21 2019 Kamil Dudka - 7.64.0-5
+* Thu Mar 21 2019 Kamil Dudka - 7.64.0-5
- avoid spurious "Could not resolve host: [host name]" error messages
* Wed Feb 27 2019 Kamil Dudka - 7.64.0-4
From bbad3e0a620be7f54fd5e9af7570cab24a6a233d Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 27 Mar 2019 10:33:41 +0100
Subject: [PATCH 060/260] new upstream release - 7.64.1
---
0001-curl-7.64.0-zsh-completion.patch | 76 --------
0002-curl-7.64.0-nm-fd-leak.patch | 162 ------------------
0003-curl-7.64.0-cookie-segfault.patch | 42 -----
...-curl-7.64.0-spurious-resolver-error.patch | 118 -------------
0005-curl-7.64.0-expire-in-verbose-msgs.patch | 32 ----
0102-curl-7.36.0-debug.patch | 2 +-
0104-curl-7.19.7-localhost6.patch | 4 +-
0105-curl-7.63.0-lib1560-valgrind.patch | 2 +-
curl-7.64.0.tar.xz.asc | 11 --
curl-7.64.1.tar.xz.asc | 11 ++
curl.spec | 45 ++---
sources | 2 +-
12 files changed, 34 insertions(+), 473 deletions(-)
delete mode 100644 0001-curl-7.64.0-zsh-completion.patch
delete mode 100644 0002-curl-7.64.0-nm-fd-leak.patch
delete mode 100644 0003-curl-7.64.0-cookie-segfault.patch
delete mode 100644 0004-curl-7.64.0-spurious-resolver-error.patch
delete mode 100644 0005-curl-7.64.0-expire-in-verbose-msgs.patch
delete mode 100644 curl-7.64.0.tar.xz.asc
create mode 100644 curl-7.64.1.tar.xz.asc
diff --git a/0001-curl-7.64.0-zsh-completion.patch b/0001-curl-7.64.0-zsh-completion.patch
deleted file mode 100644
index 770a15b..0000000
--- a/0001-curl-7.64.0-zsh-completion.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 082034e2334b2d0795b2b324ff3e0635bb7d2b86 Mon Sep 17 00:00:00 2001
-From: Alessandro Ghedini
-Date: Tue, 5 Feb 2019 20:44:14 +0000
-Subject: [PATCH 1/2] zsh.pl: update regex to better match curl -h output
-
-The current regex fails to match '<...>' arguments properly (e.g. those
-with spaces in them), which causes an completion script with wrong
-descriptions for some options.
-
-The problem can be reproduced as follows:
-
-% curl --reso
-
-Upstream-commit: dbd32f3241b297b96ee11a51da1a661f528ca026
-Signed-off-by: Kamil Dudka
----
- scripts/zsh.pl | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scripts/zsh.pl b/scripts/zsh.pl
-index 1257190..941b322 100755
---- a/scripts/zsh.pl
-+++ b/scripts/zsh.pl
-@@ -7,7 +7,7 @@ use warnings;
-
- my $curl = $ARGV[0] || 'curl';
-
--my $regex = '\s+(?:(-[^\s]+),\s)?(--[^\s]+)\s([^\s.]+)?\s+(.*)';
-+my $regex = '\s+(?:(-[^\s]+),\s)?(--[^\s]+)\s*(\<.+?\>)?\s+(.*)';
- my @opts = parse_main_opts('--help', $regex);
-
- my $opts_str;
---
-2.17.2
-
-
-From 45abc785e101346f19599aa5f9fa1617e525ec4d Mon Sep 17 00:00:00 2001
-From: Alessandro Ghedini
-Date: Tue, 5 Feb 2019 21:06:26 +0000
-Subject: [PATCH 2/2] zsh.pl: escape ':' character
-
-':' is interpreted as separator by zsh, so if used as part of the argument
-or option's description it needs to be escaped.
-
-The problem can be reproduced as follows:
-
-% curl -E
-
-Bug: https://bugs.debian.org/921452
-
-Upstream-commit: b3cc8017b7364f588365be2b2629c49c142efdb7
-Signed-off-by: Kamil Dudka
----
- scripts/zsh.pl | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/scripts/zsh.pl b/scripts/zsh.pl
-index 941b322..0f9cbec 100755
---- a/scripts/zsh.pl
-+++ b/scripts/zsh.pl
-@@ -45,9 +45,12 @@ sub parse_main_opts {
-
- my $option = '';
-
-+ $arg =~ s/\:/\\\:/g if defined $arg;
-+
- $desc =~ s/'/'\\''/g if defined $desc;
- $desc =~ s/\[/\\\[/g if defined $desc;
- $desc =~ s/\]/\\\]/g if defined $desc;
-+ $desc =~ s/\:/\\\:/g if defined $desc;
-
- $option .= '{' . trim($short) . ',' if defined $short;
- $option .= trim($long) if defined $long;
---
-2.17.2
-
diff --git a/0002-curl-7.64.0-nm-fd-leak.patch b/0002-curl-7.64.0-nm-fd-leak.patch
deleted file mode 100644
index 681e58f..0000000
--- a/0002-curl-7.64.0-nm-fd-leak.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 377101f138873bfa481785cb7d04c326006f0b5d Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Mon, 11 Feb 2019 07:56:00 +0100
-Subject: [PATCH 1/3] connection_check: set ->data to the transfer doing the
- check
-
-The http2 code for connection checking needs a transfer to use. Make
-sure a working one is set before handler->connection_check() is called.
-
-Reported-by: jnbr on github
-Fixes #3541
-Closes #3547
-
-Upstream-commit: 38d8e1bd4ed1ae52930ae466ecbac78e888b142f
-Signed-off-by: Kamil Dudka
----
- lib/url.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/url.c b/lib/url.c
-index d5a9820..229c655 100644
---- a/lib/url.c
-+++ b/lib/url.c
-@@ -965,6 +965,7 @@ static bool extract_if_dead(struct connectdata *conn,
- /* The protocol has a special method for checking the state of the
- connection. Use it to check if the connection is dead. */
- unsigned int state;
-+ conn->data = data; /* use this transfer for now */
- state = conn->handler->connection_check(conn, CONNCHECK_ISDEAD);
- dead = (state & CONNRESULT_DEAD);
- }
---
-2.17.2
-
-
-From 287f5d70395b3833f8901a57b29a48b87d84a9fe Mon Sep 17 00:00:00 2001
-From: Jay Satiro
-Date: Mon, 11 Feb 2019 23:00:00 -0500
-Subject: [PATCH 2/3] connection_check: restore original conn->data after the
- check
-
-- Save the original conn->data before it's changed to the specified
- data transfer for the connection check and then restore it afterwards.
-
-This is a follow-up to 38d8e1b 2019-02-11.
-
-History:
-
-It was discovered a month ago that before checking whether to extract a
-dead connection that that connection should be associated with a "live"
-transfer for the check (ie original conn->data ignored and set to the
-passed in data). A fix was landed in 54b201b which did that and also
-cleared conn->data after the check. The original conn->data was not
-restored, so presumably it was thought that a valid conn->data was no
-longer needed.
-
-Several days later it was discovered that a valid conn->data was needed
-after the check and follow-up fix was landed in bbae24c which partially
-reverted the original fix and attempted to limit the scope of when
-conn->data was changed to only when pruning dead connections. In that
-case conn->data was not cleared and the original conn->data not
-restored.
-
-A month later it was discovered that the original fix was somewhat
-correct; a "live" transfer is needed for the check in all cases
-because original conn->data could be null which could cause a bad deref
-at arbitrary points in the check. A fix was landed in 38d8e1b which
-expanded the scope to all cases. conn->data was not cleared and the
-original conn->data not restored.
-
-A day later it was discovered that not restoring the original conn->data
-may lead to busy loops in applications that use the event interface, and
-given this observation it's a pretty safe assumption that there is some
-code path that still needs the original conn->data. This commit is the
-follow-up fix for that, it restores the original conn->data after the
-connection check.
-
-Assisted-by: tholin@users.noreply.github.com
-Reported-by: tholin@users.noreply.github.com
-
-Fixes https://github.com/curl/curl/issues/3542
-Closes #3559
-
-Upstream-commit: 4015fae044ce52a639c9358e22a9e948f287c89f
-Signed-off-by: Kamil Dudka
----
- lib/url.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/lib/url.c b/lib/url.c
-index 229c655..a77e92d 100644
---- a/lib/url.c
-+++ b/lib/url.c
-@@ -965,8 +965,10 @@ static bool extract_if_dead(struct connectdata *conn,
- /* The protocol has a special method for checking the state of the
- connection. Use it to check if the connection is dead. */
- unsigned int state;
-+ struct Curl_easy *olddata = conn->data;
- conn->data = data; /* use this transfer for now */
- state = conn->handler->connection_check(conn, CONNCHECK_ISDEAD);
-+ conn->data = olddata;
- dead = (state & CONNRESULT_DEAD);
- }
- else {
-@@ -995,7 +997,6 @@ struct prunedead {
- static int call_extract_if_dead(struct connectdata *conn, void *param)
- {
- struct prunedead *p = (struct prunedead *)param;
-- conn->data = p->data; /* transfer to use for this check */
- if(extract_if_dead(conn, p->data)) {
- /* stop the iteration here, pass back the connection that was extracted */
- p->extracted = conn;
---
-2.17.2
-
-
-From 15e3f2eef87bff1210f43921cb15f03c68be59f7 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Tue, 19 Feb 2019 15:56:54 +0100
-Subject: [PATCH 3/3] singlesocket: fix the 'sincebefore' placement
-
-The variable wasn't properly reset within the loop and thus could remain
-set for sockets that hadn't been set before and miss notifying the app.
-
-This is a follow-up to 4c35574 (shipped in curl 7.64.0)
-
-Reported-by: buzo-ffm on github
-Detected-by: Jan Alexander Steffens
-Fixes #3585
-Closes #3589
-
-Upstream-commit: afc00e047c773faeaa60a5f86a246cbbeeba5819
-Signed-off-by: Kamil Dudka
----
- lib/multi.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/lib/multi.c b/lib/multi.c
-index 130226f..28f4c47 100644
---- a/lib/multi.c
-+++ b/lib/multi.c
-@@ -2360,8 +2360,6 @@ static CURLMcode singlesocket(struct Curl_multi *multi,
- int num;
- unsigned int curraction;
- int actions[MAX_SOCKSPEREASYHANDLE];
-- unsigned int comboaction;
-- bool sincebefore = FALSE;
-
- for(i = 0; i< MAX_SOCKSPEREASYHANDLE; i++)
- socks[i] = CURL_SOCKET_BAD;
-@@ -2380,6 +2378,8 @@ static CURLMcode singlesocket(struct Curl_multi *multi,
- i++) {
- unsigned int action = CURL_POLL_NONE;
- unsigned int prevaction = 0;
-+ unsigned int comboaction;
-+ bool sincebefore = FALSE;
-
- s = socks[i];
-
---
-2.17.2
-
diff --git a/0003-curl-7.64.0-cookie-segfault.patch b/0003-curl-7.64.0-cookie-segfault.patch
deleted file mode 100644
index 9539efa..0000000
--- a/0003-curl-7.64.0-cookie-segfault.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From d73dc8d3e70bde0ef999ecf7bcd5585b9892371c Mon Sep 17 00:00:00 2001
-From: Michael Wallner
-Date: Mon, 25 Feb 2019 19:05:02 +0100
-Subject: [PATCH] cookies: fix NULL dereference if flushing cookies with no
- CookieInfo set
-
-Regression brought by a52e46f3900fb0 (shipped in 7.63.0)
-
-Closes #3613
-
-Upstream-commit: 8eddb8f4259193633cfc95a42603958a89b31de5
-Signed-off-by: Kamil Dudka
----
- lib/cookie.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/lib/cookie.c b/lib/cookie.c
-index 4fb992a..d535170 100644
---- a/lib/cookie.c
-+++ b/lib/cookie.c
-@@ -1504,7 +1504,8 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere)
- struct Cookie **array;
-
- /* at first, remove expired cookies */
-- remove_expired(c);
-+ if(c)
-+ remove_expired(c);
-
- if(!strcmp("-", dumphere)) {
- /* use stdout */
-@@ -1523,7 +1524,7 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere)
- "# This file was generated by libcurl! Edit at your own risk.\n\n",
- out);
-
-- if(c->numcookies) {
-+ if(c && c->numcookies) {
- array = malloc(sizeof(struct Cookie *) * c->numcookies);
- if(!array) {
- if(!use_stdout)
---
-2.17.2
-
diff --git a/0004-curl-7.64.0-spurious-resolver-error.patch b/0004-curl-7.64.0-spurious-resolver-error.patch
deleted file mode 100644
index 3e05ad5..0000000
--- a/0004-curl-7.64.0-spurious-resolver-error.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 5ddabe85b2e3e4fd08d06980719d71a2aed77a5b Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Thu, 28 Feb 2019 20:34:36 +0100
-Subject: [PATCH] threaded-resolver: shutdown the resolver thread without error
- message
-
-When a transfer is done, the resolver thread will be brought down. That
-could accidentally generate an error message in the error buffer even
-though this is not an error situationand the transfer would still return
-OK. An application that still reads the error buffer could find a
-"Could not resolve host: [host name]" message there and get confused.
-
-Reported-by: Michael Schmid
-Fixes #3629
-Closes #3630
-
-Upstream-commit: 754ae103989a6ad0869d23a6a427d652b5b4a2fe
-Signed-off-by: Kamil Dudka
----
- lib/asyn-thread.c | 68 ++++++++++++++++++++++++++---------------------
- 1 file changed, 38 insertions(+), 30 deletions(-)
-
-diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
-index a9679d0..55e0811 100644
---- a/lib/asyn-thread.c
-+++ b/lib/asyn-thread.c
-@@ -461,6 +461,42 @@ static CURLcode resolver_error(struct connectdata *conn)
- return result;
- }
-
-+static CURLcode thread_wait_resolv(struct connectdata *conn,
-+ struct Curl_dns_entry **entry,
-+ bool report)
-+{
-+ struct thread_data *td = (struct thread_data*) conn->async.os_specific;
-+ CURLcode result = CURLE_OK;
-+
-+ DEBUGASSERT(conn && td);
-+ DEBUGASSERT(td->thread_hnd != curl_thread_t_null);
-+
-+ /* wait for the thread to resolve the name */
-+ if(Curl_thread_join(&td->thread_hnd)) {
-+ if(entry)
-+ result = getaddrinfo_complete(conn);
-+ }
-+ else
-+ DEBUGASSERT(0);
-+
-+ conn->async.done = TRUE;
-+
-+ if(entry)
-+ *entry = conn->async.dns;
-+
-+ if(!conn->async.dns && report)
-+ /* a name was not resolved, report error */
-+ result = resolver_error(conn);
-+
-+ destroy_async_data(&conn->async);
-+
-+ if(!conn->async.dns && report)
-+ connclose(conn, "asynch resolve failed");
-+
-+ return result;
-+}
-+
-+
- /*
- * Until we gain a way to signal the resolver threads to stop early, we must
- * simply wait for them and ignore their results.
-@@ -473,7 +509,7 @@ void Curl_resolver_kill(struct connectdata *conn)
- unfortunately. Otherwise, we can simply cancel to clean up any resolver
- data. */
- if(td && td->thread_hnd != curl_thread_t_null)
-- (void)Curl_resolver_wait_resolv(conn, NULL);
-+ (void)thread_wait_resolv(conn, NULL, FALSE);
- else
- Curl_resolver_cancel(conn);
- }
-@@ -494,35 +530,7 @@ void Curl_resolver_kill(struct connectdata *conn)
- CURLcode Curl_resolver_wait_resolv(struct connectdata *conn,
- struct Curl_dns_entry **entry)
- {
-- struct thread_data *td = (struct thread_data*) conn->async.os_specific;
-- CURLcode result = CURLE_OK;
--
-- DEBUGASSERT(conn && td);
-- DEBUGASSERT(td->thread_hnd != curl_thread_t_null);
--
-- /* wait for the thread to resolve the name */
-- if(Curl_thread_join(&td->thread_hnd)) {
-- if(entry)
-- result = getaddrinfo_complete(conn);
-- }
-- else
-- DEBUGASSERT(0);
--
-- conn->async.done = TRUE;
--
-- if(entry)
-- *entry = conn->async.dns;
--
-- if(!conn->async.dns)
-- /* a name was not resolved, report error */
-- result = resolver_error(conn);
--
-- destroy_async_data(&conn->async);
--
-- if(!conn->async.dns)
-- connclose(conn, "asynch resolve failed");
--
-- return result;
-+ return thread_wait_resolv(conn, entry, TRUE);
- }
-
- /*
---
-2.17.2
-
diff --git a/0005-curl-7.64.0-expire-in-verbose-msgs.patch b/0005-curl-7.64.0-expire-in-verbose-msgs.patch
deleted file mode 100644
index 43d3573..0000000
--- a/0005-curl-7.64.0-expire-in-verbose-msgs.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 2e8f4d01cdd07779e0582257cb6b53c5a91d6504 Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Mon, 11 Feb 2019 22:57:33 +0100
-Subject: [PATCH] multi: remove verbose "Expire in" ... messages
-
-Reported-by: James Brown
-Bug: https://curl.haxx.se/mail/archive-2019-02/0013.html
-Closes #3558
-
-Upstream-commit: aabc7ae5ecf70973add429b5acbc86d6a57e4da5
-Signed-off-by: Kamil Dudka
----
- lib/multi.c | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/lib/multi.c b/lib/multi.c
-index 28f4c47..856cc22 100644
---- a/lib/multi.c
-+++ b/lib/multi.c
-@@ -3028,9 +3028,6 @@ void Curl_expire(struct Curl_easy *data, time_t milli, expire_id id)
-
- DEBUGASSERT(id < EXPIRE_LAST);
-
-- infof(data, "Expire in %ld ms for %x (transfer %p)\n",
-- (long)milli, id, data);
--
- set = Curl_now();
- set.tv_sec += milli/1000;
- set.tv_usec += (unsigned int)(milli%1000)*1000;
---
-2.17.2
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 57c05c6..265c3ff 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16250,18 +16250,11 @@ $as_echo "yes" >&6; }
+@@ -16273,18 +16273,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/0104-curl-7.19.7-localhost6.patch b/0104-curl-7.19.7-localhost6.patch
index 4f664d3..caa8bc2 100644
--- a/0104-curl-7.19.7-localhost6.patch
+++ b/0104-curl-7.19.7-localhost6.patch
@@ -14,8 +14,8 @@ index e441278..b0958b6 100644
+-g "http://%HOST6IP:%HTTP6PORT/1083" --interface localhost6
--perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test server host address';} else {exec './server/resolve --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
-+perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test server host address';} else {exec './server/resolve --ipv6 localhost6'; print 'Cannot run precheck resolve';}"
+-perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec './server/resolve --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
++perl -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec './server/resolve --ipv6 localhost6'; print 'Cannot run precheck resolve';}"
diff --git a/0105-curl-7.63.0-lib1560-valgrind.patch b/0105-curl-7.63.0-lib1560-valgrind.patch
index 003655c..84a6ee7 100644
--- a/0105-curl-7.63.0-lib1560-valgrind.patch
+++ b/0105-curl-7.63.0-lib1560-valgrind.patch
@@ -26,7 +26,7 @@ diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 080421b..ea3b806 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
-@@ -521,6 +521,7 @@ lib1558_SOURCES = lib1558.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+@@ -530,6 +530,7 @@ lib1558_SOURCES = lib1558.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1558_LDADD = $(TESTUTIL_LIBS)
lib1560_SOURCES = lib1560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
diff --git a/curl-7.64.0.tar.xz.asc b/curl-7.64.0.tar.xz.asc
deleted file mode 100644
index 21f7542..0000000
--- a/curl-7.64.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlxahccACgkQXMkI/bce
-EsKdrAf+OoNH+Yz1HfJG5MtmEi2sgRC56iAvZBQujPG8SJYGnT3D2nLiuC2+bzA8
-eMCqisodW5f6lV/9JRvLmLS0dhxAfdf/NHlMOdtgSv+NzVGsggpHeYEZ7HucRHsQ
-AKZ6/wx7rby8yZqrn2s7yWWB0qgiajWx30r+CJEYXpuw+YwZ2qZo5ecM7fa/J9ko
-ESwb7BLF6KMkdSz1wSApwCdznB/BXOaPrUBMiOcwO7ftq/t1ZmqnUWLtdlSp8OoH
-Tw832H1kCP2OFHcOFTQmZJLagRQtLBhC522wNsagXaMwak6uhoFApcAPqoPdm4Pm
-PvTO6aAopZk+sX9VemdSQzx/4ysT3w==
-=HOlc
------END PGP SIGNATURE-----
diff --git a/curl-7.64.1.tar.xz.asc b/curl-7.64.1.tar.xz.asc
new file mode 100644
index 0000000..d0dc784
--- /dev/null
+++ b/curl-7.64.1.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlybHwMACgkQXMkI/bce
+EsIlxQf+LUj/zeWzTgxXIFgtfba+RKb66RpWhgzKLBpiGFQjhckILFJ+Li625SE3
+9fCrIslGuY2S4G6fRH1qEIZVglpA185sTeY241/JK788ftJFFQd2GtM/+Ysrla5h
+zc2wD3amDXcROWI+QIl/dBy7xRnW8TSTMu2sEPLarsNtXK9EC+h/WIkeYW1amMf2
+a8vRFwXFZ7OrEiq7A0avvmbrQVgIIGP/zyz44ZN00PPgLm40c1rngHGBJJzEMVSS
+ClZ+wUQ+AyamL3Ls9a+V3SF3IuVrFInjv5Y1OshPULaqL2VxPsCVw67sCVouePMS
+J0u3GZPsE+sVbx7cHCfZFdSnutFBKQ==
+=WUio
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 6cf125f..9ccaff4 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,25 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.64.0
-Release: 6%{?dist}
+Version: 7.64.1
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# make zsh completion work again
-Patch1: 0001-curl-7.64.0-zsh-completion.patch
-
-# prevent NetworkManager from leaking file descriptors (#1680198)
-Patch2: 0002-curl-7.64.0-nm-fd-leak.patch
-
-# fix NULL dereference if flushing cookies with no CookieInfo set (#1683676)
-Patch3: 0003-curl-7.64.0-cookie-segfault.patch
-
-# avoid spurious "Could not resolve host: [host name]" error messages
-Patch4: 0004-curl-7.64.0-spurious-resolver-error.patch
-
-# remove verbose "Expire in" ... messages (#1690971)
-Patch5: 0005-curl-7.64.0-expire-in-verbose-msgs.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -181,11 +166,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
# Fedora patches
%patch101 -p1
@@ -312,6 +292,10 @@ make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install
LD_LIBRARY_PATH="$RPM_BUILD_ROOT%{_libdir}:$LD_LIBRARY_PATH" \
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install -C scripts
+# do not install /usr/share/fish/completions/curl.fish which is also installed
+# by fish-3.0.2-1.module_f31+3716+57207597 and would trigger a conflict
+rm -rf ${RPM_BUILD_ROOT}%{_datadir}/fish
+
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%ldconfig_scriptlets -n libcurl
@@ -319,13 +303,17 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%ldconfig_scriptlets -n libcurl-minimal
%files
-%doc CHANGES README*
-%doc docs/BUGS docs/FAQ docs/FEATURES
-%doc docs/MANUAL docs/RESOURCES
-%doc docs/TheArtOfHttpScripting docs/TODO
+%doc CHANGES
+%doc README
+%doc docs/BUGS
+%doc docs/FAQ
+%doc docs/FEATURES
+%doc docs/RESOURCES
+%doc docs/TODO
+%doc docs/TheArtOfHttpScripting
%{_bindir}/curl
%{_mandir}/man1/curl.1*
-%{_datadir}/zsh/site-functions
+%{_datadir}/zsh
%files -n libcurl
%license COPYING
@@ -353,6 +341,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Mar 27 2019 Kamil Dudka - 7.64.1-1
+- new upstream release
+
* Mon Mar 25 2019 Kamil Dudka - 7.64.0-6
- remove verbose "Expire in" ... messages (#1690971)
diff --git a/sources b/sources
index d5662be..1c4276d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.64.0.tar.xz) = 953f1f5336ce5dfd1b9f933624432d401552d91ee02d39ecde6f023c956f99ec6aae8d7746d7c34b6eb2d6452f114e67da4e64d9c8dd90b7644b7844e7b9b423
+SHA512 (curl-7.64.1.tar.xz) = 1629ba154691bf9d936e0bce69ec8fb54991a40d34bc16ffdfb117f91e3faa93164154fc9ae9043e963955862e69515018673b7239f2fd625684a59cdd1db81c
From 8fd906c5591f06c7eb3be5d0aa182333e6889703 Mon Sep 17 00:00:00 2001
From: Paul Howarth
Date: Fri, 5 Apr 2019 13:38:15 +0100
Subject: [PATCH 061/260] generation of shell completions now needs more perl
stuff
---
curl.spec | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/curl.spec b/curl.spec
index 9ccaff4..347018f 100644
--- a/curl.spec
+++ b/curl.spec
@@ -39,6 +39,7 @@ BuildRequires: openldap-devel
BuildRequires: openssh-clients
BuildRequires: openssh-server
BuildRequires: openssl-devel
+BuildRequires: perl-interpreter
BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: sed
@@ -48,6 +49,12 @@ BuildRequires: zlib-devel
# needed to compress content of tool_hugehelp.c after changing curl.1 man page
BuildRequires: perl(IO::Compress::Gzip)
+# needed for generation of shell completions
+BuildRequires: perl(Getopt::Long)
+BuildRequires: perl(Pod::Usage)
+BuildRequires: perl(strict)
+BuildRequires: perl(warnings)
+
# gnutls-serv is used by the upstream test-suite
BuildRequires: gnutls-utils
@@ -63,10 +70,8 @@ BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Spec)
BuildRequires: perl(IPC::Open2)
BuildRequires: perl(MIME::Base64)
-BuildRequires: perl(strict)
BuildRequires: perl(Time::Local)
BuildRequires: perl(Time::HiRes)
-BuildRequires: perl(warnings)
BuildRequires: perl(vars)
# The test-suite runs automatically through valgrind if valgrind is available
From 9dd5d73f3b1c0fcae0ff35500e09e3c3574b2460 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 9 May 2019 09:59:31 +0200
Subject: [PATCH 062/260] do not treat failure of gss_init_sec_context() with
--negotiate as fatal
This commit fixes a major incompatibility introduced in curl-7.64.1.
Bug: https://github.com/curl/curl/issues/3726
---
...curl-7.64.1-negotiate-without-ticket.patch | 68 +++++++++++++++++++
curl.spec | 9 ++-
2 files changed, 76 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.64.1-negotiate-without-ticket.patch
diff --git a/0001-curl-7.64.1-negotiate-without-ticket.patch b/0001-curl-7.64.1-negotiate-without-ticket.patch
new file mode 100644
index 0000000..125ee54
--- /dev/null
+++ b/0001-curl-7.64.1-negotiate-without-ticket.patch
@@ -0,0 +1,68 @@
+From f7c66081721ac54f68457f07994487f416db383f Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Mon, 6 May 2019 14:16:35 +0200
+Subject: [PATCH] spnego_gssapi: fix return code on gss_init_sec_context()
+ failure
+
+Fixes #3726
+Closes #3849
+
+Upstream-commit: f65845c1eccc02385cdfb22bf2e521e670f7b295
+Signed-off-by: Kamil Dudka
+---
+ lib/vauth/spnego_gssapi.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/vauth/spnego_gssapi.c b/lib/vauth/spnego_gssapi.c
+index 7c4bd4b59..de8bde2ba 100644
+--- a/lib/vauth/spnego_gssapi.c
++++ b/lib/vauth/spnego_gssapi.c
+@@ -170,7 +170,7 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
+ Curl_gss_log_error(data, "gss_init_sec_context() failed: ",
+ major_status, minor_status);
+
+- return CURLE_OUT_OF_MEMORY;
++ return CURLE_LOGIN_DENIED;
+ }
+
+ if(!output_token.value || !output_token.length) {
+--
+2.20.1
+
+From ce0dbcf6f028c84adf4ff3704c04a09d4450a596 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Mon, 6 May 2019 14:32:00 +0200
+Subject: [PATCH] http_negotiate: do not treat failure of
+ gss_init_sec_context() as fatal
+
+Fixes #3726
+Closes #3849
+
+Upstream-commit: f4603708af08f454bca8b74095d0af40a4516512
+Signed-off-by: Kamil Dudka
+---
+ lib/http_negotiate.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
+index 9415236fb..201c3a785 100644
+--- a/lib/http_negotiate.c
++++ b/lib/http_negotiate.c
+@@ -143,7 +143,13 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
+ }
+ if(!neg_ctx->context) {
+ result = Curl_input_negotiate(conn, proxy, "Negotiate");
+- if(result)
++ if(result == CURLE_LOGIN_DENIED) {
++ /* negotiate auth failed, let's continue unauthenticated to stay
++ * compatible with the behavior before curl-7_64_0-158-g6c6035532 */
++ conn->data->state.authproblem = TRUE;
++ return CURLE_OK;
++ }
++ else if(result)
+ return result;
+ }
+
+--
+2.20.1
+
diff --git a/curl.spec b/curl.spec
index 347018f..4f4198d 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.64.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# do not treat failure of gss_init_sec_context() with --negotiate as fatal
+Patch1: 0001-curl-7.64.1-negotiate-without-ticket.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -171,6 +174,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -346,6 +350,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu May 09 2019 Kamil Dudka - 7.64.1-2
+- do not treat failure of gss_init_sec_context() with --negotiate as fatal
+
* Wed Mar 27 2019 Kamil Dudka - 7.64.1-1
- new upstream release
From 3c7950da770ba435d85bfada130f9d0c512df60b Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 22 May 2019 10:37:45 +0200
Subject: [PATCH 063/260] new upstream release - 7.65.0
Resolves: CVE-2019-5436 - TFTP receive buffer overflow
Resolves: CVE-2019-5435 - integer overflows in curl_url_set()
---
...curl-7.64.1-negotiate-without-ticket.patch | 68 -------------------
0105-curl-7.63.0-lib1560-valgrind.patch | 4 +-
curl-7.64.1.tar.xz.asc | 11 ---
curl-7.65.0.tar.xz.asc | 11 +++
curl.spec | 13 ++--
sources | 2 +-
6 files changed, 21 insertions(+), 88 deletions(-)
delete mode 100644 0001-curl-7.64.1-negotiate-without-ticket.patch
delete mode 100644 curl-7.64.1.tar.xz.asc
create mode 100644 curl-7.65.0.tar.xz.asc
diff --git a/0001-curl-7.64.1-negotiate-without-ticket.patch b/0001-curl-7.64.1-negotiate-without-ticket.patch
deleted file mode 100644
index 125ee54..0000000
--- a/0001-curl-7.64.1-negotiate-without-ticket.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From f7c66081721ac54f68457f07994487f416db383f Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Mon, 6 May 2019 14:16:35 +0200
-Subject: [PATCH] spnego_gssapi: fix return code on gss_init_sec_context()
- failure
-
-Fixes #3726
-Closes #3849
-
-Upstream-commit: f65845c1eccc02385cdfb22bf2e521e670f7b295
-Signed-off-by: Kamil Dudka
----
- lib/vauth/spnego_gssapi.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/vauth/spnego_gssapi.c b/lib/vauth/spnego_gssapi.c
-index 7c4bd4b59..de8bde2ba 100644
---- a/lib/vauth/spnego_gssapi.c
-+++ b/lib/vauth/spnego_gssapi.c
-@@ -170,7 +170,7 @@ CURLcode Curl_auth_decode_spnego_message(struct Curl_easy *data,
- Curl_gss_log_error(data, "gss_init_sec_context() failed: ",
- major_status, minor_status);
-
-- return CURLE_OUT_OF_MEMORY;
-+ return CURLE_LOGIN_DENIED;
- }
-
- if(!output_token.value || !output_token.length) {
---
-2.20.1
-
-From ce0dbcf6f028c84adf4ff3704c04a09d4450a596 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Mon, 6 May 2019 14:32:00 +0200
-Subject: [PATCH] http_negotiate: do not treat failure of
- gss_init_sec_context() as fatal
-
-Fixes #3726
-Closes #3849
-
-Upstream-commit: f4603708af08f454bca8b74095d0af40a4516512
-Signed-off-by: Kamil Dudka
----
- lib/http_negotiate.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
-index 9415236fb..201c3a785 100644
---- a/lib/http_negotiate.c
-+++ b/lib/http_negotiate.c
-@@ -143,7 +143,13 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
- }
- if(!neg_ctx->context) {
- result = Curl_input_negotiate(conn, proxy, "Negotiate");
-- if(result)
-+ if(result == CURLE_LOGIN_DENIED) {
-+ /* negotiate auth failed, let's continue unauthenticated to stay
-+ * compatible with the behavior before curl-7_64_0-158-g6c6035532 */
-+ conn->data->state.authproblem = TRUE;
-+ return CURLE_OK;
-+ }
-+ else if(result)
- return result;
- }
-
---
-2.20.1
-
diff --git a/0105-curl-7.63.0-lib1560-valgrind.patch b/0105-curl-7.63.0-lib1560-valgrind.patch
index 84a6ee7..652739c 100644
--- a/0105-curl-7.63.0-lib1560-valgrind.patch
+++ b/0105-curl-7.63.0-lib1560-valgrind.patch
@@ -26,8 +26,8 @@ diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 080421b..ea3b806 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
-@@ -530,6 +530,7 @@ lib1558_SOURCES = lib1558.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
- lib1558_LDADD = $(TESTUTIL_LIBS)
+@@ -528,6 +528,7 @@ lib1559_SOURCES = lib1559.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1559_LDADD = $(TESTUTIL_LIBS)
lib1560_SOURCES = lib1560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1560_CFLAGS = $(AM_CFLAGS) -fno-builtin-strcmp
diff --git a/curl-7.64.1.tar.xz.asc b/curl-7.64.1.tar.xz.asc
deleted file mode 100644
index d0dc784..0000000
--- a/curl-7.64.1.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlybHwMACgkQXMkI/bce
-EsIlxQf+LUj/zeWzTgxXIFgtfba+RKb66RpWhgzKLBpiGFQjhckILFJ+Li625SE3
-9fCrIslGuY2S4G6fRH1qEIZVglpA185sTeY241/JK788ftJFFQd2GtM/+Ysrla5h
-zc2wD3amDXcROWI+QIl/dBy7xRnW8TSTMu2sEPLarsNtXK9EC+h/WIkeYW1amMf2
-a8vRFwXFZ7OrEiq7A0avvmbrQVgIIGP/zyz44ZN00PPgLm40c1rngHGBJJzEMVSS
-ClZ+wUQ+AyamL3Ls9a+V3SF3IuVrFInjv5Y1OshPULaqL2VxPsCVw67sCVouePMS
-J0u3GZPsE+sVbx7cHCfZFdSnutFBKQ==
-=WUio
------END PGP SIGNATURE-----
diff --git a/curl-7.65.0.tar.xz.asc b/curl-7.65.0.tar.xz.asc
new file mode 100644
index 0000000..21f3b0b
--- /dev/null
+++ b/curl-7.65.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlzk438ACgkQXMkI/bce
+EsITWggAgk129Kxp4Br7Nn2+vyygKwv3dDEm87wJVuQka8gT2pZ9ZVQ6rEX9j0sR
+RETf8KrEbSlOBgl2EJpgToL5kgiMCweTXced3VY2szVVibenBa2Zd9MpSl5Sf7hH
+axinhdvEPNH+w8WuprEqZh+d/T5grAxChPJz4bLqKQI5fw5T3IuMfYTjZqx8DkOt
+4FekihWCr6N/nW9BFOz8H19GFtotYSwoPvQJ+RmB7+Zt7ruHjRgyINCgxbWPvs4P
+eZNWykqQ9FaXLSoJQYjLvEx0smye0bxSu3EIYBeL60fiFWJaSHQPyfBgC3JC+dD6
+ufxhEk814I4XzPaRFTLjgzjmTqRMPw==
+=4VIp
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 4f4198d..cb35ee2 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.64.1
-Release: 2%{?dist}
+Version: 7.65.0
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# do not treat failure of gss_init_sec_context() with --negotiate as fatal
-Patch1: 0001-curl-7.64.1-negotiate-without-ticket.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -174,7 +171,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -350,6 +346,11 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed May 22 2019 Kamil Dudka - 7.65.0-1
+- new upstream release, which fixes the following vulnerabilities
+ CVE-2019-5436 - TFTP receive buffer overflow
+ CVE-2019-5435 - integer overflows in curl_url_set()
+
* Thu May 09 2019 Kamil Dudka - 7.64.1-2
- do not treat failure of gss_init_sec_context() with --negotiate as fatal
diff --git a/sources b/sources
index 1c4276d..36347c9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.64.1.tar.xz) = 1629ba154691bf9d936e0bce69ec8fb54991a40d34bc16ffdfb117f91e3faa93164154fc9ae9043e963955862e69515018673b7239f2fd625684a59cdd1db81c
+SHA512 (curl-7.65.0.tar.xz) = 032c065c1d4bd07ba028625f8fab6a09e7cb8505a5f19339b3abdee5a9cda7d091c11f075fe3fc227d082690a66c558c770a4cd9fb17b52acc13794976a770c5
From b6ccff47ac093003674a469ec44541edbd8caaef Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 30 May 2019 15:27:58 +0200
Subject: [PATCH 064/260] Resolves: #1714893 - fix spurious timeout events with
speed-limit
---
0001-curl-7.65.0-speed-limit-timeout.patch | 203 +++++++++++++++++++++
curl.spec | 9 +-
2 files changed, 211 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.65.0-speed-limit-timeout.patch
diff --git a/0001-curl-7.65.0-speed-limit-timeout.patch b/0001-curl-7.65.0-speed-limit-timeout.patch
new file mode 100644
index 0000000..f9e155b
--- /dev/null
+++ b/0001-curl-7.65.0-speed-limit-timeout.patch
@@ -0,0 +1,203 @@
+From f2cc9d8d194c4eef706cb5470bdf6f7483b4e3cf Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Wed, 22 May 2019 23:15:34 +0200
+Subject: [PATCH] Revert "progress: CURL_DISABLE_PROGRESS_METER"
+
+This reverts commit 3b06e68b7734cb10a555f9d7e804dd5d808236a4.
+
+Clearly this change wasn't good enough as it broke CURLOPT_LOW_SPEED_LIMIT +
+CURLOPT_LOW_SPEED_TIME
+
+Reported-by: Dave Reisner
+
+Fixes #3927
+Closes #3928
+
+Upstream-commit: c6b58137237a89081b4efc33ae0ecf7282e40132
+Signed-off-by: Kamil Dudka
+---
+ lib/progress.c | 110 ++++++++++++++++++++++---------------------------
+ 1 file changed, 49 insertions(+), 61 deletions(-)
+
+diff --git a/lib/progress.c b/lib/progress.c
+index f586d59b4..fe9929bb9 100644
+--- a/lib/progress.c
++++ b/lib/progress.c
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -31,7 +31,6 @@
+ /* check rate limits within this many recent milliseconds, at minimum. */
+ #define MIN_RATE_LIMIT_PERIOD 3000
+
+-#ifndef CURL_DISABLE_PROGRESS_METER
+ /* Provide a string that is 2 + 1 + 2 + 1 + 2 = 8 letters long (plus the zero
+ byte) */
+ static void time2str(char *r, curl_off_t seconds)
+@@ -120,7 +119,6 @@ static char *max5data(curl_off_t bytes, char *max5)
+
+ return max5;
+ }
+-#endif
+
+ /*
+
+@@ -364,13 +362,17 @@ void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size)
+ }
+ }
+
+-#ifndef CURL_DISABLE_PROGRESS_METER
+-static void progress_meter(struct connectdata *conn)
++/*
++ * Curl_pgrsUpdate() returns 0 for success or the value returned by the
++ * progress callback!
++ */
++int Curl_pgrsUpdate(struct connectdata *conn)
+ {
+ struct curltime now;
+ curl_off_t timespent;
+ curl_off_t timespent_ms; /* milliseconds */
+ struct Curl_easy *data = conn->data;
++ int nowindex = data->progress.speeder_c% CURR_TIME;
+ bool shownow = FALSE;
+ curl_off_t dl = data->progress.downloaded;
+ curl_off_t ul = data->progress.uploaded;
+@@ -397,9 +399,7 @@ static void progress_meter(struct connectdata *conn)
+ /* Calculations done at most once a second, unless end is reached */
+ if(data->progress.lastshow != now.tv_sec) {
+ int countindex; /* amount of seconds stored in the speeder array */
+- int nowindex = data->progress.speeder_c% CURR_TIME;
+- if(!(data->progress.flags & PGRS_HIDE))
+- shownow = TRUE;
++ shownow = TRUE;
+
+ data->progress.lastshow = now.tv_sec;
+
+@@ -461,12 +461,8 @@ static void progress_meter(struct connectdata *conn)
+ data->progress.ulspeed + data->progress.dlspeed;
+
+ } /* Calculations end */
+- if(!shownow)
+- /* only show the internal progress meter once per second */
+- return;
+- else {
+- /* If there's no external callback set, use internal code to show
+- progress */
++
++ if(!(data->progress.flags & PGRS_HIDE)) {
+ /* progress meter has not been shut off */
+ char max5[6][10];
+ curl_off_t dlpercen = 0;
+@@ -481,6 +477,42 @@ static void progress_meter(struct connectdata *conn)
+ curl_off_t dlestimate = 0;
+ curl_off_t total_estimate;
+
++ if(data->set.fxferinfo) {
++ int result;
++ /* There's a callback set, call that */
++ Curl_set_in_callback(data, true);
++ result = data->set.fxferinfo(data->set.progress_client,
++ data->progress.size_dl,
++ data->progress.downloaded,
++ data->progress.size_ul,
++ data->progress.uploaded);
++ Curl_set_in_callback(data, false);
++ if(result)
++ failf(data, "Callback aborted");
++ return result;
++ }
++ if(data->set.fprogress) {
++ int result;
++ /* The older deprecated callback is set, call that */
++ Curl_set_in_callback(data, true);
++ result = data->set.fprogress(data->set.progress_client,
++ (double)data->progress.size_dl,
++ (double)data->progress.downloaded,
++ (double)data->progress.size_ul,
++ (double)data->progress.uploaded);
++ Curl_set_in_callback(data, false);
++ if(result)
++ failf(data, "Callback aborted");
++ return result;
++ }
++
++ if(!shownow)
++ /* only show the internal progress meter once per second */
++ return 0;
++
++ /* If there's no external callback set, use internal code to show
++ progress */
++
+ if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
+ if(data->state.resume_from) {
+ fprintf(data->set.err,
+@@ -563,57 +595,13 @@ static void progress_meter(struct connectdata *conn)
+ time_total, /* 8 letters */ /* total time */
+ time_spent, /* 8 letters */ /* time spent */
+ time_left, /* 8 letters */ /* time left */
+- max5data(data->progress.current_speed, max5[5])
+- );
++ max5data(data->progress.current_speed, max5[5]) /* current speed */
++ );
+
+ /* we flush the output stream to make it appear as soon as possible */
+ fflush(data->set.err);
+- } /* don't show now */
+-}
+-#else
+- /* progress bar disabled */
+-#define progress_meter(x)
+-#endif
+-
+
+-/*
+- * Curl_pgrsUpdate() returns 0 for success or the value returned by the
+- * progress callback!
+- */
+-int Curl_pgrsUpdate(struct connectdata *conn)
+-{
+- struct Curl_easy *data = conn->data;
+- if(!(data->progress.flags & PGRS_HIDE)) {
+- if(data->set.fxferinfo) {
+- int result;
+- /* There's a callback set, call that */
+- Curl_set_in_callback(data, true);
+- result = data->set.fxferinfo(data->set.progress_client,
+- data->progress.size_dl,
+- data->progress.downloaded,
+- data->progress.size_ul,
+- data->progress.uploaded);
+- Curl_set_in_callback(data, false);
+- if(result)
+- failf(data, "Callback aborted");
+- return result;
+- }
+- if(data->set.fprogress) {
+- int result;
+- /* The older deprecated callback is set, call that */
+- Curl_set_in_callback(data, true);
+- result = data->set.fprogress(data->set.progress_client,
+- (double)data->progress.size_dl,
+- (double)data->progress.downloaded,
+- (double)data->progress.size_ul,
+- (double)data->progress.uploaded);
+- Curl_set_in_callback(data, false);
+- if(result)
+- failf(data, "Callback aborted");
+- return result;
+- }
+- }
+- progress_meter(conn);
++ } /* !(data->progress.flags & PGRS_HIDE) */
+
+ return 0;
+ }
+--
+2.20.1
+
diff --git a/curl.spec b/curl.spec
index cb35ee2..79eb8a9 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.65.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# fix spurious timeout events with speed-limit (#1714893)
+Patch1: 0001-curl-7.65.0-speed-limit-timeout.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -171,6 +174,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -346,6 +350,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu May 30 2019 Kamil Dudka - 7.65.0-2
+- fix spurious timeout events with speed-limit (#1714893)
+
* Wed May 22 2019 Kamil Dudka - 7.65.0-1
- new upstream release, which fixes the following vulnerabilities
CVE-2019-5436 - TFTP receive buffer overflow
From 901da63160e081c2f0b4b2dce8b8afc2026e2431 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 5 Jun 2019 09:30:50 +0200
Subject: [PATCH 065/260] new upstream release - 7.65.1
---
0001-curl-7.65.0-speed-limit-timeout.patch | 203 ---------------------
0102-curl-7.36.0-debug.patch | 2 +-
curl-7.65.0.tar.xz.asc | 11 --
curl-7.65.1.tar.xz.asc | 11 ++
curl.spec | 11 +-
sources | 2 +-
6 files changed, 18 insertions(+), 222 deletions(-)
delete mode 100644 0001-curl-7.65.0-speed-limit-timeout.patch
delete mode 100644 curl-7.65.0.tar.xz.asc
create mode 100644 curl-7.65.1.tar.xz.asc
diff --git a/0001-curl-7.65.0-speed-limit-timeout.patch b/0001-curl-7.65.0-speed-limit-timeout.patch
deleted file mode 100644
index f9e155b..0000000
--- a/0001-curl-7.65.0-speed-limit-timeout.patch
+++ /dev/null
@@ -1,203 +0,0 @@
-From f2cc9d8d194c4eef706cb5470bdf6f7483b4e3cf Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Wed, 22 May 2019 23:15:34 +0200
-Subject: [PATCH] Revert "progress: CURL_DISABLE_PROGRESS_METER"
-
-This reverts commit 3b06e68b7734cb10a555f9d7e804dd5d808236a4.
-
-Clearly this change wasn't good enough as it broke CURLOPT_LOW_SPEED_LIMIT +
-CURLOPT_LOW_SPEED_TIME
-
-Reported-by: Dave Reisner
-
-Fixes #3927
-Closes #3928
-
-Upstream-commit: c6b58137237a89081b4efc33ae0ecf7282e40132
-Signed-off-by: Kamil Dudka
----
- lib/progress.c | 110 ++++++++++++++++++++++---------------------------
- 1 file changed, 49 insertions(+), 61 deletions(-)
-
-diff --git a/lib/progress.c b/lib/progress.c
-index f586d59b4..fe9929bb9 100644
---- a/lib/progress.c
-+++ b/lib/progress.c
-@@ -5,7 +5,7 @@
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
-- * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
-+ * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
-@@ -31,7 +31,6 @@
- /* check rate limits within this many recent milliseconds, at minimum. */
- #define MIN_RATE_LIMIT_PERIOD 3000
-
--#ifndef CURL_DISABLE_PROGRESS_METER
- /* Provide a string that is 2 + 1 + 2 + 1 + 2 = 8 letters long (plus the zero
- byte) */
- static void time2str(char *r, curl_off_t seconds)
-@@ -120,7 +119,6 @@ static char *max5data(curl_off_t bytes, char *max5)
-
- return max5;
- }
--#endif
-
- /*
-
-@@ -364,13 +362,17 @@ void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size)
- }
- }
-
--#ifndef CURL_DISABLE_PROGRESS_METER
--static void progress_meter(struct connectdata *conn)
-+/*
-+ * Curl_pgrsUpdate() returns 0 for success or the value returned by the
-+ * progress callback!
-+ */
-+int Curl_pgrsUpdate(struct connectdata *conn)
- {
- struct curltime now;
- curl_off_t timespent;
- curl_off_t timespent_ms; /* milliseconds */
- struct Curl_easy *data = conn->data;
-+ int nowindex = data->progress.speeder_c% CURR_TIME;
- bool shownow = FALSE;
- curl_off_t dl = data->progress.downloaded;
- curl_off_t ul = data->progress.uploaded;
-@@ -397,9 +399,7 @@ static void progress_meter(struct connectdata *conn)
- /* Calculations done at most once a second, unless end is reached */
- if(data->progress.lastshow != now.tv_sec) {
- int countindex; /* amount of seconds stored in the speeder array */
-- int nowindex = data->progress.speeder_c% CURR_TIME;
-- if(!(data->progress.flags & PGRS_HIDE))
-- shownow = TRUE;
-+ shownow = TRUE;
-
- data->progress.lastshow = now.tv_sec;
-
-@@ -461,12 +461,8 @@ static void progress_meter(struct connectdata *conn)
- data->progress.ulspeed + data->progress.dlspeed;
-
- } /* Calculations end */
-- if(!shownow)
-- /* only show the internal progress meter once per second */
-- return;
-- else {
-- /* If there's no external callback set, use internal code to show
-- progress */
-+
-+ if(!(data->progress.flags & PGRS_HIDE)) {
- /* progress meter has not been shut off */
- char max5[6][10];
- curl_off_t dlpercen = 0;
-@@ -481,6 +477,42 @@ static void progress_meter(struct connectdata *conn)
- curl_off_t dlestimate = 0;
- curl_off_t total_estimate;
-
-+ if(data->set.fxferinfo) {
-+ int result;
-+ /* There's a callback set, call that */
-+ Curl_set_in_callback(data, true);
-+ result = data->set.fxferinfo(data->set.progress_client,
-+ data->progress.size_dl,
-+ data->progress.downloaded,
-+ data->progress.size_ul,
-+ data->progress.uploaded);
-+ Curl_set_in_callback(data, false);
-+ if(result)
-+ failf(data, "Callback aborted");
-+ return result;
-+ }
-+ if(data->set.fprogress) {
-+ int result;
-+ /* The older deprecated callback is set, call that */
-+ Curl_set_in_callback(data, true);
-+ result = data->set.fprogress(data->set.progress_client,
-+ (double)data->progress.size_dl,
-+ (double)data->progress.downloaded,
-+ (double)data->progress.size_ul,
-+ (double)data->progress.uploaded);
-+ Curl_set_in_callback(data, false);
-+ if(result)
-+ failf(data, "Callback aborted");
-+ return result;
-+ }
-+
-+ if(!shownow)
-+ /* only show the internal progress meter once per second */
-+ return 0;
-+
-+ /* If there's no external callback set, use internal code to show
-+ progress */
-+
- if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
- if(data->state.resume_from) {
- fprintf(data->set.err,
-@@ -563,57 +595,13 @@ static void progress_meter(struct connectdata *conn)
- time_total, /* 8 letters */ /* total time */
- time_spent, /* 8 letters */ /* time spent */
- time_left, /* 8 letters */ /* time left */
-- max5data(data->progress.current_speed, max5[5])
-- );
-+ max5data(data->progress.current_speed, max5[5]) /* current speed */
-+ );
-
- /* we flush the output stream to make it appear as soon as possible */
- fflush(data->set.err);
-- } /* don't show now */
--}
--#else
-- /* progress bar disabled */
--#define progress_meter(x)
--#endif
--
-
--/*
-- * Curl_pgrsUpdate() returns 0 for success or the value returned by the
-- * progress callback!
-- */
--int Curl_pgrsUpdate(struct connectdata *conn)
--{
-- struct Curl_easy *data = conn->data;
-- if(!(data->progress.flags & PGRS_HIDE)) {
-- if(data->set.fxferinfo) {
-- int result;
-- /* There's a callback set, call that */
-- Curl_set_in_callback(data, true);
-- result = data->set.fxferinfo(data->set.progress_client,
-- data->progress.size_dl,
-- data->progress.downloaded,
-- data->progress.size_ul,
-- data->progress.uploaded);
-- Curl_set_in_callback(data, false);
-- if(result)
-- failf(data, "Callback aborted");
-- return result;
-- }
-- if(data->set.fprogress) {
-- int result;
-- /* The older deprecated callback is set, call that */
-- Curl_set_in_callback(data, true);
-- result = data->set.fprogress(data->set.progress_client,
-- (double)data->progress.size_dl,
-- (double)data->progress.downloaded,
-- (double)data->progress.size_ul,
-- (double)data->progress.uploaded);
-- Curl_set_in_callback(data, false);
-- if(result)
-- failf(data, "Callback aborted");
-- return result;
-- }
-- }
-- progress_meter(conn);
-+ } /* !(data->progress.flags & PGRS_HIDE) */
-
- return 0;
- }
---
-2.20.1
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 265c3ff..e757b9d 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16273,18 +16273,11 @@ $as_echo "yes" >&6; }
+@@ -16268,18 +16268,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/curl-7.65.0.tar.xz.asc b/curl-7.65.0.tar.xz.asc
deleted file mode 100644
index 21f3b0b..0000000
--- a/curl-7.65.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlzk438ACgkQXMkI/bce
-EsITWggAgk129Kxp4Br7Nn2+vyygKwv3dDEm87wJVuQka8gT2pZ9ZVQ6rEX9j0sR
-RETf8KrEbSlOBgl2EJpgToL5kgiMCweTXced3VY2szVVibenBa2Zd9MpSl5Sf7hH
-axinhdvEPNH+w8WuprEqZh+d/T5grAxChPJz4bLqKQI5fw5T3IuMfYTjZqx8DkOt
-4FekihWCr6N/nW9BFOz8H19GFtotYSwoPvQJ+RmB7+Zt7ruHjRgyINCgxbWPvs4P
-eZNWykqQ9FaXLSoJQYjLvEx0smye0bxSu3EIYBeL60fiFWJaSHQPyfBgC3JC+dD6
-ufxhEk814I4XzPaRFTLjgzjmTqRMPw==
-=4VIp
------END PGP SIGNATURE-----
diff --git a/curl-7.65.1.tar.xz.asc b/curl-7.65.1.tar.xz.asc
new file mode 100644
index 0000000..1fb59c8
--- /dev/null
+++ b/curl-7.65.1.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlz3WXoACgkQXMkI/bce
+EsLceAgAg0RTq0HLyI2DtJyR4b60vKXTFizjIxEEBJ9NCjpxwUTg4q3H6tzIOuCR
+PrPQXMADKtZpWwBDO1LV0CoUykw3vWxkG8uf5v/2GhdMdRGKm1TBgj1XN8SuAYTB
+Srpus7LtyiIuElpOGUNNTIMcVXjT4ykJbLU61ykNSPc8IxK3KSY0C+dc/IpQQWQe
+FmkMhuEpI4heu3uTmaj/UDs5LN+pv383XUTbMZvtgzDlquoyECGYX88+K6HC3doy
+HiulXv99BUckmnCvbzL9Ly/QsbYq41UJLfc8HN4B1VtKTXkZJFyHwd8NMlSl8rQq
+CLhRgj7IFk6VAEPpF3jJrmuvDxvdng==
+=hzYt
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 79eb8a9..e9de3c9 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.65.0
-Release: 2%{?dist}
+Version: 7.65.1
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# fix spurious timeout events with speed-limit (#1714893)
-Patch1: 0001-curl-7.65.0-speed-limit-timeout.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -174,7 +171,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -350,6 +346,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Jun 05 2019 Kamil Dudka - 7.65.1-1
+- new upstream release
+
* Thu May 30 2019 Kamil Dudka - 7.65.0-2
- fix spurious timeout events with speed-limit (#1714893)
diff --git a/sources b/sources
index 36347c9..242cb15 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.65.0.tar.xz) = 032c065c1d4bd07ba028625f8fab6a09e7cb8505a5f19339b3abdee5a9cda7d091c11f075fe3fc227d082690a66c558c770a4cd9fb17b52acc13794976a770c5
+SHA512 (curl-7.65.1.tar.xz) = aba2d979a416d14a0f0852d595665e49fc4f7bff3bee31f3a52b90ba9dc5ffdb09c092777f124215470b72c47ebca7ddb47844cbf5c0e9142099272b6ac55df4
From 6e794d5beb6b56607f163c5c7862b010982f7b69 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 17 Jul 2019 10:28:35 +0200
Subject: [PATCH 066/260] new upstream release - 7.65.2
---
0102-curl-7.36.0-debug.patch | 2 +-
0105-curl-7.63.0-lib1560-valgrind.patch | 2 +-
curl-7.65.1.tar.xz.asc | 11 -----------
curl-7.65.2.tar.xz.asc | 11 +++++++++++
curl.spec | 5 ++++-
sources | 2 +-
6 files changed, 18 insertions(+), 15 deletions(-)
delete mode 100644 curl-7.65.1.tar.xz.asc
create mode 100644 curl-7.65.2.tar.xz.asc
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index e757b9d..4f7991b 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16268,18 +16268,11 @@ $as_echo "yes" >&6; }
+@@ -16288,18 +16288,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/0105-curl-7.63.0-lib1560-valgrind.patch b/0105-curl-7.63.0-lib1560-valgrind.patch
index 652739c..6d05c67 100644
--- a/0105-curl-7.63.0-lib1560-valgrind.patch
+++ b/0105-curl-7.63.0-lib1560-valgrind.patch
@@ -26,7 +26,7 @@ diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 080421b..ea3b806 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
-@@ -528,6 +528,7 @@ lib1559_SOURCES = lib1559.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+@@ -531,6 +531,7 @@ lib1559_SOURCES = lib1559.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1559_LDADD = $(TESTUTIL_LIBS)
lib1560_SOURCES = lib1560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
diff --git a/curl-7.65.1.tar.xz.asc b/curl-7.65.1.tar.xz.asc
deleted file mode 100644
index 1fb59c8..0000000
--- a/curl-7.65.1.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAlz3WXoACgkQXMkI/bce
-EsLceAgAg0RTq0HLyI2DtJyR4b60vKXTFizjIxEEBJ9NCjpxwUTg4q3H6tzIOuCR
-PrPQXMADKtZpWwBDO1LV0CoUykw3vWxkG8uf5v/2GhdMdRGKm1TBgj1XN8SuAYTB
-Srpus7LtyiIuElpOGUNNTIMcVXjT4ykJbLU61ykNSPc8IxK3KSY0C+dc/IpQQWQe
-FmkMhuEpI4heu3uTmaj/UDs5LN+pv383XUTbMZvtgzDlquoyECGYX88+K6HC3doy
-HiulXv99BUckmnCvbzL9Ly/QsbYq41UJLfc8HN4B1VtKTXkZJFyHwd8NMlSl8rQq
-CLhRgj7IFk6VAEPpF3jJrmuvDxvdng==
-=hzYt
------END PGP SIGNATURE-----
diff --git a/curl-7.65.2.tar.xz.asc b/curl-7.65.2.tar.xz.asc
new file mode 100644
index 0000000..911a393
--- /dev/null
+++ b/curl-7.65.2.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl0uzp8ACgkQXMkI/bce
+EsKvxggApofdiAeSY2lMwKfydA6vmZRhLmdBcBx4AvA3dD56Yzs2Y78EVcv7Mtz7
+Dix90SQEQLrf29DqZh6U3/z96hwbUU0sx0k8I38KhePxAEiFcIgnyXTt4PaRrAzr
+WlIk5GX+Xz9HbWEop8b2yIskVUd+VfnyR1VH/+mBzpAHn9tbPscyBT8xcKCN8LxM
+QiQdzyXcxfPbBthYPaf2+bWhicch3pS4u4El8o4BTdosZrpElZtSD3RKKCbgK4Kw
+688juLaWVfFhoVgyEUc1cMJRqF3Q093rbxH5Z97cW6XBQRlhFW7HFgEEHq1bhXCF
++sMUhfr1Wz+LHfVg4SasOS4fqX3Mlg==
+=I4Mq
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index e9de3c9..5d5b096 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,6 +1,6 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.65.1
+Version: 7.65.2
Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -346,6 +346,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Jul 17 2019 Kamil Dudka - 7.65.2-1
+- new upstream release
+
* Wed Jun 05 2019 Kamil Dudka - 7.65.1-1
- new upstream release
diff --git a/sources b/sources
index 242cb15..563e0f4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.65.1.tar.xz) = aba2d979a416d14a0f0852d595665e49fc4f7bff3bee31f3a52b90ba9dc5ffdb09c092777f124215470b72c47ebca7ddb47844cbf5c0e9142099272b6ac55df4
+SHA512 (curl-7.65.2.tar.xz) = a411cf19c389301473d74b85d775e3ba0c7c2f6e74d7e0f8de47dace1a709bfba552c483c3faf94101f741a5478800284c475422844cedb6a7a070e2f78af263
From a5c984a5907b2ccf14e4d1524b6135244a607b51 Mon Sep 17 00:00:00 2001
From: Paul Howarth
Date: Sat, 20 Jul 2019 12:02:57 +0100
Subject: [PATCH 067/260] new upstream release - 7.65.3
---
curl-7.65.2.tar.xz.asc | 11 -----------
curl-7.65.3.tar.xz.asc | 11 +++++++++++
curl.spec | 5 ++++-
sources | 2 +-
4 files changed, 16 insertions(+), 13 deletions(-)
delete mode 100644 curl-7.65.2.tar.xz.asc
create mode 100644 curl-7.65.3.tar.xz.asc
diff --git a/curl-7.65.2.tar.xz.asc b/curl-7.65.2.tar.xz.asc
deleted file mode 100644
index 911a393..0000000
--- a/curl-7.65.2.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl0uzp8ACgkQXMkI/bce
-EsKvxggApofdiAeSY2lMwKfydA6vmZRhLmdBcBx4AvA3dD56Yzs2Y78EVcv7Mtz7
-Dix90SQEQLrf29DqZh6U3/z96hwbUU0sx0k8I38KhePxAEiFcIgnyXTt4PaRrAzr
-WlIk5GX+Xz9HbWEop8b2yIskVUd+VfnyR1VH/+mBzpAHn9tbPscyBT8xcKCN8LxM
-QiQdzyXcxfPbBthYPaf2+bWhicch3pS4u4El8o4BTdosZrpElZtSD3RKKCbgK4Kw
-688juLaWVfFhoVgyEUc1cMJRqF3Q093rbxH5Z97cW6XBQRlhFW7HFgEEHq1bhXCF
-+sMUhfr1Wz+LHfVg4SasOS4fqX3Mlg==
-=I4Mq
------END PGP SIGNATURE-----
diff --git a/curl-7.65.3.tar.xz.asc b/curl-7.65.3.tar.xz.asc
new file mode 100644
index 0000000..1671b07
--- /dev/null
+++ b/curl-7.65.3.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl0xj7oACgkQXMkI/bce
+EsKYbgf9G41o5x73tc+2TOGt2QmJ7ukyHmd5Vq7XTSNdNU5dJ41Z3qh9Jm72x62i
+b4kJMjWyoL2j031ml5JevycpMpNa1v784UlPW2tzzL2B7v6vcA4xknJRLWlPlcTJ
+HOgub6r7g/zhOpdAeJh8o4jkBLUyN+S/HOyHLWcvdWDnhqUAmpZfIqtd8kjqzDul
+XAkdj7MxWqKZ3wXWwlpp4j81jpfOj7KCC/ZpxlJ0KfefgYEzV23O2hcJzw57jqTy
+SQZc39uTQOjbZPlBXJD55QeVISCwe53pn55aWQll90XfE3XRapuYZdiL8wLwtl/L
+tjugTKjfoy9qqOGH5YB/4kHqoSJqow==
+=Itbi
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 5d5b096..a3f320a 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,6 +1,6 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.65.2
+Version: 7.65.3
Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -346,6 +346,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Sat Jul 20 2019 Paul Howarth - 7.65.3-1
+- new upstream release
+
* Wed Jul 17 2019 Kamil Dudka - 7.65.2-1
- new upstream release
diff --git a/sources b/sources
index 563e0f4..e0d70dd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.65.2.tar.xz) = a411cf19c389301473d74b85d775e3ba0c7c2f6e74d7e0f8de47dace1a709bfba552c483c3faf94101f741a5478800284c475422844cedb6a7a070e2f78af263
+SHA512 (curl-7.65.3.tar.xz) = fc4f041d3d6682378ce9eef2c6081e6ad83bb2502ea4c992c760266584c09e9ebca7c6d35958bd32a888702d9308cbce7aef69c431f97994107d7ff6b953941b
From 22186831fb63c0aa5cf7d145919801c20cd96780 Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Wed, 24 Jul 2019 21:21:56 +0000
Subject: [PATCH 068/260] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
curl.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index a3f320a..3828aff 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.65.3
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -346,6 +346,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Jul 24 2019 Fedora Release Engineering - 7.65.3-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
+
* Sat Jul 20 2019 Paul Howarth - 7.65.3-1
- new upstream release
From 863394fd9543b71d6b01cfb325d20ddcf189b86e Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 1 Aug 2019 16:31:27 +0200
Subject: [PATCH 069/260] improve handling of gss_init_sec_context() failures
---
0001-curl-7.65.3-negotiate-fails.patch | 166 +++++++++++++++++++++++++
curl.spec | 9 +-
2 files changed, 174 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.65.3-negotiate-fails.patch
diff --git a/0001-curl-7.65.3-negotiate-fails.patch b/0001-curl-7.65.3-negotiate-fails.patch
new file mode 100644
index 0000000..9cfae77
--- /dev/null
+++ b/0001-curl-7.65.3-negotiate-fails.patch
@@ -0,0 +1,166 @@
+From 90f7ca7bec18b49bf2706430aa6493eda7d7a573 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Tue, 30 Jul 2019 12:59:35 +0200
+Subject: [PATCH] http_negotiate: improve handling of gss_init_sec_context()
+ failures
+
+If HTTPAUTH_GSSNEGOTIATE was used for a POST request and
+gss_init_sec_context() failed, the POST request was sent
+with empty body. This commit also restores the original
+behavior of `curl --fail --negotiate`, which was changed
+by commit 6c6035532383e300c712e4c1cd9fdd749ed5cf59.
+
+Add regression tests 2077 and 2078 to cover this.
+
+Fixes #3992
+Closes #4171
+
+Upstream-commit: 4c187043c5aac57f354ebb96cc6ff3263411e98d
+Signed-off-by: Kamil Dudka
+---
+ lib/http_negotiate.c | 2 +-
+ tests/data/Makefile.inc | 3 ++-
+ tests/data/test2077 | 42 ++++++++++++++++++++++++++++++++
+ tests/data/test2078 | 54 +++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 99 insertions(+), 2 deletions(-)
+ create mode 100644 tests/data/test2077
+ create mode 100644 tests/data/test2078
+
+diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
+index c8f406444..fe15dcefb 100644
+--- a/lib/http_negotiate.c
++++ b/lib/http_negotiate.c
+@@ -151,7 +151,7 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
+ if(result == CURLE_LOGIN_DENIED) {
+ /* negotiate auth failed, let's continue unauthenticated to stay
+ * compatible with the behavior before curl-7_64_0-158-g6c6035532 */
+- conn->data->state.authproblem = TRUE;
++ authp->done = TRUE;
+ return CURLE_OK;
+ }
+ else if(result)
+diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
+index 693e53d7c..3ed4a03e4 100644
+--- a/tests/data/Makefile.inc
++++ b/tests/data/Makefile.inc
+@@ -199,7 +199,8 @@ test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 \
+ test2048 test2049 test2050 test2051 test2052 test2053 test2054 test2055 \
+ test2056 test2057 test2058 test2059 test2060 test2061 test2062 test2063 \
+ test2064 test2065 test2066 test2067 test2068 test2069 \
+- test2071 test2072 test2073 test2074 test2075 test2076 \
++ test2071 test2072 test2073 test2074 test2075 test2076 test2077 \
++test2078 \
+ test2080 \
+ test2100 \
+ \
+diff --git a/tests/data/test2077 b/tests/data/test2077
+new file mode 100644
+index 000000000..0c600f5c3
+--- /dev/null
++++ b/tests/data/test2077
+@@ -0,0 +1,42 @@
++
++
++
++HTTP
++HTTP GET
++GSS-API
++
++
++
++# Server-side
++
++
++HTTP/1.1 200 OK swsclose
++Content-Length: 23
++
++This IS the real page!
++
++
++
++# Client-side
++
++
++http
++
++
++GSS-API
++
++
++curl --fail --negotiate to unauthenticated service fails
++
++
++http://%HOSTIP:%HTTPPORT/2077 -u : --fail --negotiate
++
++
++
++# Verify data after the test has been "shot"
++
++
++0
++
++
++
+diff --git a/tests/data/test2078 b/tests/data/test2078
+new file mode 100644
+index 000000000..99bc2dbee
+--- /dev/null
++++ b/tests/data/test2078
+@@ -0,0 +1,54 @@
++
++
++
++HTTP
++HTTP GET
++GSS-API
++
++
++
++# Server-side
++
++
++HTTP/1.1 200 OK swsclose
++Content-Length: 23
++
++This IS the real page!
++
++
++
++# Client-side
++
++
++http
++
++
++GSS-API
++
++
++curl --negotiate should not send empty POST request only
++
++
++http://%HOSTIP:%HTTPPORT/2078 -u : --negotiate --data name=value
++
++
++
++# Verify data after the test has been "shot"
++
++
++0
++
++
++^User-Agent:.*
++
++
++POST /2078 HTTP/1.1
++Host: 127.0.0.1:8990
++Accept: */*
++Content-Length: 10
++Content-Type: application/x-www-form-urlencoded
++
++name=value
++
++
++
+--
+2.20.1
+
diff --git a/curl.spec b/curl.spec
index 3828aff..ad0b460 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.65.3
-Release: 2%{?dist}
+Release: 3%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# improve handling of gss_init_sec_context() failures
+Patch1: 0001-curl-7.65.3-negotiate-fails.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -171,6 +174,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -346,6 +350,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu Aug 01 2019 Kamil Dudka - 7.65.3-3
+- new upstream release
+
* Wed Jul 24 2019 Fedora Release Engineering - 7.65.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
From 8559ecc1d99f43ecedecf06c588afe20286680ce Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 1 Aug 2019 16:41:42 +0200
Subject: [PATCH 070/260] changelog: fix copy/paste error in the last entry
---
curl.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index ad0b460..e6799f9 100644
--- a/curl.spec
+++ b/curl.spec
@@ -351,7 +351,7 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%changelog
* Thu Aug 01 2019 Kamil Dudka - 7.65.3-3
-- new upstream release
+- improve handling of gss_init_sec_context() failures
* Wed Jul 24 2019 Fedora Release Engineering - 7.65.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
From 91c50ee6d4c7512577cf97fbdb6b8038bf8b6de3 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Tue, 27 Aug 2019 18:10:11 +0200
Subject: [PATCH 071/260] Resolves: #1690971 - avoid reporting spurious error
in the HTTP2 framing layer
---
0002-curl-7.65.3-h2-framing-layer-error.patch | 37 +++++++++++++++++++
curl.spec | 9 ++++-
2 files changed, 45 insertions(+), 1 deletion(-)
create mode 100644 0002-curl-7.65.3-h2-framing-layer-error.patch
diff --git a/0002-curl-7.65.3-h2-framing-layer-error.patch b/0002-curl-7.65.3-h2-framing-layer-error.patch
new file mode 100644
index 0000000..24db142
--- /dev/null
+++ b/0002-curl-7.65.3-h2-framing-layer-error.patch
@@ -0,0 +1,37 @@
+From 98d59387c749256c2421b22dc3419b94d381986a Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Mon, 26 Aug 2019 16:00:05 +0200
+Subject: [PATCH] http2: when marked for closure and wanted to close == OK
+
+It could otherwise return an error even when closed correctly if GOAWAY
+had been received previously.
+
+Reported-by: Tom van der Woerdt
+Fixes #4267
+Closes #4268
+
+Upstream-commit: c1b6a384f9c8a91197c20adb49d43f30dc0e917d
+Signed-off-by: Kamil Dudka
+---
+ lib/http2.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/lib/http2.c b/lib/http2.c
+index 930e85165..31d2d698a 100644
+--- a/lib/http2.c
++++ b/lib/http2.c
+@@ -1566,6 +1566,11 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
+ if(should_close_session(httpc)) {
+ H2BUGF(infof(data,
+ "http2_recv: nothing to do in this session\n"));
++ if(conn->bits.close) {
++ /* already marked for closure, return OK and we're done */
++ *err = CURLE_OK;
++ return 0;
++ }
+ *err = CURLE_HTTP2;
+ return -1;
+ }
+--
+2.20.1
+
diff --git a/curl.spec b/curl.spec
index e6799f9..54654c4 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,16 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.65.3
-Release: 3%{?dist}
+Release: 4%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
# improve handling of gss_init_sec_context() failures
Patch1: 0001-curl-7.65.3-negotiate-fails.patch
+# avoid reporting spurious error in the HTTP2 framing layer (#1690971)
+Patch2: 0002-curl-7.65.3-h2-framing-layer-error.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -175,6 +178,7 @@ be installed.
# upstream patches
%patch1 -p1
+%patch2 -p1
# Fedora patches
%patch101 -p1
@@ -350,6 +354,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Tue Aug 27 2019 Kamil Dudka - 7.65.3-4
+- avoid reporting spurious error in the HTTP2 framing layer (#1690971)
+
* Thu Aug 01 2019 Kamil Dudka - 7.65.3-3
- improve handling of gss_init_sec_context() failures
From da9af162568dfb4338fd422cf398964fda75b72e Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 11 Sep 2019 09:57:42 +0200
Subject: [PATCH 072/260] new upstream release - 7.66.0
Resolves: CVE-2019-5481 - double free due to subsequent call of realloc()
Resolves: CVE-2019-5482 - heap buffer overflow in function tftp_receive_packet()
---
0001-curl-7.65.3-negotiate-fails.patch | 166 ------------------
0002-curl-7.65.3-h2-framing-layer-error.patch | 37 ----
0102-curl-7.36.0-debug.patch | 2 +-
curl-7.65.3.tar.xz.asc | 11 --
curl-7.66.0.tar.xz.asc | 11 ++
curl.spec | 17 +-
sources | 2 +-
7 files changed, 20 insertions(+), 226 deletions(-)
delete mode 100644 0001-curl-7.65.3-negotiate-fails.patch
delete mode 100644 0002-curl-7.65.3-h2-framing-layer-error.patch
delete mode 100644 curl-7.65.3.tar.xz.asc
create mode 100644 curl-7.66.0.tar.xz.asc
diff --git a/0001-curl-7.65.3-negotiate-fails.patch b/0001-curl-7.65.3-negotiate-fails.patch
deleted file mode 100644
index 9cfae77..0000000
--- a/0001-curl-7.65.3-negotiate-fails.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-From 90f7ca7bec18b49bf2706430aa6493eda7d7a573 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Tue, 30 Jul 2019 12:59:35 +0200
-Subject: [PATCH] http_negotiate: improve handling of gss_init_sec_context()
- failures
-
-If HTTPAUTH_GSSNEGOTIATE was used for a POST request and
-gss_init_sec_context() failed, the POST request was sent
-with empty body. This commit also restores the original
-behavior of `curl --fail --negotiate`, which was changed
-by commit 6c6035532383e300c712e4c1cd9fdd749ed5cf59.
-
-Add regression tests 2077 and 2078 to cover this.
-
-Fixes #3992
-Closes #4171
-
-Upstream-commit: 4c187043c5aac57f354ebb96cc6ff3263411e98d
-Signed-off-by: Kamil Dudka
----
- lib/http_negotiate.c | 2 +-
- tests/data/Makefile.inc | 3 ++-
- tests/data/test2077 | 42 ++++++++++++++++++++++++++++++++
- tests/data/test2078 | 54 +++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 99 insertions(+), 2 deletions(-)
- create mode 100644 tests/data/test2077
- create mode 100644 tests/data/test2078
-
-diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
-index c8f406444..fe15dcefb 100644
---- a/lib/http_negotiate.c
-+++ b/lib/http_negotiate.c
-@@ -151,7 +151,7 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
- if(result == CURLE_LOGIN_DENIED) {
- /* negotiate auth failed, let's continue unauthenticated to stay
- * compatible with the behavior before curl-7_64_0-158-g6c6035532 */
-- conn->data->state.authproblem = TRUE;
-+ authp->done = TRUE;
- return CURLE_OK;
- }
- else if(result)
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
-index 693e53d7c..3ed4a03e4 100644
---- a/tests/data/Makefile.inc
-+++ b/tests/data/Makefile.inc
-@@ -199,7 +199,8 @@ test2040 test2041 test2042 test2043 test2044 test2045 test2046 test2047 \
- test2048 test2049 test2050 test2051 test2052 test2053 test2054 test2055 \
- test2056 test2057 test2058 test2059 test2060 test2061 test2062 test2063 \
- test2064 test2065 test2066 test2067 test2068 test2069 \
-- test2071 test2072 test2073 test2074 test2075 test2076 \
-+ test2071 test2072 test2073 test2074 test2075 test2076 test2077 \
-+test2078 \
- test2080 \
- test2100 \
- \
-diff --git a/tests/data/test2077 b/tests/data/test2077
-new file mode 100644
-index 000000000..0c600f5c3
---- /dev/null
-+++ b/tests/data/test2077
-@@ -0,0 +1,42 @@
-+
-+
-+
-+HTTP
-+HTTP GET
-+GSS-API
-+
-+
-+
-+# Server-side
-+
-+
-+HTTP/1.1 200 OK swsclose
-+Content-Length: 23
-+
-+This IS the real page!
-+
-+
-+
-+# Client-side
-+
-+
-+http
-+
-+
-+GSS-API
-+
-+
-+curl --fail --negotiate to unauthenticated service fails
-+
-+
-+http://%HOSTIP:%HTTPPORT/2077 -u : --fail --negotiate
-+
-+
-+
-+# Verify data after the test has been "shot"
-+
-+
-+0
-+
-+
-+
-diff --git a/tests/data/test2078 b/tests/data/test2078
-new file mode 100644
-index 000000000..99bc2dbee
---- /dev/null
-+++ b/tests/data/test2078
-@@ -0,0 +1,54 @@
-+
-+
-+
-+HTTP
-+HTTP GET
-+GSS-API
-+
-+
-+
-+# Server-side
-+
-+
-+HTTP/1.1 200 OK swsclose
-+Content-Length: 23
-+
-+This IS the real page!
-+
-+
-+
-+# Client-side
-+
-+
-+http
-+
-+
-+GSS-API
-+
-+
-+curl --negotiate should not send empty POST request only
-+
-+
-+http://%HOSTIP:%HTTPPORT/2078 -u : --negotiate --data name=value
-+
-+
-+
-+# Verify data after the test has been "shot"
-+
-+
-+0
-+
-+
-+^User-Agent:.*
-+
-+
-+POST /2078 HTTP/1.1
-+Host: 127.0.0.1:8990
-+Accept: */*
-+Content-Length: 10
-+Content-Type: application/x-www-form-urlencoded
-+
-+name=value
-+
-+
-+
---
-2.20.1
-
diff --git a/0002-curl-7.65.3-h2-framing-layer-error.patch b/0002-curl-7.65.3-h2-framing-layer-error.patch
deleted file mode 100644
index 24db142..0000000
--- a/0002-curl-7.65.3-h2-framing-layer-error.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 98d59387c749256c2421b22dc3419b94d381986a Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Mon, 26 Aug 2019 16:00:05 +0200
-Subject: [PATCH] http2: when marked for closure and wanted to close == OK
-
-It could otherwise return an error even when closed correctly if GOAWAY
-had been received previously.
-
-Reported-by: Tom van der Woerdt
-Fixes #4267
-Closes #4268
-
-Upstream-commit: c1b6a384f9c8a91197c20adb49d43f30dc0e917d
-Signed-off-by: Kamil Dudka
----
- lib/http2.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/lib/http2.c b/lib/http2.c
-index 930e85165..31d2d698a 100644
---- a/lib/http2.c
-+++ b/lib/http2.c
-@@ -1566,6 +1566,11 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex,
- if(should_close_session(httpc)) {
- H2BUGF(infof(data,
- "http2_recv: nothing to do in this session\n"));
-+ if(conn->bits.close) {
-+ /* already marked for closure, return OK and we're done */
-+ *err = CURLE_OK;
-+ return 0;
-+ }
- *err = CURLE_HTTP2;
- return -1;
- }
---
-2.20.1
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 4f7991b..affe9f0 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16288,18 +16288,11 @@ $as_echo "yes" >&6; }
+@@ -16301,18 +16301,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/curl-7.65.3.tar.xz.asc b/curl-7.65.3.tar.xz.asc
deleted file mode 100644
index 1671b07..0000000
--- a/curl-7.65.3.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl0xj7oACgkQXMkI/bce
-EsKYbgf9G41o5x73tc+2TOGt2QmJ7ukyHmd5Vq7XTSNdNU5dJ41Z3qh9Jm72x62i
-b4kJMjWyoL2j031ml5JevycpMpNa1v784UlPW2tzzL2B7v6vcA4xknJRLWlPlcTJ
-HOgub6r7g/zhOpdAeJh8o4jkBLUyN+S/HOyHLWcvdWDnhqUAmpZfIqtd8kjqzDul
-XAkdj7MxWqKZ3wXWwlpp4j81jpfOj7KCC/ZpxlJ0KfefgYEzV23O2hcJzw57jqTy
-SQZc39uTQOjbZPlBXJD55QeVISCwe53pn55aWQll90XfE3XRapuYZdiL8wLwtl/L
-tjugTKjfoy9qqOGH5YB/4kHqoSJqow==
-=Itbi
------END PGP SIGNATURE-----
diff --git a/curl-7.66.0.tar.xz.asc b/curl-7.66.0.tar.xz.asc
new file mode 100644
index 0000000..83e8258
--- /dev/null
+++ b/curl-7.66.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl14i4AACgkQXMkI/bce
+EsJwgwf/WauX31s687pdOgpPE4ymPuxIrdVl+NovWdOBdQQfIA0c/4lu4onJYPAT
+K6wq86me5y8fj/Q3ymqQ3H1EcJE2vTHPx/w+zEHNsEILtBMFHdm84CJzhdLlI1GC
+9iBkjVKk/2s0tBOdC3HuskYLY2y02dHACvTvDJjx42nK4IbsdjoamVdMa7vep1TG
+abmLRNHkOHKjioYWi0N04c5H5YDpdWOOjFY+EPO+m+YQuJlYkgw90nlmOaqiLcHL
+3zGCMNXb209wxuNEVKenlhPQ/3FQZ9+8a4b6mMqBX7PDwhDiZLhqIJgVseWdw1r0
+Qm2suW4eUtlC2DTqTMtusG7EMN8pag==
+=pFLb
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 54654c4..7d8f9f8 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,16 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.65.3
-Release: 4%{?dist}
+Version: 7.66.0
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# improve handling of gss_init_sec_context() failures
-Patch1: 0001-curl-7.65.3-negotiate-fails.patch
-
-# avoid reporting spurious error in the HTTP2 framing layer (#1690971)
-Patch2: 0002-curl-7.65.3-h2-framing-layer-error.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -177,8 +171,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
-%patch2 -p1
# Fedora patches
%patch101 -p1
@@ -354,6 +346,11 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Sep 11 2019 Kamil Dudka - 7.66.0-1
+- new upstream release, which fixes the following vulnerabilities
+ CVE-2019-5481 - double free due to subsequent call of realloc()
+ CVE-2019-5482 - heap buffer overflow in function tftp_receive_packet()
+
* Tue Aug 27 2019 Kamil Dudka - 7.65.3-4
- avoid reporting spurious error in the HTTP2 framing layer (#1690971)
diff --git a/sources b/sources
index e0d70dd..aea53b9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.65.3.tar.xz) = fc4f041d3d6682378ce9eef2c6081e6ad83bb2502ea4c992c760266584c09e9ebca7c6d35958bd32a888702d9308cbce7aef69c431f97994107d7ff6b953941b
+SHA512 (curl-7.66.0.tar.xz) = 81170e7e4fa9d99ee2038d96d7f2ab10dcf52435331c818c7565c1a733891720f845a08029915e52ba532c6a344c346e1678474624aac1cc333aea6d1eacde35
From e0bf66ef6c403a5f93199b6f5a29105f5e4c244f Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Fri, 13 Sep 2019 10:18:05 +0200
Subject: [PATCH 073/260] fix memory leaked by parse_metalink()
---
0001-curl-7.66.0-metalink-memleak.patch | 71 +++++++++++++++++++++++++
curl.spec | 4 ++
2 files changed, 75 insertions(+)
create mode 100644 0001-curl-7.66.0-metalink-memleak.patch
diff --git a/0001-curl-7.66.0-metalink-memleak.patch b/0001-curl-7.66.0-metalink-memleak.patch
new file mode 100644
index 0000000..16c8ae2
--- /dev/null
+++ b/0001-curl-7.66.0-metalink-memleak.patch
@@ -0,0 +1,71 @@
+From 855ebacdffbc421b121563ae1ecd9fde736bfaf2 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka
+Date: Wed, 11 Sep 2019 16:32:11 +0200
+Subject: [PATCH] curl: fix memory leaked by parse_metalink()
+
+This commit fixes a regression introduced by curl-7_65_3-5-gb88940850.
+Detected by tests 2005, 2008, 2009, 2010, 2011, and 2012 with valgrind
+and libmetalink enabled.
+
+Closes #4326
+
+Upstream-commit: 1ca91bcdb588dc6c25d345f2411fdba314433732
+Signed-off-by: Kamil Dudka
+---
+ src/tool_metalink.c | 2 +-
+ src/tool_metalink.h | 3 +++
+ src/tool_operate.c | 4 ++++
+ 3 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/src/tool_metalink.c b/src/tool_metalink.c
+index 0740407f9..cd5a7d650 100644
+--- a/src/tool_metalink.c
++++ b/src/tool_metalink.c
+@@ -965,7 +965,7 @@ static void delete_metalink_resource(metalink_resource *res)
+ Curl_safefree(res);
+ }
+
+-static void delete_metalinkfile(metalinkfile *mlfile)
++void delete_metalinkfile(metalinkfile *mlfile)
+ {
+ metalink_resource *res;
+ if(mlfile == NULL) {
+diff --git a/src/tool_metalink.h b/src/tool_metalink.h
+index 1e367033c..f5ec306f7 100644
+--- a/src/tool_metalink.h
++++ b/src/tool_metalink.h
+@@ -105,6 +105,8 @@ extern const digest_params SHA256_DIGEST_PARAMS[1];
+ * Counts the resource in the metalinkfile.
+ */
+ int count_next_metalink_resource(metalinkfile *mlfile);
++
++void delete_metalinkfile(metalinkfile *mlfile);
+ void clean_metalink(struct OperationConfig *config);
+
+ /*
+@@ -158,6 +160,7 @@ void metalink_cleanup(void);
+ #else /* USE_METALINK */
+
+ #define count_next_metalink_resource(x) 0
++#define delete_metalinkfile(x) (void)x
+ #define clean_metalink(x) (void)x
+
+ /* metalink_cleanup() takes no arguments */
+diff --git a/src/tool_operate.c b/src/tool_operate.c
+index d2ad9642d..09dfc0c84 100644
+--- a/src/tool_operate.c
++++ b/src/tool_operate.c
+@@ -2073,6 +2073,10 @@ static CURLcode serial_transfers(struct GlobalConfig *global,
+ result = post_transfer(global, share, per, result, &retry);
+ if(retry)
+ continue;
++
++ /* Release metalink related resources here */
++ delete_metalinkfile(per->mlfile);
++
+ per = del_transfer(per);
+
+ /* Bail out upon critical errors or --fail-early */
+--
+2.20.1
+
diff --git a/curl.spec b/curl.spec
index 7d8f9f8..62a4980 100644
--- a/curl.spec
+++ b/curl.spec
@@ -5,6 +5,9 @@ Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# fix memory leaked by parse_metalink()
+Patch1: 0001-curl-7.66.0-metalink-memleak.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -171,6 +174,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
From c667b141d6e0fa277fba73dc393b474b2ae0eb0c Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 6 Nov 2019 09:21:14 +0100
Subject: [PATCH 074/260] new upstream release - 7.67.0
---
0001-curl-7.66.0-metalink-memleak.patch | 71 -------------------------
0102-curl-7.36.0-debug.patch | 2 +-
0103-curl-7.59.0-python3.patch | 25 +--------
0105-curl-7.63.0-lib1560-valgrind.patch | 2 +-
curl-7.66.0.tar.xz.asc | 11 ----
curl-7.67.0.tar.xz.asc | 11 ++++
curl.spec | 9 ++--
sources | 2 +-
8 files changed, 19 insertions(+), 114 deletions(-)
delete mode 100644 0001-curl-7.66.0-metalink-memleak.patch
delete mode 100644 curl-7.66.0.tar.xz.asc
create mode 100644 curl-7.67.0.tar.xz.asc
diff --git a/0001-curl-7.66.0-metalink-memleak.patch b/0001-curl-7.66.0-metalink-memleak.patch
deleted file mode 100644
index 16c8ae2..0000000
--- a/0001-curl-7.66.0-metalink-memleak.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 855ebacdffbc421b121563ae1ecd9fde736bfaf2 Mon Sep 17 00:00:00 2001
-From: Kamil Dudka
-Date: Wed, 11 Sep 2019 16:32:11 +0200
-Subject: [PATCH] curl: fix memory leaked by parse_metalink()
-
-This commit fixes a regression introduced by curl-7_65_3-5-gb88940850.
-Detected by tests 2005, 2008, 2009, 2010, 2011, and 2012 with valgrind
-and libmetalink enabled.
-
-Closes #4326
-
-Upstream-commit: 1ca91bcdb588dc6c25d345f2411fdba314433732
-Signed-off-by: Kamil Dudka
----
- src/tool_metalink.c | 2 +-
- src/tool_metalink.h | 3 +++
- src/tool_operate.c | 4 ++++
- 3 files changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/src/tool_metalink.c b/src/tool_metalink.c
-index 0740407f9..cd5a7d650 100644
---- a/src/tool_metalink.c
-+++ b/src/tool_metalink.c
-@@ -965,7 +965,7 @@ static void delete_metalink_resource(metalink_resource *res)
- Curl_safefree(res);
- }
-
--static void delete_metalinkfile(metalinkfile *mlfile)
-+void delete_metalinkfile(metalinkfile *mlfile)
- {
- metalink_resource *res;
- if(mlfile == NULL) {
-diff --git a/src/tool_metalink.h b/src/tool_metalink.h
-index 1e367033c..f5ec306f7 100644
---- a/src/tool_metalink.h
-+++ b/src/tool_metalink.h
-@@ -105,6 +105,8 @@ extern const digest_params SHA256_DIGEST_PARAMS[1];
- * Counts the resource in the metalinkfile.
- */
- int count_next_metalink_resource(metalinkfile *mlfile);
-+
-+void delete_metalinkfile(metalinkfile *mlfile);
- void clean_metalink(struct OperationConfig *config);
-
- /*
-@@ -158,6 +160,7 @@ void metalink_cleanup(void);
- #else /* USE_METALINK */
-
- #define count_next_metalink_resource(x) 0
-+#define delete_metalinkfile(x) (void)x
- #define clean_metalink(x) (void)x
-
- /* metalink_cleanup() takes no arguments */
-diff --git a/src/tool_operate.c b/src/tool_operate.c
-index d2ad9642d..09dfc0c84 100644
---- a/src/tool_operate.c
-+++ b/src/tool_operate.c
-@@ -2073,6 +2073,10 @@ static CURLcode serial_transfers(struct GlobalConfig *global,
- result = post_transfer(global, share, per, result, &retry);
- if(retry)
- continue;
-+
-+ /* Release metalink related resources here */
-+ delete_metalinkfile(per->mlfile);
-+
- per = del_transfer(per);
-
- /* Bail out upon critical errors or --fail-early */
---
-2.20.1
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index affe9f0..53022e1 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16301,18 +16301,11 @@ $as_echo "yes" >&6; }
+@@ -16331,18 +16331,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/0103-curl-7.59.0-python3.patch b/0103-curl-7.59.0-python3.patch
index 56485fe..55bf4a9 100644
--- a/0103-curl-7.59.0-python3.patch
+++ b/0103-curl-7.59.0-python3.patch
@@ -9,8 +9,7 @@ there is no 'impacket' module available for Python 3:
https://github.com/CoreSecurity/impacket/issues/61
---
tests/negtelnetserver.py | 4 ++--
- tests/smbserver.py | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
+ 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/negtelnetserver.py b/tests/negtelnetserver.py
index 8cfd409..72ee771 100755
@@ -30,28 +29,6 @@ index 8cfd409..72ee771 100755
except IOError:
log.exception("IOError hit during request")
-diff --git a/tests/smbserver.py b/tests/smbserver.py
-index 195ae39..b09cd44 100755
---- a/tests/smbserver.py
-+++ b/tests/smbserver.py
-@@ -24,7 +24,7 @@
- from __future__ import (absolute_import, division, print_function)
- # unicode_literals)
- import argparse
--import ConfigParser
-+import configparser
- import os
- import sys
- import logging
-@@ -58,7 +58,7 @@ def smbserver(options):
- f.write("{0}".format(pid))
-
- # Here we write a mini config for the server
-- smb_config = ConfigParser.ConfigParser()
-+ smb_config = configparser.ConfigParser()
- smb_config.add_section("global")
- smb_config.set("global", "server_name", "SERVICE")
- smb_config.set("global", "server_os", "UNIX")
--
2.14.3
diff --git a/0105-curl-7.63.0-lib1560-valgrind.patch b/0105-curl-7.63.0-lib1560-valgrind.patch
index 6d05c67..8121ee6 100644
--- a/0105-curl-7.63.0-lib1560-valgrind.patch
+++ b/0105-curl-7.63.0-lib1560-valgrind.patch
@@ -26,7 +26,7 @@ diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 080421b..ea3b806 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
-@@ -531,6 +531,7 @@ lib1559_SOURCES = lib1559.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+@@ -534,6 +534,7 @@ lib1559_SOURCES = lib1559.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1559_LDADD = $(TESTUTIL_LIBS)
lib1560_SOURCES = lib1560.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
diff --git a/curl-7.66.0.tar.xz.asc b/curl-7.66.0.tar.xz.asc
deleted file mode 100644
index 83e8258..0000000
--- a/curl-7.66.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl14i4AACgkQXMkI/bce
-EsJwgwf/WauX31s687pdOgpPE4ymPuxIrdVl+NovWdOBdQQfIA0c/4lu4onJYPAT
-K6wq86me5y8fj/Q3ymqQ3H1EcJE2vTHPx/w+zEHNsEILtBMFHdm84CJzhdLlI1GC
-9iBkjVKk/2s0tBOdC3HuskYLY2y02dHACvTvDJjx42nK4IbsdjoamVdMa7vep1TG
-abmLRNHkOHKjioYWi0N04c5H5YDpdWOOjFY+EPO+m+YQuJlYkgw90nlmOaqiLcHL
-3zGCMNXb209wxuNEVKenlhPQ/3FQZ9+8a4b6mMqBX7PDwhDiZLhqIJgVseWdw1r0
-Qm2suW4eUtlC2DTqTMtusG7EMN8pag==
-=pFLb
------END PGP SIGNATURE-----
diff --git a/curl-7.67.0.tar.xz.asc b/curl-7.67.0.tar.xz.asc
new file mode 100644
index 0000000..e44cfc6
--- /dev/null
+++ b/curl-7.67.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl3CauAACgkQXMkI/bce
+EsKe7Qf+Py/Wufz3AqqpJ1Xr0oigaV1Sa5AAyRD+KX8jwSJTRaRahaECGMhmR9vh
+kBaMFtycctCKcK1masI9GSeTX5nCtmaWzELLsBXynm/l2W+hrW1AD2R++YuM384t
+O078GxgsgRH0m8MacSKoV5yPOv/h9URnVMTavkAIfnW50vw17akDZ9MW2NhJzKpP
+s6GgWTMB5gomTHlnlHjTjtNoVbKKrV4v9YyRwqzI3XHXYtYOA7iufP4wnT+dpSm5
+ZLdbg5Nq+1pCTEiMg3KZKYNriypoLJuWuSF+bKc54CGN63eoUxXgU6js9ViHS5JS
+3dPfzzRA8wgROem58QhHnrR9c2CmdQ==
+=5gov
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 62a4980..9d85067 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.66.0
+Version: 7.67.0
Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# fix memory leaked by parse_metalink()
-Patch1: 0001-curl-7.66.0-metalink-memleak.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -174,7 +171,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -350,6 +346,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Nov 06 2019 Kamil Dudka - 7.67.1-1
+- new upstream release
+
* Wed Sep 11 2019 Kamil Dudka - 7.66.0-1
- new upstream release, which fixes the following vulnerabilities
CVE-2019-5481 - double free due to subsequent call of realloc()
diff --git a/sources b/sources
index aea53b9..16e8545 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.66.0.tar.xz) = 81170e7e4fa9d99ee2038d96d7f2ab10dcf52435331c818c7565c1a733891720f845a08029915e52ba532c6a344c346e1678474624aac1cc333aea6d1eacde35
+SHA512 (curl-7.67.0.tar.xz) = 1d5a344be92dd61b1ba5189eff0fe337e492f2e850794943570fe71c985d0af60bd412082be646e07aaa8639908593e1ce4bb2d07db35394ec377e8ce8b9ae29
From 2298078d54ad9124a2eee9c01f62a43b8a633866 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 14 Nov 2019 13:57:06 +0100
Subject: [PATCH 075/260] Resolves: #1771025 - fix infinite loop on upload
using a glob
---
0001-curl-7.67.0-upload-glob.patch | 316 +++++++++++++++++++++++++++++
curl.spec | 9 +-
2 files changed, 324 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.67.0-upload-glob.patch
diff --git a/0001-curl-7.67.0-upload-glob.patch b/0001-curl-7.67.0-upload-glob.patch
new file mode 100644
index 0000000..257eb22
--- /dev/null
+++ b/0001-curl-7.67.0-upload-glob.patch
@@ -0,0 +1,316 @@
+From 37a36231c5e34ae31b1968481fad2e8d76613fbd Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Wed, 13 Nov 2019 11:33:29 +0100
+Subject: [PATCH] curl: fix -T globbing
+
+Regression from e59371a4936f8 (7.67.0)
+
+Added test 490, 491 and 492 to verify the functionality.
+
+Reported-by: Kamil Dudka
+Reported-by: Anderson Sasaki
+
+Fixes #4588
+Closes #4591
+
+Upstream-commit: 7a46aeb0be3fa00826b0c47a8bc06eddff448659
+Signed-off-by: Kamil Dudka
+---
+ src/tool_operate.c | 15 ++++---
+ tests/data/Makefile.inc | 2 +
+ tests/data/test490 | 68 +++++++++++++++++++++++++++++++
+ tests/data/test491 | 64 +++++++++++++++++++++++++++++
+ tests/data/test492 | 89 +++++++++++++++++++++++++++++++++++++++++
+ 5 files changed, 232 insertions(+), 6 deletions(-)
+ create mode 100644 tests/data/test490
+ create mode 100644 tests/data/test491
+ create mode 100644 tests/data/test492
+
+diff --git a/src/tool_operate.c b/src/tool_operate.c
+index 3087d2d..4ecb1ed 100644
+--- a/src/tool_operate.c
++++ b/src/tool_operate.c
+@@ -829,12 +829,6 @@ static CURLcode single_transfer(struct GlobalConfig *global,
+ separator = ((!state->outfiles ||
+ !strcmp(state->outfiles, "-")) && urlnum > 1);
+
+- /* Here's looping around each globbed URL */
+-
+- if(state->li >= urlnum) {
+- state->li = 0;
+- state->up++;
+- }
+ if(state->up < state->infilenum) {
+ struct per_transfer *per;
+ struct OutStruct *outs;
+@@ -1908,6 +1902,15 @@ static CURLcode single_transfer(struct GlobalConfig *global,
+ per->retrystart = tvnow();
+
+ state->li++;
++ /* Here's looping around each globbed URL */
++ if(state->li >= urlnum) {
++ state->li = 0;
++ state->urlnum = 0; /* forced reglob of URLs */
++ glob_cleanup(state->urls);
++ state->urls = NULL;
++ state->up++;
++ Curl_safefree(state->uploadfile); /* clear it to get the next */
++ }
+ }
+ else {
+ /* Free this URL node data without destroying the
+diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
+index 557f928..212900e 100644
+--- a/tests/data/Makefile.inc
++++ b/tests/data/Makefile.inc
+@@ -66,6 +66,8 @@ test393 test394 test395 \
+ test400 test401 test402 test403 test404 test405 test406 test407 test408 \
+ test409 \
+ \
++test490 test491 test492 \
++\
+ test500 test501 test502 test503 test504 test505 test506 test507 test508 \
+ test509 test510 test511 test512 test513 test514 test515 test516 test517 \
+ test518 test519 test520 test521 test522 test523 test524 test525 test526 \
+diff --git a/tests/data/test490 b/tests/data/test490
+new file mode 100644
+index 0000000..a3383a9
+--- /dev/null
++++ b/tests/data/test490
+@@ -0,0 +1,68 @@
++
++
++
++HTTP
++HTTP PUT
++
++
++
++#
++# Server-side
++
++
++HTTP/1.1 200 OK
++Date: Thu, 09 Nov 2010 14:49:00 GMT
++Server: test-server/fake
++Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
++ETag: "21025-dc7-39462498"
++Accept-Ranges: bytes
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++Funny-head: yesyes
++
++-foo-
++
++
++
++#
++# Client-side
++
++
++http
++
++
++Two globbed HTTP PUTs
++
++
++http://%HOSTIP:%HTTPPORT/490 -T '{log/in490,log/in490}'
++
++
++surprise!
++
++
++
++#
++# Verify data after the test has been "shot"
++
++
++^User-Agent:.*
++
++
++PUT /490 HTTP/1.1
++Host: 127.0.0.1:8990
++Accept: */*
++Content-Length: 10
++Expect: 100-continue
++
++surprise!
++PUT /490 HTTP/1.1
++Host: 127.0.0.1:8990
++Accept: */*
++Content-Length: 10
++Expect: 100-continue
++
++surprise!
++
++
++
+diff --git a/tests/data/test491 b/tests/data/test491
+new file mode 100644
+index 0000000..b49c06c
+--- /dev/null
++++ b/tests/data/test491
+@@ -0,0 +1,64 @@
++
++
++
++HTTP
++HTTP PUT
++
++
++
++#
++# Server-side
++
++
++HTTP/1.1 200 OK
++Date: Thu, 09 Nov 2010 14:49:00 GMT
++Server: test-server/fake
++Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
++ETag: "21025-dc7-39462498"
++Accept-Ranges: bytes
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++Funny-head: yesyes
++
++-foo-
++
++
++
++#
++# Client-side
++
++
++http
++
++
++Two globbed HTTP PUTs, the second upload file is missing
++
++
++http://%HOSTIP:%HTTPPORT/491 -T '{log/in491,log/bad491}'
++
++
++surprise!
++
++
++
++#
++# Verify data after the test has been "shot"
++
++
++^User-Agent:.*
++
++
++PUT /491 HTTP/1.1
++Host: 127.0.0.1:8990
++Accept: */*
++Content-Length: 10
++Expect: 100-continue
++
++surprise!
++
++
++26
++
++
++
+diff --git a/tests/data/test492 b/tests/data/test492
+new file mode 100644
+index 0000000..12edd8b
+--- /dev/null
++++ b/tests/data/test492
+@@ -0,0 +1,89 @@
++
++
++
++HTTP
++HTTP PUT
++
++
++
++#
++# Server-side
++
++
++HTTP/1.1 200 OK
++Date: Thu, 09 Nov 2010 14:49:00 GMT
++Server: test-server/fake
++Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
++ETag: "21025-dc7-39462498"
++Accept-Ranges: bytes
++Content-Length: 6
++Connection: close
++Content-Type: text/html
++Funny-head: yesyes
++
++-foo-
++
++
++
++#
++# Client-side
++
++
++http
++
++
++Two globbed HTTP PUTs to two globbed URLs
++
++
++'http://%HOSTIP:%HTTPPORT/{one,two}/' -T '{log/first492,log/second492}' -H "Testno: 492"
++
++
++first 492 contents
++
++
++second 492 contents
++
++
++
++#
++# Verify data after the test has been "shot"
++
++
++^User-Agent:.*
++
++
++PUT /one/first492 HTTP/1.1
++Host: 127.0.0.1:8990
++Accept: */*
++Testno: 492
++Content-Length: 19
++Expect: 100-continue
++
++first 492 contents
++PUT /two/first492 HTTP/1.1
++Host: 127.0.0.1:8990
++Accept: */*
++Testno: 492
++Content-Length: 19
++Expect: 100-continue
++
++first 492 contents
++PUT /one/second492 HTTP/1.1
++Host: 127.0.0.1:8990
++Accept: */*
++Testno: 492
++Content-Length: 20
++Expect: 100-continue
++
++second 492 contents
++PUT /two/second492 HTTP/1.1
++Host: 127.0.0.1:8990
++Accept: */*
++Testno: 492
++Content-Length: 20
++Expect: 100-continue
++
++second 492 contents
++
++
++
+--
+2.20.1
+
diff --git a/curl.spec b/curl.spec
index 9d85067..9266e40 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.67.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# fix infinite loop on upload using a glob (#1771025)
+Patch1: 0001-curl-7.67.0-upload-glob.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -171,6 +174,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -346,6 +350,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Thu Nov 28 2019 Kamil Dudka - 7.67.1-2
+- fix infinite loop on upload using a glob (#1771025)
+
* Wed Nov 06 2019 Kamil Dudka - 7.67.1-1
- new upstream release
From eeb37e29bdb6c563bbe9559420ad4d95193dd6e6 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Thu, 14 Nov 2019 16:25:25 +0100
Subject: [PATCH 076/260] Related: #1771025 - fix date in the last change log
entry
---
curl.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index 9266e40..4ca9d0d 100644
--- a/curl.spec
+++ b/curl.spec
@@ -350,7 +350,7 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
-* Thu Nov 28 2019 Kamil Dudka - 7.67.1-2
+* Thu Nov 14 2019 Kamil Dudka - 7.67.1-2
- fix infinite loop on upload using a glob (#1771025)
* Wed Nov 06 2019 Kamil Dudka - 7.67.1-1
From d1233ad4cd39ea577a23ac966607d0ca04726b13 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Fri, 15 Nov 2019 10:37:39 +0100
Subject: [PATCH 077/260] do not run test-suite through valgrind on i686 brew
builds
The architecture is being decommissioned in Fedora, which makes it
difficult to debug valgrind failures (usually not related to curl
anyway).
---
curl.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index 4ca9d0d..85901fe 100644
--- a/curl.spec
+++ b/curl.spec
@@ -83,7 +83,7 @@ BuildRequires: perl(vars)
# to be less reliable, in order to avoid unnecessary build failures (see RHBZ
# #810992, #816175, and #886891). Nevertheless developers are free to install
# valgrind manually to improve test coverage on any architecture.
-%ifarch x86_64 %{ix86}
+%ifarch x86_64
BuildRequires: valgrind
%endif
From 13f70ceee2ecaf605d8e4fa3bd3674480a16a261 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 8 Jan 2020 09:46:20 +0100
Subject: [PATCH 078/260] fix upstream release number in last two change log
items
---
curl.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/curl.spec b/curl.spec
index 85901fe..3c38b8f 100644
--- a/curl.spec
+++ b/curl.spec
@@ -350,10 +350,10 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
-* Thu Nov 14 2019 Kamil Dudka - 7.67.1-2
+* Thu Nov 14 2019 Kamil Dudka - 7.67.0-2
- fix infinite loop on upload using a glob (#1771025)
-* Wed Nov 06 2019 Kamil Dudka - 7.67.1-1
+* Wed Nov 06 2019 Kamil Dudka - 7.67.0-1
- new upstream release
* Wed Sep 11 2019 Kamil Dudka - 7.66.0-1
From dfb411a0a2e97508bf2228085e09ea904f711f66 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 8 Jan 2020 09:45:26 +0100
Subject: [PATCH 079/260] new upstream release - 7.68.0
---
0001-curl-7.67.0-upload-glob.patch | 316 ------------------------
0102-curl-7.36.0-debug.patch | 2 +-
0105-curl-7.63.0-lib1560-valgrind.patch | 2 +-
curl-7.67.0.tar.xz.asc | 11 -
curl-7.68.0.tar.xz.asc | 11 +
curl.spec | 11 +-
sources | 2 +-
7 files changed, 19 insertions(+), 336 deletions(-)
delete mode 100644 0001-curl-7.67.0-upload-glob.patch
delete mode 100644 curl-7.67.0.tar.xz.asc
create mode 100644 curl-7.68.0.tar.xz.asc
diff --git a/0001-curl-7.67.0-upload-glob.patch b/0001-curl-7.67.0-upload-glob.patch
deleted file mode 100644
index 257eb22..0000000
--- a/0001-curl-7.67.0-upload-glob.patch
+++ /dev/null
@@ -1,316 +0,0 @@
-From 37a36231c5e34ae31b1968481fad2e8d76613fbd Mon Sep 17 00:00:00 2001
-From: Daniel Stenberg
-Date: Wed, 13 Nov 2019 11:33:29 +0100
-Subject: [PATCH] curl: fix -T globbing
-
-Regression from e59371a4936f8 (7.67.0)
-
-Added test 490, 491 and 492 to verify the functionality.
-
-Reported-by: Kamil Dudka
-Reported-by: Anderson Sasaki
-
-Fixes #4588
-Closes #4591
-
-Upstream-commit: 7a46aeb0be3fa00826b0c47a8bc06eddff448659
-Signed-off-by: Kamil Dudka
----
- src/tool_operate.c | 15 ++++---
- tests/data/Makefile.inc | 2 +
- tests/data/test490 | 68 +++++++++++++++++++++++++++++++
- tests/data/test491 | 64 +++++++++++++++++++++++++++++
- tests/data/test492 | 89 +++++++++++++++++++++++++++++++++++++++++
- 5 files changed, 232 insertions(+), 6 deletions(-)
- create mode 100644 tests/data/test490
- create mode 100644 tests/data/test491
- create mode 100644 tests/data/test492
-
-diff --git a/src/tool_operate.c b/src/tool_operate.c
-index 3087d2d..4ecb1ed 100644
---- a/src/tool_operate.c
-+++ b/src/tool_operate.c
-@@ -829,12 +829,6 @@ static CURLcode single_transfer(struct GlobalConfig *global,
- separator = ((!state->outfiles ||
- !strcmp(state->outfiles, "-")) && urlnum > 1);
-
-- /* Here's looping around each globbed URL */
--
-- if(state->li >= urlnum) {
-- state->li = 0;
-- state->up++;
-- }
- if(state->up < state->infilenum) {
- struct per_transfer *per;
- struct OutStruct *outs;
-@@ -1908,6 +1902,15 @@ static CURLcode single_transfer(struct GlobalConfig *global,
- per->retrystart = tvnow();
-
- state->li++;
-+ /* Here's looping around each globbed URL */
-+ if(state->li >= urlnum) {
-+ state->li = 0;
-+ state->urlnum = 0; /* forced reglob of URLs */
-+ glob_cleanup(state->urls);
-+ state->urls = NULL;
-+ state->up++;
-+ Curl_safefree(state->uploadfile); /* clear it to get the next */
-+ }
- }
- else {
- /* Free this URL node data without destroying the
-diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
-index 557f928..212900e 100644
---- a/tests/data/Makefile.inc
-+++ b/tests/data/Makefile.inc
-@@ -66,6 +66,8 @@ test393 test394 test395 \
- test400 test401 test402 test403 test404 test405 test406 test407 test408 \
- test409 \
- \
-+test490 test491 test492 \
-+\
- test500 test501 test502 test503 test504 test505 test506 test507 test508 \
- test509 test510 test511 test512 test513 test514 test515 test516 test517 \
- test518 test519 test520 test521 test522 test523 test524 test525 test526 \
-diff --git a/tests/data/test490 b/tests/data/test490
-new file mode 100644
-index 0000000..a3383a9
---- /dev/null
-+++ b/tests/data/test490
-@@ -0,0 +1,68 @@
-+
-+
-+
-+HTTP
-+HTTP PUT
-+
-+
-+
-+#
-+# Server-side
-+
-+
-+HTTP/1.1 200 OK
-+Date: Thu, 09 Nov 2010 14:49:00 GMT
-+Server: test-server/fake
-+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
-+ETag: "21025-dc7-39462498"
-+Accept-Ranges: bytes
-+Content-Length: 6
-+Connection: close
-+Content-Type: text/html
-+Funny-head: yesyes
-+
-+-foo-
-+
-+
-+
-+#
-+# Client-side
-+
-+
-+http
-+
-+
-+Two globbed HTTP PUTs
-+
-+
-+http://%HOSTIP:%HTTPPORT/490 -T '{log/in490,log/in490}'
-+
-+
-+surprise!
-+
-+
-+
-+#
-+# Verify data after the test has been "shot"
-+
-+
-+^User-Agent:.*
-+
-+
-+PUT /490 HTTP/1.1
-+Host: 127.0.0.1:8990
-+Accept: */*
-+Content-Length: 10
-+Expect: 100-continue
-+
-+surprise!
-+PUT /490 HTTP/1.1
-+Host: 127.0.0.1:8990
-+Accept: */*
-+Content-Length: 10
-+Expect: 100-continue
-+
-+surprise!
-+
-+
-+
-diff --git a/tests/data/test491 b/tests/data/test491
-new file mode 100644
-index 0000000..b49c06c
---- /dev/null
-+++ b/tests/data/test491
-@@ -0,0 +1,64 @@
-+
-+
-+
-+HTTP
-+HTTP PUT
-+
-+
-+
-+#
-+# Server-side
-+
-+
-+HTTP/1.1 200 OK
-+Date: Thu, 09 Nov 2010 14:49:00 GMT
-+Server: test-server/fake
-+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
-+ETag: "21025-dc7-39462498"
-+Accept-Ranges: bytes
-+Content-Length: 6
-+Connection: close
-+Content-Type: text/html
-+Funny-head: yesyes
-+
-+-foo-
-+
-+
-+
-+#
-+# Client-side
-+
-+
-+http
-+
-+
-+Two globbed HTTP PUTs, the second upload file is missing
-+
-+
-+http://%HOSTIP:%HTTPPORT/491 -T '{log/in491,log/bad491}'
-+
-+
-+surprise!
-+
-+
-+
-+#
-+# Verify data after the test has been "shot"
-+
-+
-+^User-Agent:.*
-+
-+
-+PUT /491 HTTP/1.1
-+Host: 127.0.0.1:8990
-+Accept: */*
-+Content-Length: 10
-+Expect: 100-continue
-+
-+surprise!
-+
-+
-+26
-+
-+
-+
-diff --git a/tests/data/test492 b/tests/data/test492
-new file mode 100644
-index 0000000..12edd8b
---- /dev/null
-+++ b/tests/data/test492
-@@ -0,0 +1,89 @@
-+
-+
-+
-+HTTP
-+HTTP PUT
-+
-+
-+
-+#
-+# Server-side
-+
-+
-+HTTP/1.1 200 OK
-+Date: Thu, 09 Nov 2010 14:49:00 GMT
-+Server: test-server/fake
-+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
-+ETag: "21025-dc7-39462498"
-+Accept-Ranges: bytes
-+Content-Length: 6
-+Connection: close
-+Content-Type: text/html
-+Funny-head: yesyes
-+
-+-foo-
-+
-+
-+
-+#
-+# Client-side
-+
-+
-+http
-+
-+
-+Two globbed HTTP PUTs to two globbed URLs
-+
-+
-+'http://%HOSTIP:%HTTPPORT/{one,two}/' -T '{log/first492,log/second492}' -H "Testno: 492"
-+
-+
-+first 492 contents
-+
-+
-+second 492 contents
-+
-+
-+
-+#
-+# Verify data after the test has been "shot"
-+
-+
-+^User-Agent:.*
-+
-+
-+PUT /one/first492 HTTP/1.1
-+Host: 127.0.0.1:8990
-+Accept: */*
-+Testno: 492
-+Content-Length: 19
-+Expect: 100-continue
-+
-+first 492 contents
-+PUT /two/first492 HTTP/1.1
-+Host: 127.0.0.1:8990
-+Accept: */*
-+Testno: 492
-+Content-Length: 19
-+Expect: 100-continue
-+
-+first 492 contents
-+PUT /one/second492 HTTP/1.1
-+Host: 127.0.0.1:8990
-+Accept: */*
-+Testno: 492
-+Content-Length: 20
-+Expect: 100-continue
-+
-+second 492 contents
-+PUT /two/second492 HTTP/1.1
-+Host: 127.0.0.1:8990
-+Accept: */*
-+Testno: 492
-+Content-Length: 20
-+Expect: 100-continue
-+
-+second 492 contents
-+
-+
-+
---
-2.20.1
-
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index 53022e1..c227258 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16331,18 +16331,11 @@ $as_echo "yes" >&6; }
+@@ -16336,18 +16336,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/0105-curl-7.63.0-lib1560-valgrind.patch b/0105-curl-7.63.0-lib1560-valgrind.patch
index 8121ee6..d37d283 100644
--- a/0105-curl-7.63.0-lib1560-valgrind.patch
+++ b/0105-curl-7.63.0-lib1560-valgrind.patch
@@ -33,7 +33,7 @@ index 080421b..ea3b806 100644
+lib1560_CFLAGS = $(AM_CFLAGS) -fno-builtin-strcmp
lib1560_LDADD = $(TESTUTIL_LIBS)
- lib1591_SOURCES = lib1591.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+ lib1564_SOURCES = lib1564.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
--
2.17.2
diff --git a/curl-7.67.0.tar.xz.asc b/curl-7.67.0.tar.xz.asc
deleted file mode 100644
index e44cfc6..0000000
--- a/curl-7.67.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl3CauAACgkQXMkI/bce
-EsKe7Qf+Py/Wufz3AqqpJ1Xr0oigaV1Sa5AAyRD+KX8jwSJTRaRahaECGMhmR9vh
-kBaMFtycctCKcK1masI9GSeTX5nCtmaWzELLsBXynm/l2W+hrW1AD2R++YuM384t
-O078GxgsgRH0m8MacSKoV5yPOv/h9URnVMTavkAIfnW50vw17akDZ9MW2NhJzKpP
-s6GgWTMB5gomTHlnlHjTjtNoVbKKrV4v9YyRwqzI3XHXYtYOA7iufP4wnT+dpSm5
-ZLdbg5Nq+1pCTEiMg3KZKYNriypoLJuWuSF+bKc54CGN63eoUxXgU6js9ViHS5JS
-3dPfzzRA8wgROem58QhHnrR9c2CmdQ==
-=5gov
------END PGP SIGNATURE-----
diff --git a/curl-7.68.0.tar.xz.asc b/curl-7.68.0.tar.xz.asc
new file mode 100644
index 0000000..1aee04b
--- /dev/null
+++ b/curl-7.68.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl4Vd+gACgkQXMkI/bce
+EsILUwf/YMvltTP+zlsldTRctrfC7FIZkjjj+pYylejKVajl84NZ+JnrH7o/zRyx
+blZ+D6b8CYW/3It+IPxtGPvUXW0rhmBU4ClT39mXfZBV19+WhCX7rIi3Y/ylTQ0Y
+rCfKNmiw+51u0Mug6cgsV+OAjDyLSsCu/VpWY7wyBBCHwZxYHshcdxbMvps0FBhO
+odCmP7wtXfDKxXiycGzgRxoKQ2Xd4EmBxICecPOvPnVmrCJdANjyrPQHsY8FYPG9
+piZ+bwxKCtZLfA6jsYKGelEh8KUew5eTBoSYCz7oXsPFeCmKVaRIPHYxe+RKlG9C
+IklQkFVg3FqWvtGU2eXOALyxrZnRUQ==
+=XyDf
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index 3c38b8f..256bf4a 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,10 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.67.0
-Release: 2%{?dist}
+Version: 7.68.0
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
-# fix infinite loop on upload using a glob (#1771025)
-Patch1: 0001-curl-7.67.0-upload-glob.patch
-
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -174,7 +171,6 @@ be installed.
%setup -q
# upstream patches
-%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -350,6 +346,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Jan 08 2020 Kamil Dudka - 7.68.0-1
+- new upstream release
+
* Thu Nov 14 2019 Kamil Dudka - 7.67.0-2
- fix infinite loop on upload using a glob (#1771025)
diff --git a/sources b/sources
index 16e8545..f923f78 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.67.0.tar.xz) = 1d5a344be92dd61b1ba5189eff0fe337e492f2e850794943570fe71c985d0af60bd412082be646e07aaa8639908593e1ce4bb2d07db35394ec377e8ce8b9ae29
+SHA512 (curl-7.68.0.tar.xz) = bf365609c9a66a05b3a263d02bcd3f81f905570c5739c8ec522a296b4b8e2a479d64d5524e8345e14eafad28995ee22d923522f1a45fa40eb46db38759c2eb2c
From 83181bd6d31f4b9d070588741471f6fc4e0ae42d Mon Sep 17 00:00:00 2001
From: Fedora Release Engineering
Date: Tue, 28 Jan 2020 15:11:40 +0000
Subject: [PATCH 080/260] - Rebuilt for
https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering
---
curl.spec | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/curl.spec b/curl.spec
index 256bf4a..c5b13af 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.68.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -346,6 +346,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Tue Jan 28 2020 Fedora Release Engineering - 7.68.0-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
+
* Wed Jan 08 2020 Kamil Dudka - 7.68.0-1
- new upstream release
From 249d0aea514d8c09b6acbcb55074b50a2e1973f1 Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Wed, 4 Mar 2020 11:39:00 +0100
Subject: [PATCH 081/260] new upstream release - 7.69.0
---
0102-curl-7.36.0-debug.patch | 2 +-
curl-7.68.0.tar.xz.asc | 11 -----------
curl-7.69.0.tar.xz.asc | 11 +++++++++++
curl.spec | 7 +++++--
sources | 2 +-
5 files changed, 18 insertions(+), 15 deletions(-)
delete mode 100644 curl-7.68.0.tar.xz.asc
create mode 100644 curl-7.69.0.tar.xz.asc
diff --git a/0102-curl-7.36.0-debug.patch b/0102-curl-7.36.0-debug.patch
index c227258..e9b3848 100644
--- a/0102-curl-7.36.0-debug.patch
+++ b/0102-curl-7.36.0-debug.patch
@@ -12,7 +12,7 @@ diff --git a/configure b/configure
index 8f079a3..53b4774 100755
--- a/configure
+++ b/configure
-@@ -16336,18 +16336,11 @@ $as_echo "yes" >&6; }
+@@ -16343,18 +16343,11 @@ $as_echo "yes" >&6; }
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
diff --git a/curl-7.68.0.tar.xz.asc b/curl-7.68.0.tar.xz.asc
deleted file mode 100644
index 1aee04b..0000000
--- a/curl-7.68.0.tar.xz.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-
-iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl4Vd+gACgkQXMkI/bce
-EsILUwf/YMvltTP+zlsldTRctrfC7FIZkjjj+pYylejKVajl84NZ+JnrH7o/zRyx
-blZ+D6b8CYW/3It+IPxtGPvUXW0rhmBU4ClT39mXfZBV19+WhCX7rIi3Y/ylTQ0Y
-rCfKNmiw+51u0Mug6cgsV+OAjDyLSsCu/VpWY7wyBBCHwZxYHshcdxbMvps0FBhO
-odCmP7wtXfDKxXiycGzgRxoKQ2Xd4EmBxICecPOvPnVmrCJdANjyrPQHsY8FYPG9
-piZ+bwxKCtZLfA6jsYKGelEh8KUew5eTBoSYCz7oXsPFeCmKVaRIPHYxe+RKlG9C
-IklQkFVg3FqWvtGU2eXOALyxrZnRUQ==
-=XyDf
------END PGP SIGNATURE-----
diff --git a/curl-7.69.0.tar.xz.asc b/curl-7.69.0.tar.xz.asc
new file mode 100644
index 0000000..dffe2da
--- /dev/null
+++ b/curl-7.69.0.tar.xz.asc
@@ -0,0 +1,11 @@
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAl5fTaIACgkQXMkI/bce
+EsIyaAf8DEjmWf+UpZDBjyirl6PuNfxpgZGm8Qw5eWBKD1rdQuMjZ3xJLauAR34G
+fYvsj8cYotUaIPHw4jWcvn6m/M5KFII6XWANcasn7edbg47BcXS6xadNkUnqcJnF
+0U9YbghGXaj0CwaNjqP4Gv23oG2nuYyWhUzI4wD8cRcO3oE/5Wksfwhwq5DrnpuQ
+CLlgP8o9qMgfrds87WK4Gb+AFHW4jkCAT2wnJBvtEfK97pG1E9y7S8l5oZ7H8hTe
+Vm3UgM8Stk13yPCCN3nOaTdPKk5nA6co7VWW5TbjJPQ+6mT+eD6SY/+k5yJ+A11X
+zaXOa3fXEJiRX3nfAR47iThh2Pj8wA==
+=baDZ
+-----END PGP SIGNATURE-----
diff --git a/curl.spec b/curl.spec
index c5b13af..dacb502 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
-Version: 7.68.0
-Release: 2%{?dist}
+Version: 7.69.0
+Release: 1%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
@@ -346,6 +346,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Wed Mar 04 2020 Kamil Dudka - 7.69.0-1
+- new upstream release
+
* Tue Jan 28 2020 Fedora Release Engineering - 7.68.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
diff --git a/sources b/sources
index f923f78..63cb9a9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (curl-7.68.0.tar.xz) = bf365609c9a66a05b3a263d02bcd3f81f905570c5739c8ec522a296b4b8e2a479d64d5524e8345e14eafad28995ee22d923522f1a45fa40eb46db38759c2eb2c
+SHA512 (curl-7.69.0.tar.xz) = 8c151201b09c51cc1437c2f6345036fce88ea5402cd1fd62b76c093e294b87d0c1f61e1dcf6f799f508d8dcfe381589a3815001a8c8bbc085aed0fdca6f2536d
From fbcad9a3a0d50831db86e64633da4c9ba983650c Mon Sep 17 00:00:00 2001
From: Kamil Dudka
Date: Mon, 9 Mar 2020 09:53:54 +0100
Subject: [PATCH 082/260] Resolves: #1810989 - make Flatpak work again
---
0001-curl-7.69.0-flatpak.patch | 58 ++++++++++++++++++++++++++++++++++
curl.spec | 9 +++++-
2 files changed, 66 insertions(+), 1 deletion(-)
create mode 100644 0001-curl-7.69.0-flatpak.patch
diff --git a/0001-curl-7.69.0-flatpak.patch b/0001-curl-7.69.0-flatpak.patch
new file mode 100644
index 0000000..0268258
--- /dev/null
+++ b/0001-curl-7.69.0-flatpak.patch
@@ -0,0 +1,58 @@
+From 2c706c44b98998fa619ddc63b2c14955b0f50692 Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg
+Date: Thu, 5 Mar 2020 23:45:36 +0100
+Subject: [PATCH] Revert "pause: force-drain the transfer on unpause"
+
+This reverts commit fa0216b294af4c7113a9040ca65eefc7fc18ac1c (from #5000)
+
+Clearly that didn't solve the problem correctly.
+
+Reported-by: Christopher Reid
+Reopens #4966
+Fixes #5044
+
+Upstream-commit: 8aa04e9a24932b830bc5eaf6838dea5a3329341e
+Signed-off-by: Kamil Dudka
+---
+ lib/easy.c | 1 -
+ lib/transfer.c | 5 ++---
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/lib/easy.c b/lib/easy.c
+index 1a69127..4546210 100644
+--- a/lib/easy.c
++++ b/lib/easy.c
+@@ -1033,7 +1033,6 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action)
+ to have this handle checked soon */
+ if((newstate & (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
+ (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) {
+- data->state.drain++;
+ Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */
+ if(data->multi)
+ Curl_update_timer(data->multi);
+diff --git a/lib/transfer.c b/lib/transfer.c
+index 8270761..ead8b36 100644
+--- a/lib/transfer.c
++++ b/lib/transfer.c
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2020, Daniel Stenberg, , et al.
++ * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -1217,8 +1217,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
+ else
+ fd_write = CURL_SOCKET_BAD;
+
+- if(data->state.drain) {
+- data->state.drain--;
++ if(conn->data->state.drain) {
+ select_res |= CURL_CSELECT_IN;
+ DEBUGF(infof(data, "Curl_readwrite: forcibly told to drain data\n"));
+ }
+--
+2.21.1
+
diff --git a/curl.spec b/curl.spec
index dacb502..67e623c 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,10 +1,13 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.69.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.xz
+# make Flatpak work again (#1810989)
+Patch1: 0001-curl-7.69.0-flatpak.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.32.0-multilib.patch
@@ -171,6 +174,7 @@ be installed.
%setup -q
# upstream patches
+%patch1 -p1
# Fedora patches
%patch101 -p1
@@ -346,6 +350,9 @@ rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
%{_libdir}/libcurl.so.4.[0-9].[0-9].minimal
%changelog
+* Mon Mar 09 2020 Kamil Dudka