Hi, this port brings along a dhparams file that was last re-generated in 2013; it should be re-generated and not include any <3072 params. per size it also only has a single param which, as far as I remember, isn't ideal either. It's also doubtful why it has it's own in general, /etc/ssh/moduli *might* be compatible (but probably not accessible if running non-root) At least maybe using the same source file for that could help.
Another thing that worries me here but totally doesn't relate to this port: Did noone ever audit the ports tree as a whole for high-entropy things like this after all the NSA shit came down? No idea who to ask about that, but I see a corpse right here and its rotten.
Maintainer feedback?
I didn't hear anything, and had long forgotten about the issue. If you know how to get a security person to look into it, please go ahead. Somehow it seems I just can't "find" the proper channel in cases like this. I just checked and I really did replace it everywhere in the env I helped run back then: (ansible snippet that should work everywhere follows) - name: do not use upstream dhparams file shell: rsync -ci /etc/ssh/moduli /usr/local/etc/proftpd/dhparams.pem register: rsync_result changed_when: 'rsync_result.stdout != ""' )
(In reply to florian.heigl from comment #3) File in /etc/ssh/moduli has content in a very different format than /usr/local/etc/proftpd/dhparams.pem etc/proftpd/dhparams.pem is provided from ProFTPD sources https://github.com/proftpd/proftpd/blob/master/contrib/mod_sftp/dhparams.pem last updated 2020-09-06 If this file should be updated then it should be updated by upstream (ProFTPD authors) If we would like to provide a way for FreeBSD users to easily re-generate dhparams.pem I can provide a simple shell script for this task. I am not a security expert but there are some discussions on the net that DH under 2048 should not be used and larger than 4096 is too expensive to generate without much added security so we can talk about what sizes we should generate and how many of each size? Also there is a thing - many other network services can use dhparams in PEM format even if they use some built-in default (Apache, Postfix, Dovecot, Nginx, Lighttps etc.) so is the ProFTPD the right place for a script to generate dhparams.pem? Or should it be added to base system, generate dhparams.pem to /etc/ssl and let other services to use this file? (and should we advice users to re-generate this file from crontab?)
Created attachment 247526 [details] dhparams_gen.sh Simple shell script to use "openssl dhparam" to re-generate dhparams.pem of similar structure as upstream file from ProFPTD sources. It can be easily added to crontab and generate new file every month, year, or week... Maybe we should not generate DH of sizes 1024 and 1536 at all.
(In reply to Miroslav Lachman from comment #5) Thank-you. Slightly modified for 2-6kb primes, changed weekly. And yes, they should be in the one place. Aside how are elliptic curves accomodated? Also within the same file?