Bug 1475861 - Download using FTPS makes wget abort
Download using FTPS makes wget abort
Status: NEW
Product: Fedora
Classification: Fedora
Component: wget (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomáš Hozza
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-27 09:35 EDT by Ondřej Lysoněk
Modified: 2017-08-04 12:32 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
trace (2.93 KB, text/plain)
2017-07-27 09:35 EDT, Ondřej Lysoněk
no flags Details

  None (edit)
Description Ondřej Lysoněk 2017-07-27 09:35:02 EDT
Created attachment 1305372 [details]
trace

Description of problem:
When downloading a file over FTPS, wget aborts.

Version-Release number of selected component (if applicable):
wget-1.19.1-3.fc26.x86_64
vsftpd-3.0.3-5.fc26.x86_64

Steps to Reproduce:
cd /etc/vsftpd
# Modify the default vsftpd.conf
cat >> vsftpd.conf << EOF
ssl_enable=YES
allow_anon_ssl=YES
rsa_cert_file=/etc/vsftpd/a.crt
rsa_private_key_file=/etc/vsftpd/a.key
require_ssl_reuse=NO
EOF
openssl req -newkey rsa:2048 -nodes -keyout a.key -x509 -days 365 -out a.crt
cd /var/ftp/pub
echo test > test
systemctl restart vsftpd
cd
wget ftps://localhost/pub/test

Actual results:
wget aborts.

Expected results:
It shouldn't abort, should exit in a regular way.

Additional info:
The following works:
wget --no-check-certificate ftps://localhost/pub/test
Comment 1 Roman Žilka 2017-08-04 12:32:35 EDT
The SIGABRT occurs in the error-handling switch at src/ftp.c:1973. The getftp() call a few lines above it returns VERIFCERTERR because of the bad cert, but the switch doesn't handle that particular result and ends up abort()ing the process in the "default:" branch. If I append "case VERIFCERTERR:" to line 1975 (similarly to the way the situation is handled in src/http.c), no abnormal termination happens and wget exits with retcode 5.

Hopefully this saves someone a bit of debugging.

Referenced: vanilla wget-1.19.1, but everything is probably valid for 1.19.1-3.fc26 as well. The bug is also found in upstream git.

Note You need to log in before you can comment on or make changes to this bug.