From aeaceb1fa89b865eb0bca739da9c450b5a054866 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 15 Sep 2012 03:03:21 -0400 Subject: revert low rounds-count limits in crypt hashes it was determined in discussion that these kind of limits are not sufficient to protect single-threaded servers against denial of service attacks from maliciously large round counts. the time scales simply vary too much; many users will want login passwords with rounds counts on a scale that gives decisecond latency, while highly loaded webservers will need millisecond latency or shorter. still some limit is left in place; the idea is not to protect against attacks, but to avoid the runtime of a single call to crypt being, for all practical purposes, infinite, so that configuration errors can be caught and fixed without bringing down whole systems. these limits are very high, on the order of minute-long runtimes for modest systems. --- src/crypt/crypt_des.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/crypt/crypt_des.c') diff --git a/src/crypt/crypt_des.c b/src/crypt/crypt_des.c index d7b2b15a..4454a130 100644 --- a/src/crypt/crypt_des.c +++ b/src/crypt/crypt_des.c @@ -911,7 +911,7 @@ static char *_crypt_extended_r_uut(const char *_key, const char *_setting, char return NULL; count |= value << (i - 1) * 6; } - if (!count || count > 262143) + if (!count) return NULL; for (i = 5, salt = 0; i < 9; i++) { -- cgit v1.2.1