Commit 321896ee authored by Gokul krishna Krishnakumar's avatar Gokul krishna Krishnakumar Committed by Greg Kroah-Hartman
Browse files

soc: qcom: mdt_loader: Enhance split binary detection



[ Upstream commit 210d12c8 ]

It may be that the offset of the first program header lies inside the mdt's
filesize, in this case the loader would incorrectly assume that the bins
were not split and in this scenario the firmware authentication fails.
This change updates the logic used by the mdt loader to understand whether
the firmware images are split or not. It figures this out by checking if
each programs header's segment lies within the file or not.

Co-developed-by: default avatarMelody Olvera <quic_molvera@quicinc.com>
Signed-off-by: default avatarMelody Olvera <quic_molvera@quicinc.com>
Signed-off-by: default avatarGokul krishna Krishnakumar <quic_gokukris@quicinc.com>
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230509001821.24010-1-quic_gokukris@quicinc.com


Stable-dep-of: 9f9967fe ("soc: qcom: mdt_loader: Ensure we don't read past the ELF header")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4e79eed9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment