Author Topic: Segfault with proftpd-1.3.5a + mod_sftp + mod_rename  (Read 966 times)

Offline rmeichsner

  • New user
  • *
  • Posts: 1
    • View Profile
Segfault with proftpd-1.3.5a + mod_sftp + mod_rename
« on: June 08, 2015, 12:40:30 pm »
Hi Guys,

I compiled today the latest Version of proftpd (proftpd-1.3.5a) with the following modules: mod_sftp + mod_rename

In Case the mod_rename Filter hits the duplicate pattern configured, the Uploads creates an Segmentation fault and the clients receives an unexpected disconnect.
Any ideas or comments?


extract of config:
-----------------------------------------------
RenameEngine on
RenameLog /var/log/proftpd/mod_rename.log
<Directory />
# Filter and suffix configuration for mod_rename
  RenameFilter    duplicate
  RenamePrefix    none
  RenameSuffix    .#
</Directory>


mod_rename.log:
-----------------------------------------------
2015-06-08 14:22:27,737 mod_rename/0.4[12091]: testing file '/translog/data0p01/servername/default/test' for rename eligibility
2015-06-08 14:22:27,737 mod_rename/0.4[12091]: using RenameFilter duplicate
2015-06-08 14:22:27,741 mod_rename/0.4[12091]: RenameFilter duplicate: path '/default/test' is a duplicate
2015-06-08 14:22:27,741 mod_rename/0.4[12091]: RenameFilter duplicate: renaming file


proftpd -vv:
-----------------------------------------------
ProFTPD Version: 1.3.5a (maint)
  Scoreboard Version: 01040003
  Built: Mon Jun 8 2015 13:43:27 CEST

Loaded modules:
  mod_sftp/0.9.9
  mod_rename/0.4
  mod_cap/1.1
  mod_ident/1.0
  mod_dso/0.5
  mod_facts/0.3
  mod_delay/0.7
  mod_site.c
  mod_log.c
  mod_ls.c
  mod_auth.c
  mod_auth_file/1.0
  mod_auth_unix.c
  mod_rlimit/1.0
  mod_xfer.c
  mod_core.c

I created an strace with the following output:
-----------------------------------------------
10297 write(6, "2015-06-08 14:18:53,710 mod_rename/0.4[10297]: RenameFilter duplicate: path '/default/test' is a duplicate\n", 107 <unfinished ...>
10296 lseek(8, 656, SEEK_SET <unfinished ...>
10294 fcntl(8, F_SETLK, {type=F_WRLCK, whence=SEEK_CUR, start=32, len=624} <unfinished ...>
10297 <... write resumed> )             = 107
10296 <... lseek resumed> )             = 656
10294 <... fcntl resumed> )             = 0
10297 write(6, "2015-06-08 14:18:53,710 mod_rename/0.4[10297]: RenameFilter duplicate: renaming file\n", 85 <unfinished ...>
10296 write(8, "8(\0\0c\0\0\0c\0\0\0server\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\256\10\0\000ip:2222\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Translog Backup HH02\0\0\0\0\0\0\0\0\0\0\0\000ip\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0servername.name\0\0\0\0\0\0\
0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0sftp\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
0\0\0\0\0\0\0\0\0\0/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0idle\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0-\210uU\0\0\0\0-\210uU\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 624 <unfinished ...>
10297 <... write resumed> )             = 85
10294 lseek(8, 32, SEEK_SET <unfinished ...>
10296 <... write resumed> )             = 624
10297 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
10294 <... lseek resumed> )             = 32
10296 lseek(8, 656, SEEK_SET <unfinished ...>
10294 write(8, "6(\0\0c\0\0\0c\0\0\0server\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\256\10\0\000ip:2222\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Translog Backup HH02\0\0\0\0\0\0\0\0\0\0\0\000195.135.130.79\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0nservername.name\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0sftp\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\0\0\0\0\0\0\0\0/\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0idle\0\0\0\0\0\0\0\0\0\0\0\
0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0-\210uU\0\0\0\0)\210uU\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 624 <unfinished ...>
10297 write(3, "2015-06-08 14:18:53,710 servername.name proftpd[10297] 0.0.0.0 (servername[IPADDR]): ProFTPD terminating (signal 11)\n", 158 <unfinished ...>

Thanks,
 Ruben

Offline castaglia

  • Administrator
  • Support Hero
  • *****
  • Posts: 5253
    • View Profile
    • http://www.castaglia.org/
Re: Segfault with proftpd-1.3.5a + mod_sftp + mod_rename
« Reply #1 on: June 25, 2015, 05:41:19 pm »
Are you uploading via FTP, or SFTP, or SCP, or...?  Could you provide the proftpd debug logging, debug level 10, for one of these uploads, please?