vhost/crypto: check request pointer before dereference
authorThierry Herbelot <thierry.herbelot@6wind.com>
Mon, 24 May 2021 09:08:21 +0000 (11:08 +0200)
committerChenbo Xia <chenbo.xia@intel.com>
Wed, 23 Jun 2021 07:55:23 +0000 (09:55 +0200)
commit9cfbe67691f02e3f66f6a6804a5ce266830e1f3f
tree6984d42df255b402ec4b99dbf42159f99d99d595
parent2d333c4ac3bf4a1d236bf24bb33fa1df58e6009b
vhost/crypto: check request pointer before dereference

Use vc_req only after it was checked not to be NULL.

Fixes: 2d962bb736521 ("vhost/crypto: fix possible TOCTOU attack")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/vhost/vhost_crypto.c