kernel-fxtec-pro1x/drivers/crypto/ccp
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
..
ccp-crypto-aes-cmac.c crypto: ahash - remove useless setting of cra_type 2018-07-09 00:30:26 +08:00
ccp-crypto-aes-galois.c crypto: drivers - remove duplicate includes 2017-12-22 19:29:01 +11:00
ccp-crypto-aes-xts.c crypto: ccp - Add XTS-AES-256 support for CCP version 5 2017-08-04 09:27:44 +08:00
ccp-crypto-aes.c crypto: ccp - CCP versioning support 2016-03-11 21:19:16 +08:00
ccp-crypto-des3.c crypto: ccp - Update copyright dates for 2017. 2017-07-28 17:58:01 +08:00
ccp-crypto-main.c crypto: ccp - use -ENOSPC for transient busy indication 2017-11-03 22:11:16 +08:00
ccp-crypto-rsa.c crypto: ccp - return an actual key size from RSA max_size callback 2018-03-03 00:03:41 +08:00
ccp-crypto-sha.c crypto: ahash - remove useless setting of cra_type 2018-07-09 00:30:26 +08:00
ccp-crypto.h crypto: ccp - Add XTS-AES-256 support for CCP version 5 2017-08-04 09:27:44 +08:00
ccp-debugfs.c crypto: ccp - don't disable interrupts while setting up debugfs 2018-03-03 00:03:40 +08:00
ccp-dev-v3.c csrypto: ccp - Expand RSA support for a v5 ccp 2017-07-28 17:58:06 +08:00
ccp-dev-v5.c crypto: ccp - remove unused variable qim 2017-11-03 21:53:30 +08:00
ccp-dev.c crypto: ccp - use -ENOSPC for transient busy indication 2017-11-03 22:11:16 +08:00
ccp-dev.h crypto: ccp - Fix XTS-AES-128 support on v5 CCPs 2017-08-04 09:27:41 +08:00
ccp-dmaengine.c crypto: ccp - Make function ccp_get_dma_chan_attr static 2018-02-15 23:26:56 +08:00
ccp-ops.c crypto: ccp - Validate buffer lengths for copy operations 2018-03-16 23:35:52 +08:00
Kconfig crypto: ccp: Add Platform Security Processor (PSP) device support 2017-12-04 10:57:28 -06:00
Makefile crypto: ccp: Add Platform Security Processor (PSP) device support 2017-12-04 10:57:28 -06:00
psp-dev.c crypto: ccp - Check for NULL PSP pointer at module unload 2018-08-03 18:06:05 +08:00
psp-dev.h crypto: ccp - Support register differences between PSP devices 2018-07-13 18:26:48 +08:00
sp-dev.c crypto: ccp - add check to get PSP master only when PSP is detected 2018-03-03 00:03:39 +08:00
sp-dev.h crypto: ccp - Support register differences between PSP devices 2018-07-13 18:26:48 +08:00
sp-pci.c crypto: ccp - Add support for new CCP/PSP device ID 2018-07-13 18:26:48 +08:00
sp-platform.c crypto: ccp - rename ccp driver initialize files as sp device 2017-07-18 18:15:54 +08:00