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

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

mhi: core: Read transfer length from an event properly



When MHI Driver receives an EOT event, it reads xfer_len from the
event in the last TRE. The value is under control of the MHI device
and never validated by Host MHI driver. The value should never be
larger than the real size of the buffer but a malicious device can
set the value 0xFFFF as maximum. This causes device to memory
overflow (both read or write). Fix this issue by reading minimum of
transfer length from event and the buffer length provided.

Change-Id: I1ff21ed504acc901ec334b402362915ca2a7d4c4
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 03b06d3e
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