#958469 vsftpd: FTPS upload using curl to vsftpd server fails for large file

Package:
vsftpd
Source:
vsftpd
Description:
lightweight, efficient FTP server written for security
Submitter:
David Oliver
Date:
2026-06-25 15:47:57 UTC
Severity:
important
#958469#5
Date:
2020-04-22 14:29:11 UTC
From:
To:
Dear Maintainer,

FTPS uploads using curl to a vsftpd server running on either Debian 10.1 or Debian 10.3 and on either arm64 or amd64 don't seem to work for large files (>=~50kB). Using the same curl command and vsftpd server worked for small files of 1kB. I tried changing server configuration options both in curl and the vsftpd server to no avail. I then tried using the same vsftpd configuration file on a vsftpd server on both Debian 8 and Debian 9, and both worked for all files sizes I tested (1kB-1GB). I also tried using filezilla to do an FTPS upload of a large file (1GB) to the Debian 10 vsftpd server, which was successful.

After much experimentation, it seems that the issue is related to the version on libssl1.1 that is being used. In Debian 10, libssl1.1 is at version 1.1.1 while in Debian 9 it is at version 1.1.0. I installed libssl version 1.1.0j-1~deb9u1 on my Debian 10 server, and the FTPS upload started working for large files.

To summarise:

curl        ->    Debian 10.3, vsftpd 3.0.3-12, libssl1.1 1.1.1d-0+deb10u2 doesn't work for large files
curl        ->    Debian 10.1, vsftpd 3.0.3-12, libssl1.1 1.1.1c-1 doesn't work for large files
filezilla   ->    Debian 10.1, vsftpd 3.0.3-12, libssl1.1 1.1.1c-1 works
curl        ->    Debian  9.9, vsftpd 3.0.3-8 , libssl1.1 1.1.0j-1~deb9u1  works
curl        ->    Debian 10.1, vsftpd 3.0.3-8 , libssl1.1 1.1.1c-1 doesn't work for large files
curl        ->    Debian 10.1, vsftpd 3.0.3-8 , libssl1.1 1.1.0j-1~deb9u1  works
curl        ->    Debian 10.1, vsftpd 3.0.3-12, libssl1.1 1.1.0j-1~deb9u1  works

The verbose curl output for the failed FTPS upload of a large file:

"
< 220 (vsFTPd 3.0.3)
< 234 Proceed with negotiation.
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [88 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [155 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [6 bytes data]
* TLSv1.3 (IN), TLS handshake, Request CERT (13):
{ [192 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [2613 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [264 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS handshake, Certificate (11):
} [2664 bytes data]
* TLSv1.3 (OUT), TLS handshake, CERT verify (15):
} [264 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
*  SSL certificate verify ok.
} [5 bytes data]
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [1417 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [1417 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
< 331 Please specify the password.
} [5 bytes data]
{ [5 bytes data]
< 230 Login successful.
} [5 bytes data]
{ [5 bytes data]
< 200 PBSZ set to 0.
} [5 bytes data]
{ [5 bytes data]
< 200 PROT now Private.
} [5 bytes data]
{ [5 bytes data]
< 257 "/" is the current directory
* Entry path is '/'
} [5 bytes data]
* ftp_perform ends with SECONDARY: 0
{ [5 bytes data]
< 250 Directory successfully changed.
} [5 bytes data]
* Connect data stream passively
{ [5 bytes data]
< 229 Entering Extended Passive Mode (|||10091|)
*   Trying 10.0.5.52...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x55bd9976be80)
* Connecting to -
* Connected to - } [5 bytes data]
{ [5 bytes data]
< 200 Switching to Binary mode.
} [5 bytes data]
{ [5 bytes data]
< 150 Ok to send data.
* Doing the SSL/TLS handshake on the data stream
* SSL re-using session ID
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [1733 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [88 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [1766 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [161 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [6 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* Server certificate:
*  SSL certificate verify ok.
} [5 bytes data]
* We are completely uploaded and fine
* Remembering we are in dir "files/"
} [5 bytes data]
* TLSv1.3 (OUT), TLS alert, close notify (256):
} [2 bytes data]
< 426 Failure reading network stream.
* server did not report OK, got 426
100 1024k    0     0  100 1024k      0  2892k --:--:-- --:--:-- --:--:-- 2892k
* Connection #0 to host 10.0.5.52 left intact
curl: (18) server did not report OK, got 426
"

The verbose output of a successful upload of a small 1k file is identical except instead of:
"
< 426 Failure reading network stream.
* server did not report OK, got 426
100 1024k    0     0  100 1024k      0  2892k --:--:-- --:--:-- --:--:-- 2892k
"
it has:
"
< 226 Transfer complete.

100  1024    0     0  100  1024      0   2860 --:--:-- --:--:-- --:--:--  2860
"

Enabling debug_ssl in vsftpd returns this value in the logs when the upload of a large file fails:
"
SSL ret: 18446744073709551615, SSL error: error:00000000:lib(0):func(0):reason(0), errno: 32
"

#958469#10
Date:
2026-06-25 15:40:06 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
vsftpd, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 958469@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Keng-Yu Lin <kengyu@debian.org> (supplier of updated vsftpd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Thu, 25 Jun 2026 22:40:00 +0800
Source: vsftpd
Built-For-Profiles: noudeb
Architecture: source
Version: 3.0.5-1
Distribution: unstable
Urgency: medium
Maintainer: Keng-Yu Lin <kengyu@debian.org>
Changed-By: Keng-Yu Lin <kengyu@debian.org>
Closes: 644920 825271 827550 838678 844297 885402 929958 950577 950584 952421 958469 961712 968888 973766 1012476
Changes:
 vsftpd (3.0.5-1) unstable; urgency=medium
 .
   * Add debian/patches/0079-debian-bugfixes.patch to address multiple bugs:
     - Return 502 Command not implemented instead of 550 for disabled
       PASV/PORT commands (Closes: #1012476).
     - Document the Debian-specific utf8_filesystem option in the
       man page (Closes: #950577).
     - Trim leading and trailing whitespace/tabs in vsftpd.conf parsing
       to prevent startup failures due to extra spaces (Closes: #950584).
     - Dynamically fall back to IPv4 listening if IPv6 is disabled in
       the kernel, avoiding package installation and daemon startup
       failures (Closes: #961712).
   * Add debian/patches/0080-pam-exec-hang.patch to prevent hanging in
     the SIGCHLD handler when using PAM modules that spawn subprocesses,
     e.g. pam_exec (Closes: #952421, #827550).
   * Add debian/patches/0081-pasv-address-ipv6.patch to fix pasv_address
     being ignored when listen_ipv6 is enabled and clients connect
     via IPv4 (Closes: #968888).
   * Add debian/patches/0082-debian-bugfixes-tls-utf8.patch to fix:
     - Cap TLS 1.3 session ticket lifetime at 7 days (604800s) instead
       of INT_MAX to comply with RFC 8446, preventing connection drops on
       both control and data channels (Closes: #929958, #958469).
     - Allow UTF-8 characters (high bytes >= 128) in logs and fix 177
       typo in printability check (Closes: #644920).
     - Fix assignment typo in vsf_sysutil_realpath causing double slashes
       when resolving paths under the root directory (Closes: #825271).
     - Remove obsolete absolute paths to pam_userdb.so in virtual users
       examples (Closes: #885402).
   * Move adduser from Recommends to Depends to satisfy postinst script.
   * Officially close historically resolved/satisfied bugs that were left
     open in the Debian Bug Tracking System (Closes: #838678, #844297, #973766).
Checksums-Sha1:
 e89a4181f761a4c2ab46650e236eebec5b2a2fa4 1979 vsftpd_3.0.5-1.dsc
 6032bde540e8463743db9c38fba3a9cc2a584509 40932 vsftpd_3.0.5-1.debian.tar.xz
 41a2d3204773be4132348141d58f877b958cc5a5 7662 vsftpd_3.0.5-1_source.buildinfo
Checksums-Sha256:
 b7d0b80446298de719b9c75480454ea4d0fe80f487684c7df8d1f0c71d2a055e 1979 vsftpd_3.0.5-1.dsc
 4f24fdf374d2ff2bb0a749ef3a6db110ca3a30577c053a7ffaa902d882b2c843 40932 vsftpd_3.0.5-1.debian.tar.xz
 f1b81ef09409584caa63d48ecd019889e34d6cb26f28ac1725ecad328a655d35 7662 vsftpd_3.0.5-1_source.buildinfo
Files:
 1535e6c2a8445e6a8306b294975b42a7 1979 net - vsftpd_3.0.5-1.dsc
 f23c7fde59435c896033cc7d9fa24b3f 40932 net - vsftpd_3.0.5-1.debian.tar.xz
 ccc1766c8c9970127a3c28aad71a0eb8 7662 net - vsftpd_3.0.5-1_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEdwtc2/tLhothQ0hFxheGnxR4UE4FAmo9RpoSHGtlbmd5dUBk
ZWJpYW4ub3JnAAoJEMYXhp8UeFBOBZoQAJgA0vT6Cy/3UEQftfU3aMmIl5xAoNxj
nbB64UaCtToVZiu1LMD36RpzRAf82aaO1MyGXkg4YkaR1DQWkvmmLEKn9vN2BgqQ
Z+TPEOKYSfum5BbfTpWI0OKEAzt6TgtcV12q6SdSZbDT7qlUQDKxZicojKXePCCN
gdH7PetlN4+w6c4czyYl+Vg5aSPv7qqrvroK6FONz5Q90B6kj+1wdvL3jjkhTYgr
1uIlmR9hLVsI/ab6OmHbtn7VjlO1XKE2NMrGr+NcCPFmSjVU1dUmcY+0pdojB8y7
u+vm0CT4KXI46RGUSTkrVKvibo/jdtrRG9WYKLN6sTMa69k310LUvZwuVaMT8kuJ
k9VvVWrHL83f9vjAPkXck722caYQ2QTzkcMQVFWts4WTFTktAHyPaLA+w3OXKiys
thpp5H7uBWLQukg7x4TivFt3nDB2RifqJFjQUcNpfKFkvsmafhZbkE48Zh1sJDSX
wjeib4h5sMii899gmTFkPDzyPQdxULey2q1URR3sNY/8uYLb2LHEy0WFR5unoTpz
ezkUbdgiFkeZOemZBoIgf7OBjWgpXsxZtsYS4JhP1S7Y0ZJdVfk/HyMqot98ht8Y
rO45bkeFIh4+VB4FQobA9HaZiMrcK+P9yLVQZi+tiJdecH2nLF9+4ZJbMcRRu0qN
9N9M8AKNBI11
=V8J2
-----END PGP SIGNATURE-----