[Proftpd-user] 1.3.7e + openssl 3.0.2 on Ubuntu 22.04 LTS large file problem?

"John Stoffel" <[email protected]> Fri, 31 Mar 2023 17:17:50 -0400
Newsgroups gmane.network.proftpd.user
Message-ID <[email protected]>
Hi TJ and team,

I've had a customer run into a problem where they tried uploading
files larger than 2gb to our Ubuntu 22.04 LTS server, where I had
self-compiled proftpd 1.3.7e (but most likely on 21.04!) and they
would randomly break when sending files.  My compile info is at the
end of the mail.   I've included both builds, since I think I upgraded
the OS, proftpd broke and I just re-compiled 1.3.7e to work again.  

I see that 1.3.7f is out, but the changelog is empty... and the 'git
diff ...' looks to be mostly mod_tls updates.  Not sure how that
interacts with mod_sftp and large files. 

I'm really only using mod_sftp on this host to allow customers to
send/get files from us. Here's a snippet from the sftp.log when I
tried uploading a 4gb .iso file from a CentOS 7.8 system, since my
customer is also using that release.

From the client side I see:

   sftp> put rhel-server-7.4-x86_64-dvd.iso
   Uploading rhel-server-7.4-x86_64-dvd.iso to /to_ftp-test/rhel-server-7.4-x86_64-dvd.iso
   rhel-server-7.4-x86_64-dvd.iso                                     55% 2150MB  32.4MB/s   00:53 ETAssh_dispatch_run_fatal: Connection to <internal IP> port 22: incorrect signature
   Connection closed


And the server side log I see:


   2023-03-31 12:50:27,916 mod_sftp/1.0.1[58750]: sent server version 'SSH-2.0-mod_sftp'
   2023-03-31 12:50:27,916 mod_sftp/1.0.1[58750]: received client version 'SSH-2.0-OpenSSH_7.4'
   2023-03-31 12:50:27,916 mod_sftp/1.0.1[58750]: handling connection from SSH2 client 'OpenSSH_7.4'
   2023-03-31 12:50:27,937 mod_sftp/1.0.1[58750]:  + Session key exchange: curve25519-sha256
   2023-03-31 12:50:27,937 mod_sftp/1.0.1[58750]:  + Session server hostkey: rsa-sha2-512
   2023-03-31 12:50:27,937 mod_sftp/1.0.1[58750]:  + Session client-to-server encryption: aes128-ctr
   2023-03-31 12:50:27,937 mod_sftp/1.0.1[58750]:  + Session server-to-client encryption: aes128-ctr
   2023-03-31 12:50:27,937 mod_sftp/1.0.1[58750]:  + Session client-to-server MAC: [email protected]
   2023-03-31 12:50:27,937 mod_sftp/1.0.1[58750]:  + Session server-to-client MAC: [email protected]
   2023-03-31 12:50:27,937 mod_sftp/1.0.1[58750]:  + Session client-to-server compression: none
   2023-03-31 12:50:27,937 mod_sftp/1.0.1[58750]:  + Session server-to-client compression: none
   2023-03-31 12:50:29,573 mod_sftp/1.0.1[58750]: sending acceptable userauth methods: password
   2023-03-31 12:50:33,191 mod_sftp/1.0.1[58750]: sending userauth success
   2023-03-31 12:50:33,191 mod_sftp/1.0.1[58750]: user 'ftp-test' authenticated via 'password' method
   2023-03-31 12:50:33,192 mod_sftp/1.0.1[58750]: 'env' channel request: 'LANG' = 'en_US.UTF-8'
   2023-03-31 12:50:33,192 mod_sftp/1.0.1[58750]: 'subsystem' channel request for 'sftp' subsystem
   2023-03-31 12:50:33,192 mod_sftp/1.0.1[58750]: using SFTP protocol version 3 for this session (channel ID 0)
   2023-03-31 12:51:52,993 mod_sftp/1.0.1[58750]:  + Session key exchange: curve25519-sha256
   2023-03-31 12:51:52,994 mod_sftp/1.0.1[58750]:  + Session server hostkey: rsa-sha2-512
   2023-03-31 12:51:52,994 mod_sftp/1.0.1[58750]:  + Session client-to-server encryption: aes128-ctr
   2023-03-31 12:51:52,994 mod_sftp/1.0.1[58750]:  + Session server-to-client encryption: aes128-ctr
   2023-03-31 12:51:52,994 mod_sftp/1.0.1[58750]:  + Session client-to-server MAC: [email protected]
   2023-03-31 12:51:52,994 mod_sftp/1.0.1[58750]:  + Session server-to-client MAC: [email protected]
   2023-03-31 12:51:52,994 mod_sftp/1.0.1[58750]:  + Session client-to-server compression: none
   2023-03-31 12:51:52,994 mod_sftp/1.0.1[58750]:  + Session server-to-client compression: none
   2023-03-31 12:51:57,039 mod_sftp/1.0.1[58750]:  + Session key exchange: curve25519-sha256
   2023-03-31 12:51:57,039 mod_sftp/1.0.1[58750]:  + Session server hostkey: rsa-sha2-512
   2023-03-31 12:51:57,039 mod_sftp/1.0.1[58750]:  + Session client-to-server encryption: aes128-ctr
   2023-03-31 12:51:57,039 mod_sftp/1.0.1[58750]:  + Session server-to-client encryption: aes128-ctr
   2023-03-31 12:51:57,039 mod_sftp/1.0.1[58750]:  + Session client-to-server MAC: [email protected]
   2023-03-31 12:51:57,039 mod_sftp/1.0.1[58750]:  + Session server-to-client MAC: [email protected]
   2023-03-31 12:51:57,039 mod_sftp/1.0.1[58750]:  + Session client-to-server compression: none
   2023-03-31 12:51:57,039 mod_sftp/1.0.1[58750]:  + Session server-to-client compression: none
   2023-03-31 12:51:57,064 mod_sftp/1.0.1[58750]: error reading from client (fd 0): Connection reset by peer
   2023-03-31 12:51:57,064 mod_sftp/1.0.1[58750]: disconnecting client (Connection reset by peer)
   2023-03-31 12:51:57,064 mod_sftp/1.0.1[58750]: aborting 1 unclosed file handle


I'll be trying to test out 1.3.7f and possible 1.3.8 as well to see if that fixes the problem.  On ubuntu 22.04, the openssl version is 3.0.2 if that helps:

   # openssl version
   OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)



Build settings for 1.3.7e on Ubuntu 22.04:


Compile-time Settings:
  Version: 1.3.7e (maint)
  Platform: LINUX [Linux 5.15.0-67-generic x86_64]
  Built: Fri Oct 28 2022 14:32:51 PDT
  Built With:
    configure  '--with-includes=' '--enable-openssl' '--prefix=/usr'
  '--with-pkgconfig=lib/pkgconfig' '--mandir=/usr/share/man'
  '--localstatedir=/run' '--enable-sendfile' '--enable-facl'
  '--enable-dso' '--enable-autoshadow' '--enable-ctrls'
  '--enable-ipv6' '--enable-nls' '--enable-memcache'
  '--with-lastlog=/var/log/lastlog' '--enable-pcre' '--disable-strip'
  '--enable-redis'
  '--with-shared=mod_unique_id:mod_site_misc:mod_load:mod_ban:mod_quotatab:mod_sql:mod_sql_mysql:mod_sql_postgres:mod_sql_sqlite:mod_sql_odbc:mod_dynmasq:mod_quotatab_sql:mod_ldap:mod_quotatab_ldap:mod_ratio:mod_tls:mod_rewrite:mod_radius:mod_wrap:mod_wrap2:mod_wrap2_file:mod_wrap2_sql:mod_quotatab_file:mod_quotatab_radius:mod_facl:mod_ctrls_admin:mod_copy:mod_deflate:mod_ifversion:mod_geoip:mod_exec:mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_shaper:mod_sql_passwd:mod_ifsession:mod_auth_otp:mod_tls_redis:mod_wrap2_redis:mod_redis:mod_memcache:mod_tls_memcache:mod_readme:mod_snmp:mod_digest:mod_ident:mod_log_forensic:mod_qos:mod_statcache:mod_tls_fscache:mod_tls_shmcache:mod_dnsbl'

  CFLAGS: -g2 -O2 -Wall -fno-omit-frame-pointer -fno-strict-aliasing
  -Werror=implicit-function-declaration
  LDFLAGS: -L$(top_srcdir)/lib -L$(top_builddir)/lib  -rdynamic
  -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu
  LIBS: -lacl  -lpcreposix -lpcre -lssl -lcrypto -lsodium -lcap  -lpam
  -lsupp -lattr -lnsl -lresolv -lresolv -lcrypt -lhiredis
  -lmemcachedutil -lmemcached  -pthread

  Files:
    Configuration File:
      /usr/etc/proftpd.conf
    Pid File:
      /run/proftpd.pid
    Scoreboard File:
      /run/proftpd.scoreboard
    Header Directory:
      /usr/include/proftpd
    Shared Module Directory:
      /usr/libexec

  Info:
    + Max supported UID: 4294967295
    + Max supported GID: 4294967295

  Features:
    + Autoshadow support
    + Controls support
    + curses support
    - Developer support
    + DSO support
    + IPv6 support
    + Largefile support
    + Lastlog support
    + Memcache support
    + ncursesw support
    + NLS support
    + OpenSSL support (OpenSSL 3.0.2 15 Mar 2022)
    + PCRE support
    + POSIX ACL support
    + Redis support
    + Sendfile support
    + Shadow file support
    + Sodium support
    + Trace support
    + xattr support

  Tunable Options:
    PR_TUNABLE_BUFFER_SIZE = 1024
    PR_TUNABLE_DEFAULT_RCVBUFSZ = 8192
    PR_TUNABLE_DEFAULT_SNDBUFSZ = 8192
    PR_TUNABLE_ENV_MAX = 2048
    PR_TUNABLE_GLOBBING_MAX_MATCHES = 100000
    PR_TUNABLE_GLOBBING_MAX_RECURSION = 8
    PR_TUNABLE_HASH_TABLE_SIZE = 40
    PR_TUNABLE_LOGIN_MAX = 256
    PR_TUNABLE_NEW_POOL_SIZE = 512
    PR_TUNABLE_PATH_MAX = 4096
    PR_TUNABLE_SCOREBOARD_BUFFER_SIZE = 80
    PR_TUNABLE_SCOREBOARD_SCRUB_TIMER = 30
    PR_TUNABLE_SELECT_TIMEOUT = 30
    PR_TUNABLE_TIMEOUTIDENT = 10
    PR_TUNABLE_TIMEOUTIDLE = 600
    PR_TUNABLE_TIMEOUTLINGER = 10
    PR_TUNABLE_TIMEOUTLOGIN = 300
    PR_TUNABLE_TIMEOUTNOXFER = 300
    PR_TUNABLE_TIMEOUTSTALLED = 3600
    PR_TUNABLE_XFER_SCOREBOARD_UPDATES = 10




My 1.3.7f build settings are:

# ./proftpd -V
Compile-time Settings:
  Version: 1.3.7f (maint)
  Platform: LINUX [Linux 5.15.0-67-generic x86_64]
  Built: Fri Mar 31 2023 13:56:00 PDT
  Built With:
    configure  '--with-includes=' '--enable-openssl' '--prefix=/usr' '--with-pkgconfig=lib/pkgconfig
' '--mandir=/usr/share/man' '--libexecdir=/usr/lib/proftpd' '--localstatedir=/run' '--enable-sendfil
e' '--enable-facl' '--enable-dso' '--enable-autoshadow' '--enable-ctrls' '--enable-ipv6' '--enable-n
ls' '--enable-memcache' '--with-lastlog=/var/log/lastlog' '--enable-pcre' '--disable-strip' '--enabl
e-redis' '--with-shared=mod_unique_id:mod_site_misc:mod_load:mod_ban:mod_quotatab:mod_sql:mod_sql_my
sql:mod_sql_postgres:mod_sql_sqlite:mod_sql_odbc:mod_dynmasq:mod_quotatab_sql:mod_ldap:mod_quotatab_
ldap:mod_ratio:mod_tls:mod_rewrite:mod_radius:mod_wrap:mod_wrap2:mod_wrap2_file:mod_wrap2_sql:mod_qu
otatab_file:mod_quotatab_radius:mod_facl:mod_ctrls_admin:mod_copy:mod_deflate:mod_ifversion:mod_geoi
p:mod_exec:mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_shaper:mod_sql_passwd:mod_ifsession:mod_auth_otp:m
od_tls_redis:mod_wrap2_redis:mod_redis:mod_memcache:mod_tls_memcache:mod_readme:mod_snmp:mod_digest:
mod_ident:mod_log_forensic:mod_qos:mod_statcache:mod_tls_fscache:mod_tls_shmcache:mod_dnsbl' '--enab
le-ltdl-convenience'

  CFLAGS: -g2 -O2 -Wall -fno-omit-frame-pointer -fno-strict-aliasing -Werror=implicit-function-decla
ration
  LDFLAGS: -L$(top_srcdir)/lib -L$(top_builddir)/lib  -rdynamic  -L/usr/lib/x86_64-linux-gnu -L/usr/
lib/x86_64-linux-gnu
  LIBS: -lacl  -lpcreposix -lpcre -lssl -lcrypto -lsodium -lcap  -lpam -lsupp -lattr -lnsl -lresolv
-lresolv -lcrypt -lhiredis -lmemcachedutil -lmemcached  -pthread

  Files:
    Configuration File:
      /usr/etc/proftpd.conf
    Pid File:
      /run/proftpd.pid
    Scoreboard File:
      /run/proftpd.scoreboard
    Header Directory:
      /usr/include/proftpd
    Shared Module Directory:
      /usr/lib/proftpd

  Info:
    + Max supported UID: 4294967295
    + Max supported GID: 4294967295

  Features:
    + Autoshadow support
    + Controls support
    + curses support
    - Developer support
    + DSO support
    + IPv6 support
    + Largefile support
    + Lastlog support
    + Memcache support
    + ncursesw support
    + NLS support
    + OpenSSL support (OpenSSL 3.0.2 15 Mar 2022)
    + PCRE support
    + POSIX ACL support
    + Redis support
    + Sendfile support
    + Shadow file support
    + Sodium support
    + Trace support
    + xattr support

  Tunable Options:
    PR_TUNABLE_BUFFER_SIZE = 1024
    PR_TUNABLE_DEFAULT_RCVBUFSZ = 8192
    PR_TUNABLE_DEFAULT_SNDBUFSZ = 8192
    PR_TUNABLE_ENV_MAX = 2048
    PR_TUNABLE_GLOBBING_MAX_MATCHES = 100000
    PR_TUNABLE_GLOBBING_MAX_RECURSION = 8
    PR_TUNABLE_HASH_TABLE_SIZE = 40
    PR_TUNABLE_LOGIN_MAX = 256
    PR_TUNABLE_NEW_POOL_SIZE = 512
    PR_TUNABLE_PATH_MAX = 4096
    PR_TUNABLE_SCOREBOARD_BUFFER_SIZE = 80
    PR_TUNABLE_SCOREBOARD_SCRUB_TIMER = 30
    PR_TUNABLE_SELECT_TIMEOUT = 30
    PR_TUNABLE_TIMEOUTIDENT = 10
    PR_TUNABLE_TIMEOUTIDLE = 600
    PR_TUNABLE_TIMEOUTLINGER = 10
    PR_TUNABLE_TIMEOUTLOGIN = 300
    PR_TUNABLE_TIMEOUTNOXFER = 300
    PR_TUNABLE_TIMEOUTSTALLED = 3600
    PR_TUNABLE_XFER_SCOREBOARD_UPDATES = 10


THanks!
John


_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html