Patch "crypto: gcm - Fix IV buffer size in crypto_gcm_setkey" has been added to the 4.8-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
crypto: gcm - Fix IV buffer size in crypto_gcm_setkey
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
crypto-gcm-fix-iv-buffer-size-in-crypto_gcm_setkey.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
50d2e6dc1f83db0563c7d6603967bf9585ce934bMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ondrej=20Mosn=C3=A1=C4=8Dek?= <[email protected]>
Date: Fri, 23 Sep 2016 10:47:32 +0200
Subject: crypto: gcm - Fix IV buffer size in crypto_gcm_setkey
From: Ondrej Mosnáček <[email protected]>
commit 50d2e6dc1f83db0563c7d6603967bf9585ce934b upstream.
The cipher block size for GCM is 16 bytes, and thus the CTR transform used in crypto_gcm_setkey() will also expect a 16-byte IV. However, the code currently reserves only 8 bytes for the IV, causing an out-of-bounds access in the CTR transform. This patch fixes the issue by setting the size of the IV buffer to 16 bytes.
--- crypto/gcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
crypto/gcm.c +1 -1
@@ -117,7 +117,7 @@ static int crypto_gcm_setkey(struct crypstruct crypto_skcipher *ctr = ctx->ctr;struct {be128 hash; -u8 iv[8 ]; +u8 iv[16 ];struct crypto_gcm_setkey_result result;
Patches currently in stable-queue which might be from [email protected] are
queue-4.8/crypto-gcm-fix-iv-buffer-size-in-crypto_gcm_setkey.patch