mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
Merge tag 'tee-amdtee-fix2-for-5.6' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes
tee: amdtee: out of bounds read in find_session() * tag 'tee-amdtee-fix2-for-5.6' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: amdtee: out of bounds read in find_session() Link: https://lore.kernel.org/r/20200320063446.GA9892@jade Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -139,6 +139,9 @@ static struct amdtee_session *find_session(struct amdtee_context_data *ctxdata,
|
|||||||
u32 index = get_session_index(session);
|
u32 index = get_session_index(session);
|
||||||
struct amdtee_session *sess;
|
struct amdtee_session *sess;
|
||||||
|
|
||||||
|
if (index >= TEE_NUM_SESSIONS)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
list_for_each_entry(sess, &ctxdata->sess_list, list_node)
|
list_for_each_entry(sess, &ctxdata->sess_list, list_node)
|
||||||
if (ta_handle == sess->ta_handle &&
|
if (ta_handle == sess->ta_handle &&
|
||||||
test_bit(index, sess->sess_mask))
|
test_bit(index, sess->sess_mask))
|
||||||
|
Reference in New Issue
Block a user