linux-stable/drivers/tee/amdtee
Rijo Thomas ff1f855804 tee: amdtee: fix memory leak due to reset of global shm list
The driver maintains a list of shared memory buffers along with their
mapped buffer id's in a global linked list. These buffers need to be
unmapped after use by the user-space client.

The global shared memory list is initialized to zero entries in the
function amdtee_open(). This clearing of list entries can be a source
for memory leak on secure side if the global linked list previously
held some mapped buffer entries allocated from another TEE context.

Fix potential memory leak issue by moving global shared memory list
to AMD-TEE driver context data structure.

Fixes: 757cc3e9ff ("tee: add AMD-TEE driver")
Reviewed-by: Devaraj Rangasamy <Devaraj.Rangasamy@amd.com>
Signed-off-by: Rijo Thomas <Rijo-john.Thomas@amd.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2020-11-09 08:58:54 +01:00
..
amdtee_if.h
amdtee_private.h tee: amdtee: fix memory leak due to reset of global shm list 2020-11-09 08:58:54 +01:00
call.c tee: amdtee: remove unused variable initialization 2020-01-16 15:18:13 +08:00
core.c tee: amdtee: fix memory leak due to reset of global shm list 2020-11-09 08:58:54 +01:00
Kconfig tee: amdtee: amdtee depends on CRYPTO_DEV_CCP_DD 2020-02-13 16:55:04 +08:00
Makefile
shm_pool.c