[PATCH] firmware: arm_ffa: Fix a possible ffa_linux_errmap buffer overflow
Sudeep Holla
sudeep.holla at arm.com
Wed Jul 14 09:47:20 PDT 2021
On Wed, 7 Jul 2021 14:47:39 +0100, Sudeep Holla wrote:
> The ffa_linux_errmap buffer access index is supposed to range from 0-8
> but it ranges from 1-9 instead. It reads one element out of bounds. It
> also changes the success into -EINVAL though ffa_to_linux_errno is never
> used in case of success, it is expected to work for success case too.
>
> It is slightly confusing code as the negative of the error code
> is used as index to the buffer. Fix it by negating it at the start and
> make it more readable.
Applied to sudeep.holla/linux (for-next/ffa), thanks!
[1/1] firmware: arm_ffa: Fix a possible ffa_linux_errmap buffer overflow
https://git.kernel.org/sudeep.holla/c/dd925db6f0
--
Regards,
Sudeep
More information about the linux-arm-kernel
mailing list