[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-85-g0da7795
by Jussi Kivilinna
cvs at cvs.gnupg.org
Tue Feb 19 11:39:19 CET 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, master has been updated
via 0da77955a097bfd2469ad084b3e9fcac4fb1e3fa (commit)
from 63ac3ba07dba82fde040d31b90b4eff627bd92b9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0da77955a097bfd2469ad084b3e9fcac4fb1e3fa
Author: Jussi Kivilinna <jussi.kivilinna at mbnet.fi>
Date: Mon Jan 28 11:11:33 2013 +0200
Rinjdael: Fix use of SSE2 outside USE_AESNI/ctx->use_aesni
* cipher/rijndael.c (_gcry_aes_cbc_enc): Check if AES-NI is enabled before
calling aesni_prepare() and aesni_cleanup().
--
aesni_cleanup() contains SSE2 instructions that are interpreted as MMX on CPUs
without SSE2 support (Pentium-III, etc). This causes x87 register state to be
poisoned, causing crashes later on when program tries to use floating point
registers.
Add '#ifdef USE_AESNI' and 'if (ctx->use_aesni)' for aesni_cleanup() and, while
at it, for aesni_prepare() too.
Reported-by: Mitsutoshi NAKANO <bkbin005 at rinku.zaq.ne.jp>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at mbnet.fi>
diff --git a/cipher/rijndael.c b/cipher/rijndael.c
index 24372d9..a3080f5 100644
--- a/cipher/rijndael.c
+++ b/cipher/rijndael.c
@@ -1399,7 +1399,11 @@ _gcry_aes_cbc_enc (void *context, unsigned char *iv,
unsigned char *outbuf = outbuf_arg;
const unsigned char *inbuf = inbuf_arg;
- aesni_prepare ();
+#ifdef USE_AESNI
+ if (ctx->use_aesni)
+ aesni_prepare ();
+#endif /*USE_AESNI*/
+
for ( ;nblocks; nblocks-- )
{
if (0)
@@ -1449,7 +1453,11 @@ _gcry_aes_cbc_enc (void *context, unsigned char *iv,
if (!cbc_mac)
outbuf += BLOCKSIZE;
}
- aesni_cleanup ();
+
+#ifdef USE_AESNI
+ if (ctx->use_aesni)
+ aesni_cleanup ();
+#endif /*USE_AESNI*/
_gcry_burn_stack (48 + 2*sizeof(int));
}
-----------------------------------------------------------------------
Summary of changes:
cipher/rijndael.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
More information about the Gnupg-commits
mailing list