Re: [Proftpd-user] Proftpd AuthGroupFile
"TJ Saunders" <[email protected]> Sat, 07 Sep 2024 08:32:28 -0700
| Newsgroups | gmane.network.proftpd.user |
|---|---|
| Message-ID | <[email protected]> |
> A virtual groups file (AuthGroupFile definition inside the proftpd > config file underneath /etc/proftpd/conf.d) has one group that contains > 64 or more virtual users. > > Some time ago, adding a new virtual user to that specific group lead to > the following error message inside the sftp logfile: > > Jul 10 12:54:28 <hostname> proftpd[1176232]: session[1176232] > <IP-address> (<IP-address>[<IP-address>]): Malformed entry in > AuthGroupFile file (line 85) > Jul 10 12:54:28 <hostname> proftpd[1176232]: session[1176232] > <hostname> (<IP-address>[<IP-address>]): Malformed entry in > AuthGroupFile file (line 170) > Jul 10 12:54:28 <hostname> proftpd[1176232]: realloc(): invalid next > size The handling of these AuthUserFile, AuthGroupFiles has changed over time. In particular, ProFTPD _might_ use some functions in the C library for reading these files -- depending on the platform; otherwise, it would use its own internal functions. Either way, there is a fixed buffer that is used for reading a single line of text; it is possible that your current AuthGroupFile has a line of text that is longer than that fixed buffer size. If the line of text is longer than the buffer, then ProFTPD will not read the entire line; it will be truncated. Which, in turn, can lead to "malformed syntax" sorts of parse errors. In the cases where ProFTPD uses its own internal functions for handling these auth files, that fixed buffer size is 1024 characters: https://github.com/proftpd/proftpd/blob/master/include/options.h#L84 That buffer size can be changed, but only at compile-time, using the --enable-tunable-buffer-size configure option. I should also point out that the use of C library functions, vs internal functions, did change in ProFTPD versions newer than yours; see: https://github.com/proftpd/proftpd/issues/1134 > Jul 10 12:54:28 <hostname> proftpd[1176232]: realloc(): invalid next > size This particular log message looks like a related, but slightly different issue: https://github.com/proftpd/proftpd/issues/1321 Hope this helps, TJ _______________________________________________ ProFTPD Users List <[email protected]> Unsubscribe problems? http://www.proftpd.org/list-unsub.html