summaryrefslogtreecommitdiff
path: root/crypto/testmgr.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2021-03-02 21:33:03 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2021-03-13 00:04:01 +1100
commit72e2a02cdf58fbe06533cc21f6d7dd518cf01ae5 (patch)
treebf3cf19046019e0596e74fea0f1c073c33e4960c /crypto/testmgr.h
parent7d5fac8e9b6c0e95045d0ceb9140d96fb5031a48 (diff)
downloadlinux-crypto-72e2a02cdf58fbe06533cc21f6d7dd518cf01ae5.tar.gz
linux-crypto-72e2a02cdf58fbe06533cc21f6d7dd518cf01ae5.zip
crypto: api - check for ERR pointers in crypto_destroy_tfm()
Given that crypto_alloc_tfm() may return ERR pointers, and to avoid crashes on obscure error paths where such pointers are presented to crypto_destroy_tfm() (such as [0]), add an ERR_PTR check there before dereferencing the second argument as a struct crypto_tfm pointer. [0] https://lore.kernel.org/linux-crypto/000000000000de949705bc59e0f6@google.com/ Reported-by: syzbot+12cf5fbfdeba210a89dd@syzkaller.appspotmail.com Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/testmgr.h')
0 files changed, 0 insertions, 0 deletions