Bug 1771025

Summary: curl enters in infinite loop if multiple file upload using scp or sftp is requested
Product: [Fedora] Fedora Reporter: Anderson Sasaki <ansasaki>
Component: curlAssignee: Kamil Dudka <kdudka>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: john.j5live, kdudka, msekleta, paul, raysatiro
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: curl-7.67.0-2.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-15 10:37:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anderson Sasaki 2019-11-11 18:27:47 UTC
Description of problem:
curl gets stuck in a loop printing an error message when an upload of multiple files is requested. The error message is:

curl: (3) URL using bad/illegal format or missing URL

Version-Release number of selected component (if applicable):
curl-7.67.0-1.fc32.x86_64

How reproducible:
always

Steps to Reproduce:
1. Request a scp file upload passing multiple files:

$ curl -T '{uploadfile1,uploadfile2}' scp://localhost/home/curltestuser/ -u curltestuser: --key /root/.ssh/id_rsa --pubkey /root/.ssh/id_rsa.pub 

Actual results:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 50.0M    0     0    0 50.0M      0  55.0M --:--:-- --:--:-- --:--:-- 54.9M
100 50.0M    0     0    0 50.0M      0  55.0M --:--:-- --:--:-- --:--:-- 55.0M
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
(...)

Expected results:
Files are uploaded successfully

Additional info:
- Fails using scp or sftp
- The new version (curl-7.67.0-1.fc32.x86_64) fails independently of the libssh version
- The previous curl version (curl-7.66.0-1.fc32.x86_64) works as expected.

Comment 1 Kamil Dudka 2019-11-12 09:05:39 UTC
Thank you for reporting it!  This looks indeed broken.

Comment 2 Kamil Dudka 2019-11-12 11:31:01 UTC
This bug seems to be introduced by the following upstream commit:

https://github.com/curl/curl/commit/curl-7_66_0-129-ge59371a49

Comment 3 Kamil Dudka 2019-11-12 12:00:58 UTC
Reported upstream:

https://github.com/curl/curl/issues/4588

Comment 4 Kamil Dudka 2019-11-14 08:31:26 UTC
Upstream pull request:

https://github.com/curl/curl/pull/4591

Comment 5 Kamil Dudka 2019-11-14 12:53:12 UTC
Upstream commit that fixes this bug:

https://github.com/curl/curl/commit/curl-7_67_0-24-g7a46aeb0b

Comment 6 Kamil Dudka 2019-11-14 13:44:51 UTC
dist-git commit:

https://src.fedoraproject.org/rpms/curl/c/2298078d

Comment 7 Paul Howarth 2019-11-14 14:03:46 UTC
(In reply to Kamil Dudka from comment #6)
> dist-git commit:
> 
> https://src.fedoraproject.org/rpms/curl/c/2298078d

Changelog: today is the 14th November, not the 28th...

Comment 8 Kamil Dudka 2019-11-14 15:28:03 UTC
(In reply to Paul Howarth from comment #7)
> Changelog: today is the 14th November, not the 28th...

Indeed, fixed via https://src.fedoraproject.org/rpms/curl/c/eeb37e29

Thank you for letting me know, Paul!