Date: Wed, 12 Feb 2014 20:00:06 -0500 From: Alan DeKok <aland@freeradius.org> To: Pierre Carrier <pierre.carrier@airbnb.com> Cc: secalert <secalert@redhat.com>, pkgsrc-security <pkgsrc-security@netbsd.org>, security@ubuntu.com, security@freeradius.org, pupykin.s+arch@gmail.com, security@debian.org, bugbusters <bugbusters@freebsd.org>, product.security@airbnb.com Subject: Re: freeradius denial of service in authentication flow Message-ID: <52FC1916.4060501@freeradius.org> In-Reply-To: <CAM7LUF55w4g7=GqhfFyys0fhJNKQtX-Pp804YWRW57GxbO9WDw@mail.gmail.com> References: <CAM7LUF55w4g7=GqhfFyys0fhJNKQtX-Pp804YWRW57GxbO9WDw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Pierre Carrier wrote: > Some forms of SSHA, including forms that would be validated by servers > applying standard constraints on the user's password attribute, will > generate lengths over 64 bytes after hex-decoding. Do you have examples of such SSHA passwords? That would help with testing. Right now, it's not clear to me why this happens. The code does a number of checks for size of password in the various encodings. What, exactly, is going wrong? > Terrible hotfix quickly packaged to avoid constant crashes here, does > not address the vulnerability: > > --- freeradius-2.1.10+dfsg.orig/src/modules/rlm_pap/rlm_pap.c > +++ freeradius-2.1.10+dfsg/src/modules/rlm_pap/rlm_pap.c > @@ -244,7 +244,7 @@ > static void normify(REQUEST *request, VALUE_PAIR *vp, size_t min_length) > { > size_t decoded; > - uint8_t buffer[64]; > + uint8_t buffer[4096]; The checks in the code rely on sizeof(buffer). Making "buffer" bigger prevents small passwords from causing the issue. But larger ones could still cause it. I'd like to reproduce this, and come up with a definitive fix for the problem. I'd need examples of SSHA passwords to be sure. > On environments where such an issue did not arise previously, a user > allowed to provide *validated* SSHA values to their LDAP servers can > easily trigger denial of services, as the freeradius server will crash > on every authentication attempt. That's an issue, but a rare one IMHO. The user has to exist on the system. So this isn't a remote DoS. Alan DeKok. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQCVAwUBUvwZFqkul4vkAkl9AQJohgQAmAw3IbPAuA0DprpviCPiOMtJ+DTQZ8i8 FrBlXOIoAYU2f7Li4M8PSDizvrGaKIoXtwoMbLiJKfTWobWroOu8Ew1Yu+rKDbQG 4dMT7KoOaEky79A4kNGsbjAObny7G5+ckxaVxfNE+r2DyrWHyOPfqbKtb/PO0NrC JVyo0LHuFP4= =q9tL -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52FC1916.4060501>