]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gcm - Fix rfc4543 decryption crash
authorHerbert Xu <20160318144240.GA20816@gondor.apana.org.au>
Thu, 17 Mar 2016 17:42:00 +0000 (02:42 +0900)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 05:34:28 +0000 (21:34 -0800)
commit83c2104a99da69885da1381ab3eeabb04467c7fc
tree9472e3d85d8e3d157dbf75fe48e4481ceca8bc1e
parent856f6673935d0393f32976f608f388ffc670440f
gcm - Fix rfc4543 decryption crash

Orabug: 25243093

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 <patrick.meyer@vasgard.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
crypto/gcm.c