kernel_samsung_a53x/drivers/crypto/virtio
Wei Yongjun c4223afb7a virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session()
commit b1d65f717cd6305a396a8738e022c6f7c65cfbe8 upstream.

'vc_ctrl_req' is alloced in virtio_crypto_alg_skcipher_close_session(),
and should be freed in the invalid ctrl_status->status error handling
case. Otherwise there is a memory leak.

Fixes: 0756ad15b1fe ("virtio-crypto: use private buffer for control request")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Message-Id: <20221114110740.537276-1-weiyongjun@huaweicloud.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
Acked-by: zhenwei pi<pizhenwei@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:12:45 +01:00
..
Kconfig virtio-crypto: implement RSA algorithm 2024-11-18 12:12:25 +01:00
Makefile virtio-crypto: implement RSA algorithm 2024-11-18 12:12:25 +01:00
virtio_crypto_akcipher_algs.c virtio-crypto: fix memory-leak 2024-11-18 12:12:45 +01:00
virtio_crypto_algs.c virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session() 2024-11-18 12:12:45 +01:00
virtio_crypto_common.h crypto: virtio - Handle dataq logic with tasklet 2024-11-18 12:12:26 +01:00
virtio_crypto_core.c crypto: virtio - Wait for tasklet to complete on device remove 2024-11-18 12:12:27 +01:00
virtio_crypto_mgr.c virtio-crypto: implement RSA algorithm 2024-11-18 12:12:25 +01:00