summaryrefslogtreecommitdiff
path: root/src/gcrypt.h.in
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-03-23 14:13:18 +0100
committerWerner Koch <wk@gnupg.org>2016-03-23 14:16:12 +0100
commite709d86fe596a4bcf235799468947c13ae657d78 (patch)
treedb7b05053127347c4f750b3733e7dd847321f13a /src/gcrypt.h.in
parent7c9c82feecf94a455c66d9c38576f36c9c4b484c (diff)
downloadlibgcrypt-e709d86fe596a4bcf235799468947c13ae657d78.tar.gz
cipher: Avoid NULL-segv in GCM mode if a key has not been set.
* cipher/cipher-gcm.c (_gcry_cipher_gcm_encrypt): Check that GHASH_FN has been initialized. (_gcry_cipher_gcm_decrypt): Ditto. (_gcry_cipher_gcm_authenticate): Ditto. (_gcry_cipher_gcm_initiv): Ditto. (_gcry_cipher_gcm_tag): Ditto. -- Avoid a crash if certain functions are used before setkey. Reported-by: Peter Wu <peter@lekensteyn.nl> One crash is not fixed, that is the crash when setkey is not invoked before using the GCM ciphers (introduced in the 1.7.0 cycle). Either these functions should check that the key is present, or they should initialize the ghash table earlier. Affected functions: _gcry_cipher_gcm_encrypt _gcry_cipher_gcm_decrypt _gcry_cipher_gcm_authenticate _gcry_cipher_gcm_initiv (via _gcry_cipher_gcm_setiv) _gcry_cipher_gcm_tag (via _gcry_cipher_gcm_get_tag, _gcry_cipher_gcm_check_tag) Regression-due-to: 4a0795af021305f9240f23626a3796157db46bd7 Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/gcrypt.h.in')
0 files changed, 0 insertions, 0 deletions