linux/drivers/tee
Sumit Garg ad338d825e tee: optee: Fix incorrect page free bug
commit 18549bf4b2 upstream.

Pointer to the allocated pages (struct page *page) has already
progressed towards the end of allocation. It is incorrect to perform
__free_pages(page, order) using this pointer as we would free any
arbitrary pages. Fix this by stop modifying the page pointer.

Fixes: ec185dd3ab ("optee: Fix memory leak when failing to register shm pages")
Cc: stable@vger.kernel.org
Reported-by: Patrik Lantz <patrik.lantz@axis.com>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Tyler Hicks <tyhicks@linux.microsoft.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-29 12:26:05 +01:00
..
amdtee tee: amdtee: fix an IS_ERR() vs NULL bug 2021-12-22 09:30:52 +01:00
optee tee: optee: Fix incorrect page free bug 2021-12-29 12:26:05 +01:00
Kconfig tee: fix crypto select 2020-05-28 12:38:00 +02:00
Makefile
tee_core.c Reenable kernel login method for kernel TEE client API 2020-10-26 10:55:56 +01:00
tee_private.h tee: don't assign shm id for private shms 2020-02-28 13:37:42 +01:00
tee_shm_pool.c
tee_shm.c tee: handle lookup of shm with reference count 0 2021-12-29 12:26:02 +01:00