summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorJunaid Shahid <junaids@google.com>2017-12-20 17:08:37 -0800
committerHerbert Xu <herbert@gondor.apana.org.au>2017-12-28 17:56:51 +1100
commitb20209c91e23a9bbad9cac2f80bc16b3c259e10e (patch)
treec23eaf1d4091c3c0a7fd91738457b5263c5567a2 /drivers/char
parent02d9e320c693cc14512836a54ce3953e399fd3a8 (diff)
crypto: aesni - Fix out-of-bounds access of the data buffer in generic-gcm-aesni
The aesni_gcm_enc/dec functions can access memory before the start of the data buffer if the length of the data buffer is less than 16 bytes. This is because they perform the read via a single 16-byte load. This can potentially result in accessing a page that is not mapped and thus causing the machine to crash. This patch fixes that by reading the partial block byte-by-byte and optionally an via 8-byte load if the block was at least 8 bytes. Fixes: 0487ccac ("crypto: aesni - make non-AVX AES-GCM work with any aadlen") Cc: <stable@vger.kernel.org> Signed-off-by: Junaid Shahid <junaids@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
0 files changed, 0 insertions, 0 deletions