[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5hss454btv4w7n6yj2z5fsxufn35xgtjcc4dnaopjwul57bdag@w6qxobezqowq>
Date: Tue, 5 Aug 2025 12:53:32 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Val Packett <val@...kett.cool>, Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] soc: qcom: mdt_loader: Allow empty section headers in
mdt_header_valid()
On Tue, Aug 05, 2025 at 12:29:00PM +0300, Dan Carpenter wrote:
> The mdt_header_valid() function checks all the members for the elf
> header to ensure that reading the firmware doesn't lead to a buffer
> overflow or an integer overflow. However it has a bug, in that it
> doesn't allow for firmware with no section headers and this prevents
> the firmware from loading.
>
> I know from bug reports that there are firmwares which have zero
> section headers, but the same logic applies to program headers. An
> empty program header won't lead to a buffer overflow so it's safe to
> allow it.
>
> Fixes: 9f35ab0e53cc ("soc: qcom: mdt_loader: Fix error return values in mdt_header_valid()")
> Cc: stable@...r.kernel.org
> Reported-by: Val Packett <val@...kett.cool>
> Reported-by: Neil Armstrong <neil.armstrong@...aro.org>
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> drivers/soc/qcom/mdt_loader.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
There was a patch posted by Mukesh: [1]
[1] https://lore.kernel.org/linux-arm-msm/20250804-mdtloader-changes-v1-3-5e74629a2241@oss.qualcomm.com/
--
With best wishes
Dmitry
Powered by blists - more mailing lists