]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tee: check shm references are consistent in offset/size
authorEtienne Carriere <etienne.carriere@linaro.org>
Sun, 29 Apr 2018 12:22:29 +0000 (14:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:01:36 +0000 (04:01 +0900)
commitc6735890bcdf6256b8f89c1dcfd7e61c43e6db38
treea8446d10b8127e5c200a5589f880a25e722e5bea
parent33602c920837c49779a69d0e0b64fc4209c6832a
tee: check shm references are consistent in offset/size

[ Upstream commit ab9d3db5b320a052452b9cd035599ee3c84bbee9 ]

This change prevents userland from referencing TEE shared memory
outside the area initially allocated by its owner. Prior this change an
application could not reference or access memory it did not own but
it could reference memory not explicitly allocated by owner but still
allocated to the owner due to the memory allocation granule.

Reported-by: Alexandre Jutras <alexandre.jutras@nxp.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tee/tee_core.c