Vigil@nce - ProFTPd: denial of service via mod_sftp_pam
September 2013 by Vigil@nce
This bulletin was written by Vigil@nce : http://vigilance.fr/offer
SYNTHESIS OF THE VULNERABILITY
When mod_sftp_pam is enabled on ProFTPd, with a
keyboard-interactive authentication, an attacker can send a
special SSH packet, to force ProFTPd to allocate a large memory
area, in order to trigger a denial of service.
– Impacted products: Fedora, ProFTPD
– Severity: 2/4
– Creation date: 11/09/2013
DESCRIPTION OF THE VULNERABILITY
The mod_sftp module of ProFTPd implements the SFTP sub-system of
the SSHv2 protocol. Files are thus transfered inside a SSH session.
The SFTPAuthMethods parameter indicates the supported
authentication methods:
– publickey
– password
– keyboard-interactive
– etc.
The "keyboard-interactive" method uses the mod_sftp_pam module,
and allows several message exchanges during the authentication
phase.
The contrib/mod_sftp/kbdint.c file of ProFTPd implements the
"keyboard-interactive" method. The number of exchanges is stored
in the "resp_count" variable. However, ProFTPd does not check if
this value is large, before allocating the requested memory areas.
When mod_sftp_pam is enabled on ProFTPd, with a
keyboard-interactive authentication, an attacker can therefore
send a special SSH packet, to force ProFTPd to allocate a large
memory area, in order to trigger a denial of service.
ACCESS TO THE COMPLETE VIGIL@NCE BULLETIN
http://vigilance.fr/vulnerability/ProFTPd-denial-of-service-via-mod-sftp-pam-13412