]> git.ipfire.org Git - thirdparty/krb5.git/commit
Minimize timing leaks in PKINIT decryption 466/head
authorGreg Hudson <ghudson@mit.edu>
Thu, 16 Jun 2016 20:38:07 +0000 (16:38 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 19 Jul 2016 23:02:20 +0000 (19:02 -0400)
commitf7c6723fdc5142e43edb79d4c5963acc26da7088
tree522924211799f913e38ebfc6ee1ff5dee7d9db03
parentddc70a62dcb4f31c16593d9909838cd3ca84c887
Minimize timing leaks in PKINIT decryption

pkcs7_dataDecode() is derived from OpenSSL's PKCS7_datadecode() and is
used by PKINIT clients to decrypt ReplyKeyPack values in RSA mode.
The upstream function was changed for CVE-2012-0884 to minimize the
timing difference when RSA decryption results in the wrong padding.
Although the impact on Kerberos is negligible (because clients do not
ordinarily choose to use RSA mode, and cannot easily be induced to
make many thousands of requests with the same key), change
pkcs7_dataDecode() to match the upstream change, generating a random
symmetric key and using it when RSA decryption fails.  Also rename
"tmp" and "tmp_len" to "ek" and "eklen" to match the more descriptive
upstream variable names.

ticket: 8428 (new)
src/plugins/preauth/pkinit/pkinit_crypto_openssl.c