]> git.ipfire.org Git - thirdparty/linux.git/commit
tee: qcom: prevent potential off by one read
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 18 Sep 2025 09:50:26 +0000 (12:50 +0300)
committerJens Wiklander <jens.wiklander@linaro.org>
Fri, 19 Sep 2025 06:45:59 +0000 (08:45 +0200)
commitb14bb2e7821bdd133afeb5e623fd6c5a2273ecf6
treeaebb2d2ff85b31f3ea90ba017adfe63e4804a074
parentdcc7a571a3665a16581b5b18ca6b113f60a9a41a
tee: qcom: prevent potential off by one read

Re-order these checks to check if "i" is a valid array index before using
it.  This prevents a potential off by one read access.

Fixes: d6e290837e50 ("tee: add Qualcomm TEE driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
drivers/tee/qcomtee/call.c