From 3cfb9a410bd0489f73c69db040f727ff05df29e1 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Fri, 18 Mar 2016 22:42:40 +0800 Subject: [PATCH] crypto: gcm - Fix rfc4543 decryption crash This bug has already bee fixed upstream since 4.2. However, it was fixed during the AEAD conversion so no fix was backported to the older kernels. When we do an RFC 4543 decryption, we will end up writing the ICV beyond the end of the dst buffer. This should lead to a crash but for some reason it was never noticed. This patch fixes it by only writing back the ICV for encryption. Fixes: d733ac90f9fe ("crypto: gcm - fix rfc4543 to handle async...") Reported-by: Patrick Meyer Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ben Hutchings --- Reading git-format-patch failed