Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7595d550 authored by Dan Carpenter's avatar Dan Carpenter Committed by Victor Chong
Browse files

BACKPORT: tee: shm: Potential NULL dereference calling tee_shm_register()



get_user_pages_fast() can return zero in certain error paths.  We should
handle that or else it means we accidentally return ERR_PTR(0) which is
NULL instead of an error pointer.  The callers are not expecting that
and will crash with a NULL dereference.

Change-Id: I5622affddeb1fc5e80ba6ccdbfdc77e129a2ca84
Fixes: 033ddf12bcf5 ("tee: add register user memory")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 2490cdf6435b1d3cac0dbf710cd752487c67c296)
Signed-off-by: default avatarVictor Chong <victor.chong@linaro.org>
parent 196cb35a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment