dovecot-2.2: lib-imap-urlauth: Minor fix to avoiding timing atta...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 18 06:58:07 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/b21fe1a1c7ad
changeset: 15228:b21fe1a1c7ad
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Oct 18 06:58:01 2012 +0300
description:
lib-imap-urlauth: Minor fix to avoiding timing attacks against mailbox existence.
random_fill() is slightly slower than random_fill_weak(). Probably even
better way to handle timing attacks would be to always add a short random
pause before returning verification failure.

diffstat:

 src/lib-imap-urlauth/imap-urlauth.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 70ca88e74a4b -r b21fe1a1c7ad src/lib-imap-urlauth/imap-urlauth.c
--- a/src/lib-imap-urlauth/imap-urlauth.c	Thu Oct 18 06:55:04 2012 +0300
+++ b/src/lib-imap-urlauth/imap-urlauth.c	Thu Oct 18 06:58:01 2012 +0300
@@ -399,7 +399,7 @@
 		   random "plausible" keys (selected by the server) as needed,
 		   before returning a validation failure. This prevents timing
 		   attacks aimed at identifying mailbox names.' */
-		random_fill_weak(mailbox_key, sizeof(mailbox_key));
+		random_fill(mailbox_key, sizeof(mailbox_key));
 		(void)imap_urlauth_internal_verify(url->uauth_rumpurl,
 			mailbox_key, url->uauth_token, url->uauth_token_size);
 


More information about the dovecot-cvs mailing list