linux/drivers/crypto
Tom Lendacky afb31cd2d1 crypto: ccp - Check for NULL PSP pointer at module unload
Should the PSP initialization fail, the PSP data structure will be
freed and the value contained in the sp_device struct set to NULL.
At module unload, psp_dev_destroy() does not check if the pointer
value is NULL and will end up dereferencing a NULL pointer.

Add a pointer check of the psp_data field in the sp_device struct
in psp_dev_destroy() and return immediately if it is NULL.

Cc: <stable@vger.kernel.org> # 4.16.x-
Fixes: 2a6170dfe7 ("crypto: ccp: Add Platform Security Processor (PSP) device support")
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Acked-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2018-08-03 18:06:05 +08:00
..
amcc crypto: skcipher - remove useless setting of type flags 2018-07-09 00:30:27 +08:00
axis crypto: skcipher - remove useless setting of type flags 2018-07-09 00:30:27 +08:00
bcm crypto: aead - remove useless setting of type flags 2018-07-09 00:30:26 +08:00
caam crypto: ahash - remove useless setting of cra_type 2018-07-09 00:30:26 +08:00
cavium crypto: cavium/nitrox - Replace GFP_ATOMIC with GFP_KERNEL in crypto_alloc_context() 2018-08-03 18:05:49 +08:00
ccp crypto: ccp - Check for NULL PSP pointer at module unload 2018-08-03 18:06:05 +08:00
ccree crypto: ccree - allow bigger than sector XTS op 2018-08-03 18:06:05 +08:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2018-08-03 17:55:12 +08:00
hisilicon crypto: hisilicon - SEC security accelerator driver 2018-08-03 18:06:02 +08:00
inside-secure crypto: inside-secure - initialize first_rdesc to make GCC happy 2018-07-20 13:51:22 +08:00
marvell crypto: remove redundant type flags from tfm allocation 2018-07-09 00:30:29 +08:00
mediatek crypto: mediatek - move to generic async completion 2017-11-03 22:11:23 +08:00
nx crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
qat crypto: qat/adf_aer - Replace GFP_ATOMIC with GFP_KERNEL in adf_dev_aer_schedule_reset() 2018-08-03 18:05:49 +08:00
qce crypto: remove redundant type flags from tfm allocation 2018-07-09 00:30:29 +08:00
rockchip License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
stm32 crypto: stm32_crc32 - Use existing define with polynomial 2018-07-27 19:16:36 +08:00
sunxi-ss crypto: skcipher - remove useless setting of type flags 2018-07-09 00:30:27 +08:00
ux500 crypto: ahash - remove useless setting of cra_type 2018-07-09 00:30:26 +08:00
virtio crypto: virtio - Replace GFP_ATOMIC with GFP_KERNEL in __virtio_crypto_ablkcipher_do_req() 2018-08-03 18:06:01 +08:00
vmx crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
atmel-aes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-aes.c crypto: atmel-aes - fix the keys zeroing on errors 2018-03-03 00:03:40 +08:00
atmel-authenc.h crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes 2017-02-03 18:16:14 +08:00
atmel-ecc.c crypto: atmel-ecc - remove overly verbose dev_info 2018-06-22 23:03:08 +08:00
atmel-ecc.h crypto: atmel-ecc - introduce Microchip / Atmel ECC driver 2017-07-18 17:50:58 +08:00
atmel-sha-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-sha.c crypto: remove redundant type flags from tfm allocation 2018-07-09 00:30:29 +08:00
atmel-tdes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-tdes.c crypto: atmel - Delete error messages for a failed memory allocation in six functions 2018-02-22 22:17:00 +08:00
exynos-rng.c crypto: drivers - simplify getting .drvdata 2018-04-28 16:09:35 +08:00
geode-aes.c crypto: geode-aes - fixed coding style warnings and error 2017-07-18 18:15:57 +08:00
geode-aes.h
hifn_795x.c crypto: hifn_795x - Fix a memory leak in the error handling path of 'hifn_probe()' 2017-11-29 17:33:30 +11:00
img-hash.c crypto: img-hash - remove unnecessary static in img_hash_remove() 2017-08-03 13:47:18 +08:00
ixp4xx_crypto.c crypto: ixp4xx - don't leak pointers to authenc keys 2018-03-31 01:33:12 +08:00
Kconfig crypto: hisilicon - SEC security accelerator driver 2018-08-03 18:06:02 +08:00
Makefile crypto: hisilicon - SEC security accelerator driver 2018-08-03 18:06:02 +08:00
mxc-scc.c crypto: mxc-scc - fix error code in mxc_scc_probe() 2017-07-18 17:50:54 +08:00
mxs-dcp.c crypto: mxs-dcp - Add empty hash export and import 2018-02-15 23:23:44 +08:00
n2_asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2_core.c crypto: ahash - remove useless setting of type flags 2018-07-09 00:30:25 +08:00
n2_core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap-aes-gcm.c crypto: omap-aes - pr_err() strings should end with newlines 2017-10-12 22:54:51 +08:00
omap-aes.c crypto: omap-aes - make queue length configurable 2018-03-09 22:45:39 +08:00
omap-aes.h crypto: omap - convert to new crypto engine API 2018-02-15 23:26:51 +08:00
omap-crypto.c crypto: omap-crypto - Verify page zone scatterlists before starting DMA 2018-03-09 22:45:36 +08:00
omap-crypto.h crypto: omap - add base support library for common routines 2017-06-10 12:04:15 +08:00
omap-des.c crypto: omap - convert to new crypto engine API 2018-02-15 23:26:51 +08:00
omap-sham.c crypto: ahash - remove useless setting of type flags 2018-07-09 00:30:25 +08:00
padlock-aes.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-15 01:15:52 +01:00
padlock-sha.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
picoxcell_crypto_regs.h
picoxcell_crypto.c crypto: drivers - simplify getting .drvdata 2018-04-28 16:09:35 +08:00
qcom-rng.c crypto: qcom-rng - Add ACPI support 2018-07-27 19:04:32 +08:00
s5p-sss.c crypto: ahash - remove useless setting of type flags 2018-07-09 00:30:25 +08:00
sahara.c crypto: sharah - Unregister correct algorithms for SAHARA 3 2018-07-20 13:51:22 +08:00
talitos.c crypto: ahash - remove useless setting of cra_type 2018-07-09 00:30:26 +08:00
talitos.h crypto: talitos - chain in buffered data for ahash on SEC1 2017-10-12 22:55:38 +08:00