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

Skip to content
Commit 4f836c2f authored by Hemant Kumar's avatar Hemant Kumar
Browse files

mhi: core: Add range check for channel id received in event ring



The mhi_process_cmd_completion function reads cmd channel id from
cmd_pkt using MHI_TRE_GET_CHID, the value is under the control of MHI
devices and can be any value between 0 and 255. However the max channel
is defined in device tree file and it is usually smaller than 255. This
can cause out of bound access to the channel array. Fix this by checking
the channel id received in cmd ring against the max channel allowed on
target.

Change-Id: Ib6faf67c7eae67186b3a44e6b1612deff6bf05fa
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 88f2f79b
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