]> xenbits.xensource.com Git - qemu-xen.git/commit
virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_request
authorMauro Matteo Cascella <mcascell@redhat.com>
Tue, 9 May 2023 07:53:17 +0000 (09:53 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 22 May 2023 16:39:33 +0000 (19:39 +0300)
commit926a8380f2eb2dcb3c455b4382f4dac5c980ecba
treeab7bec16095bca3da982e267908e25db53bb1eff
parentdd63d3a5b8b312ba042a827441d62458ad63a374
virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_request

Ensure op_info is not NULL in case of QCRYPTODEV_BACKEND_ALG_SYM algtype.

Fixes: 0e660a6f90a ("crypto: Introduce RSA algorithm")
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Reported-by: Yiming Tao <taoym@zju.edu.cn>
Message-Id: <20230509075317.1132301-1-mcascell@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: zhenwei pi<pizhenwei@bytedance.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 3e69908907f8d3dd20d5753b0777a6e3824ba824)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Mjt: context tweak after 999c789f00 cryptodev: Introduce cryptodev alg type in QAPI)
hw/virtio/virtio-crypto.c