mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2 2/4] soc: qcom: geni-se: Widen fw_size to u32 to prevent wrap-around
Date: Thu, 20 Aug 2026 16:40:43 +0200	[thread overview]
Message-ID: <7ded57d7-4551-4f8d-a6ad-1fb52f4a26d6@oss.qualcomm.com> (raw)
In-Reply-To: <20260820-fix-write-to-read-only-firmware-buffer-v2-2-7badcdc455fe@oss.qualcomm.com>

On 8/20/26 4:30 PM, Viken Dadhaniya wrote:
> fw_size is read from the 16-bit fw_size_in_items field and incremented
> when the count is odd. If fw_size_in_items == 0xffff the increment
> wraps to 0 as a u16, making the bounds check below pass for a firmware
> segment whose actual size was not validated. Widen fw_size to u32 so
> the increment never wraps.
> 
> Fixes: d4bf06592ad6 ("soc: qcom: geni-se: Add support to load QUP SE Firmware via Linux subsystem")
> Cc: stable@vger.kernel.org
> Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

  reply	other threads:[~2026-08-20 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 14:30 [PATCH v2 0/4] Fix endian, overflow, and write-protection bugs in SE firmware loading Viken Dadhaniya
2026-08-20 14:30 ` [PATCH v2 1/4] soc: qcom: geni-se: Fix endian conversion for serial_protocol comparison Viken Dadhaniya
2026-08-20 14:40   ` Konrad Dybcio
2026-08-20 14:30 ` [PATCH v2 2/4] soc: qcom: geni-se: Widen fw_size to u32 to prevent wrap-around Viken Dadhaniya
2026-08-20 14:40   ` Konrad Dybcio [this message]
2026-08-20 14:31 ` [PATCH v2 3/4] soc: qcom: geni-se: Fix fw_end computed before round-up; propagate size to caller Viken Dadhaniya
2026-08-20 14:44   ` Konrad Dybcio
2026-08-20 14:31 ` [PATCH v2 4/4] soc: qcom: geni-se: Fix write to read-only firmware buffer Viken Dadhaniya
2026-08-20 14:47   ` Konrad Dybcio
2026-08-21  6:37     ` Viken Dadhaniya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ded57d7-4551-4f8d-a6ad-1fb52f4a26d6@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mukesh.savaliya@oss.qualcomm.com \
    --cc=stable@vger.kernel.org \
    --cc=viken.dadhaniya@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®