WSL2-Linux-Kernel/drivers/crypto/marvell
Dan Carpenter 1f5b07f5dd crypto: marvell/octeontx - Fix a potential NULL dereference
Smatch reports that:

    drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:132 otx_cpt_aead_callback()
    warn: variable dereferenced before check 'cpt_info' (see line 121)

This function is called from process_pending_queue() as:

drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c
   599                  /*
   600                   * Call callback after current pending entry has been
   601                   * processed, we don't do it if the callback pointer is
   602                   * invalid.
   603                   */
   604                  if (callback)
   605                          callback(res_code, areq, cpt_info);

It does appear to me that "cpt_info" can be NULL so this could lead to
a NULL dereference.

Fixes: 10b4f09491 ("crypto: marvell - add the Virtual Function driver for CPT")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2020-06-15 17:38:54 +10:00
..
cesa crypto: marvell - create common Kconfig and Makefile for Marvell 2020-03-20 14:36:51 +11:00
octeontx crypto: marvell/octeontx - Fix a potential NULL dereference 2020-06-15 17:38:54 +10:00
Kconfig crypto: marvell - enable OcteonTX cpt options for build 2020-03-20 14:36:52 +11:00
Makefile crypto: marvell - enable OcteonTX cpt options for build 2020-03-20 14:36:52 +11:00