Your message dated Fri, 06 Nov 2026 10:17:06 +0000
with message-id <[email protected]>
and subject line Bug#1151962: fixed in proftpd-dfsg 1.3.8.c+dfsg-4+deb13u4
has caused the Debian Bug report #1151962,
regarding proftpd-core: mod_tls spins at 100% CPU, then "double free", after
TLS SNI vhost switch with resumed data connection
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1151962: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1151962
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: proftpd-core
Version: 1.3.8.c+dfsg-4+deb13u3
Severity: important
Tags: patch upstream fixed-upstream trixie
Control: fixed -1 1.3.9d~dfsg-1
Control: forwarded -1 https://github.com/proftpd/proftpd/issues/2056
Dear Maintainer,
ProFTPD in trixie is affected by upstream issues #1963 and #2056, which are
fixed upstream since 1.3.9a/1.3.9b (testing/unstable ship 1.3.9d and are not
affected). Please consider backporting the fix to trixie via a stable
update.
Symptom
With several <VirtualHost>s on one address/port selected by TLS SNI,
TLSv1.2 and "TLSSessionCache internal", a session whose TLS data connection
resumes the control session never exits when it ends (QUIT or a dropped
connection). The session process spins at 100% CPU in
SSL_CTX_flush_sessions_ex(), its heap grows by ~10-20 MB/s, and it finally
aborts with "double free or corruption (!prev)". Without a session
RLimitMemory,
a few such sessions exhaust the host's memory (for us: an OOM kill of the
whole
FTP container, dropping every user's connection). Any authenticated user can
trigger it, and FileZilla does it routinely, because it resumes the TLS
session
on every data connection.
Stack of the spinning process (from ProFTPD's own signal handler):
pr_session_disconnect -> pr_netio_close -> mod_tls -> SSL_free
-> SSL_CTX_free -> SSL_CTX_flush_sessions_ex
-> mod_tls SNI session table delete callback -> BIO_new/BIO_free
Conditions (all required): the connection starts in one vhost and TLS SNI
switches it to another; at least one data connection resumes the control
session; then the session ends. Without the vhost switch, without
resumption, or without a transfer, the session exits normally.
How to reproduce
Two vhosts on the same port, each with its own certificate, for example:
TLSSessionCache internal: 1800
<VirtualHost 0.0.0.0>
ServerName a.example
Port 2121
TLSEngine on
TLSProtocol TLSv1.2
TLSOptions NoSessionReuseRequired
TLSRSACertificateFile /etc/proftpd/a.crt
TLSRSACertificateKeyFile /etc/proftpd/a.key
</VirtualHost>
<VirtualHost 0.0.0.0>
ServerName b.example
(same as above, with b.crt/b.key)
</VirtualHost>
The first vhost owns the port, so every connection starts there. A client
that requests the second vhost via SNI and resumes the session on the data
connection (Python):
import ftplib, io, ssl
class ResumingFTP(ftplib.FTP_TLS):
def ntransfercmd(self, cmd, rest=None):
conn, size = ftplib.FTP.ntransfercmd(self, cmd, rest)
conn = self.context.wrap_socket(conn, server_hostname="b.example",
session=self.sock.session)
return conn, size
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
ctx.maximum_version = ssl.TLSVersion.TLSv1_2
ftp = ResumingFTP(context=ctx)
ftp.connect("b.example", 2121) # hostname -> SNI b.example
ftp.auth()
ftp.login("user-of-b", "password")
ftp.prot_p()
ftp.storbinary("STOR test.txt", io.BytesIO(b"x" * 700))
ftp.quit()
After QUIT, the session process stays in state R and its RSS keeps growing.
Upstream fix
All three commits are needed: the third fixes a NULL pointer dereference
(signal 11) introduced by the first one.
c4fbdcd6714e41505b2add1b1c4e423fbe5baf69 Issue #1963 (PR #1970)
ed5c4a1207575af2c007a3e4c81c87bb9d3908bd Issue #2056 (PR #2076)
c1607a2a219d56443809de326e673b4e38b3bc58 Issue #2093 (PR #2094)
They apply to 1.3.8.c+dfsg-4+deb13u3 with "patch -p1 --fuzz=0" (offsets
only). The first commit also touches tests/t/lib/ProFTPD/Tests/Modules/
mod_tls.pm,
which applies cleanly as well.
Testing
amd64, trixie, libssl3t64 3.5.7-1~deb13u3, with the reproducer above (QUIT
and dropped connection):
1.3.8.c+dfsg-4+deb13u3, unmodified -> spins, "double free"
1.3.8.c+dfsg-4+deb13u3 + the 3 commits -> session exits cleanly
1.3.9d~dfsg-1 rebuilt on trixie -> session exits cleanly
With the patched package, data connections are still resumed ("resumed
session" in TLSLog).
Thank you!
Ákos Oravecz
--- End Message ---
--- Begin Message ---
Source: proftpd-dfsg
Source-Version: 1.3.8.c+dfsg-4+deb13u4
Done: Hilmar Preuße <[email protected]>
We believe that the bug you reported is fixed in the latest version of
proftpd-dfsg, 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 [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Hilmar Preuße <[email protected]> (supplier of updated proftpd-dfsg 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 [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 25 Oct 2026 22:16:31 +0100
Source: proftpd-dfsg
Architecture: source
Version: 1.3.8.c+dfsg-4+deb13u4
Distribution: trixie
Urgency: medium
Maintainer: ProFTPD Maintainance Team
<[email protected]>
Changed-By: Hilmar Preuße <[email protected]>
Closes: 1151962
Changes:
proftpd-dfsg (1.3.8.c+dfsg-4+deb13u4) trixie; urgency=medium
.
* Add patches for mod_tls spins at 100% CPU (...) (Closes: #1151962).
Checksums-Sha1:
335af16f0717b8a238955971cf1d6475cfb615ec 2798
proftpd-dfsg_1.3.8.c+dfsg-4+deb13u4.dsc
81fe0d3b714c0b3568613f344aa7ce3bd47d8032 87036
proftpd-dfsg_1.3.8.c+dfsg-4+deb13u4.debian.tar.xz
c8d3506bfcf67a0883847da34610a12ceba505dd 5156
proftpd-dfsg_1.3.8.c+dfsg-4+deb13u4_source.buildinfo
Checksums-Sha256:
45dd75042fc8afc5754d11b861248ca08b14d428e4eed5da69d32b4c77ed16c9 2798
proftpd-dfsg_1.3.8.c+dfsg-4+deb13u4.dsc
2e757c676e0a434fc9bd4c0dfbb7852cfda54223864122e323e31cb471cd463f 87036
proftpd-dfsg_1.3.8.c+dfsg-4+deb13u4.debian.tar.xz
121584428a4b793c005df2367b4ae1b1f5637ca23f29b95da65a881957fab0d1 5156
proftpd-dfsg_1.3.8.c+dfsg-4+deb13u4_source.buildinfo
Files:
8e74f24860c199bbdb2ea2c76efdd1f2 2798 net optional
proftpd-dfsg_1.3.8.c+dfsg-4+deb13u4.dsc
86a0727215ad6248a2896d353c101c46 87036 net optional
proftpd-dfsg_1.3.8.c+dfsg-4+deb13u4.debian.tar.xz
e7b720186bb1cec61574919ba00a55bb 5156 net optional
proftpd-dfsg_1.3.8.c+dfsg-4+deb13u4_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iNUEARYKAH0WIQRKnq6Z0VRDf4bMmAn98EQ6ARgcNAUCat5yZl8UgAAAAAAuAChp
c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0NEE5
RUFFOTlEMTU0NDM3Rjg2Q0M5ODA5RkRGMDQ0M0EwMTE4MUMzNAAKCRD98EQ6ARgc
NNoEAQDELO7u21SOaBIaoNzYP5ZoH8h/LxpOGETX2ob0Yn89JgEAzBir+BqISXVP
XWd8IVFYngokFq/HQfDWWc9tJcO0ywU=
=nDuQ
-----END PGP SIGNATURE-----
pgpg8Y1SL8Pym.pgp
Description: PGP signature
--- End Message ---