linux-stable/drivers/crypto
Wei Yongjun 0871df190f virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session()
[ Upstream commit b1d65f717c ]

'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: 0756ad15b1 ("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: Sasha Levin <sashal@kernel.org>
2023-01-12 12:02:08 +01:00
..
allwinner crypto: sun8i-ss - use dma_addr instead u32 2022-12-31 13:32:30 +01:00
amcc
amlogic crypto: amlogic - Remove kcalloc without check 2022-12-31 13:32:36 +01:00
aspeed crypto: aspeed - Remove redundant dev_err call 2022-09-30 13:59:13 +08:00
axis crypto: artpec6 - Fix printk warning on size_t/%d 2022-09-24 16:14:43 +08:00
bcm crypto: bcm - Simplify obtain the name for cipher 2022-09-30 13:59:13 +08:00
caam
cavium crypto: nitrox - avoid double free on error path in nitrox_sriov_init() 2022-12-31 13:32:30 +01:00
ccp crypto: ccp - Add support for TEE for PCI ID 0x14CA 2023-01-07 11:11:54 +01:00
ccree crypto: ccree - Make cc_debugfs_global_fini() available for module init function 2022-12-31 13:32:33 +01:00
chelsio
gemini
hisilicon crypto: ccree,hisilicon - Fix dependencies to correct algorithm 2023-01-07 11:11:52 +01:00
inside-secure crypto: inside-secure - Replace generic aes with libaes 2022-09-24 16:14:43 +08:00
keembay
marvell crypto: marvell/octeontx - use sysfs_emit() to instead of scnprintf() 2022-09-30 13:59:13 +08:00
nx crypto: nx - Remove the unneeded result variable 2022-09-09 16:18:33 +08:00
qat crypto: qat - fix error return code in adf_probe 2022-12-31 13:32:36 +01:00
qce
rockchip crypto: rockchip - rework by using crypto_engine 2022-12-31 13:32:31 +01:00
stm32
ux500
virtio virtio-crypto: fix memory leak in virtio_crypto_alg_skcipher_close_session() 2023-01-12 12:02:08 +01:00
vmx
xilinx
atmel-aes-regs.h
atmel-aes.c
atmel-authenc.h
atmel-ecc.c
atmel-i2c.c
atmel-i2c.h
atmel-sha-regs.h
atmel-sha.c
atmel-sha204a.c
atmel-tdes-regs.h
atmel-tdes.c
exynos-rng.c
geode-aes.c
geode-aes.h
hifn_795x.c
img-hash.c crypto: img-hash - Fix variable dereferenced before check 'hdev->req' 2022-12-31 13:32:37 +01:00
ixp4xx_crypto.c
Kconfig crypto: ccree,hisilicon - Fix dependencies to correct algorithm 2023-01-07 11:11:52 +01:00
Makefile
mxs-dcp.c
n2_asm.S
n2_core.c crypto: n2 - add missing hash statesize 2023-01-07 11:11:54 +01:00
n2_core.h
omap-aes-gcm.c
omap-aes.c
omap-aes.h
omap-crypto.c
omap-crypto.h
omap-des.c
omap-sham.c crypto: omap-sham - Use pm_runtime_resume_and_get() in omap_sham_probe() 2022-12-31 13:32:36 +01:00
padlock-aes.c
padlock-sha.c
qcom-rng.c
s5p-sss.c
sa2ul.c
sa2ul.h
sahara.c
talitos.c
talitos.h