diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/crypto/aes/ChangeLog | 5 | ||||
-rw-r--r-- | src/lib/crypto/aes/aes_s2k.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/crypto/aes/ChangeLog b/src/lib/crypto/aes/ChangeLog index 443aabdd98..3af4903049 100644 --- a/src/lib/crypto/aes/ChangeLog +++ b/src/lib/crypto/aes/ChangeLog @@ -1,3 +1,8 @@ +2003-04-13 Ken Raeburn <raeburn@mit.edu> + + * aes_s2k.c (krb5int_aes_string_to_key): Return an error if the + supplied iteration count is really, really large. + 2003-03-04 Ken Raeburn <raeburn@mit.edu> * aes_s2k.c, aes_s2k.h: New files. diff --git a/src/lib/crypto/aes/aes_s2k.c b/src/lib/crypto/aes/aes_s2k.c index f3670d7d84..6ea2869000 100644 --- a/src/lib/crypto/aes/aes_s2k.c +++ b/src/lib/crypto/aes/aes_s2k.c @@ -29,6 +29,12 @@ krb5int_aes_string_to_key(const struct krb5_enc_provider *enc, } else iter_count = 0xb000L; + /* This is not a protocol specification constraint; this is an + implementation limit, which should eventually be controlled by + a config file. */ + if (iter_count >= 0x1000000L) + return KRB5_ERR_BAD_S2K_PARAMS; + /* * Dense key space, no parity bits or anything, so take a shortcut * and use the key contents buffer for the generated bytes. |