summaryrefslogtreecommitdiff
path: root/crypto/ghash-generic.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2016-09-13 14:43:29 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2016-09-13 18:44:57 +0800
commit75a24f73056f9df737360419997e16846f76955d (patch)
tree853ac31abd90388a53ec5cc2a0491bad56ee5093 /crypto/ghash-generic.c
parent86d76f2320e4307caa9640b7348e2cbeb87fef2f (diff)
downloadlinux-crypto-75a24f73056f9df737360419997e16846f76955d.tar.gz
linux-crypto-75a24f73056f9df737360419997e16846f76955d.zip
crypto: skcipher - Fix blkcipher walk OOM crash
When we need to allocate a temporary blkcipher_walk_next and it fails, the code is supposed to take the slow path of processing the data block by block. However, due to an unrelated change we instead end up dereferencing the NULL pointer. This patch fixes it by moving the unrelated bsize setting out of the way so that we enter the slow path as inteded. Fixes: 90e97b2ef943 ("[CRYPTO] blkcipher: Added blkcipher_walk_virt_block") Cc: stable@vger.kernel.org Reported-by: xiakaixu <xiakaixu@huawei.com> Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'crypto/ghash-generic.c')
0 files changed, 0 insertions, 0 deletions