-
- Downloads
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>
Showing
- crypto/api.c 1 addition, 1 deletioncrypto/api.c
- include/crypto/acompress.h 2 additions, 0 deletionsinclude/crypto/acompress.h
- include/crypto/aead.h 2 additions, 0 deletionsinclude/crypto/aead.h
- include/crypto/akcipher.h 2 additions, 0 deletionsinclude/crypto/akcipher.h
- include/crypto/hash.h 4 additions, 0 deletionsinclude/crypto/hash.h
- include/crypto/kpp.h 2 additions, 0 deletionsinclude/crypto/kpp.h
- include/crypto/rng.h 2 additions, 0 deletionsinclude/crypto/rng.h
- include/crypto/skcipher.h 2 additions, 0 deletionsinclude/crypto/skcipher.h
Loading
Please register or sign in to comment