From: Atul Akella <atul.akella@gmail.com>
To: andersson@kernel.org, mathieu.poirier@linaro.org,
sibi.sankar@oss.qualcomm.com, quic_srichara@quicinc.com
Cc: linux-remoteproc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, Atul Akella <atul.akella@gmail.com>
Subject: [PATCH 0/4] remoteproc: qcom: Fix DA-to-VA bounds checks
Date: Sat, 7 Nov 2026 00:13:07 +0530 [thread overview]
Message-ID: <20261106184312.100-1-atul.akella@gmail.com> (raw)
This series fixes the same bounds check bug in da_to_va() across four
Qualcomm remoteproc PIL drivers: qcom_q6v5_adsp, qcom_q6v5_pas,
qcom_q6v5_wcss, and qcom_wcnss.
In each driver, offset is a signed 32bit integer assigned from
the 64 bit difference da - <base>, where both operands are u64.
If da is smaller than <base>, the subtraction underflows before
the result is truncated on assignment. This can produce a small
positive offset and bypass the existing underflow check.
Separately, the offset + len bounds check can overflow.
da and len originate from firmware ELF program headers
(p_paddr and p_memsz) via rproc_da_to_va(). The returned
address is used by the ELF loader to write firmware segments, so a
malformed firmware image can cause writes outside the carveout.
Each patch keeps offset in u64, rejects addresses below the
relocation base before subtraction, and uses a subtraction based
bounds check to avoid overflow.
Atul Akella (4):
remoteproc: qcom: Fix bounds check in adsp_da_to_va()
remoteproc: qcom: Fix bounds check in qcom_pas_da_to_va()
remoteproc: qcom: Fix bounds check in q6v5_wcss_da_to_va()
remoteproc: qcom: Fix bounds check in wcnss_da_to_va()
drivers/remoteproc/qcom_q6v5_adsp.c | 6 ++++--
drivers/remoteproc/qcom_q6v5_pas.c | 6 ++++--
drivers/remoteproc/qcom_q6v5_wcss.c | 6 ++++--
drivers/remoteproc/qcom_wcnss.c | 6 ++++--
4 files changed, 16 insertions(+), 8 deletions(-)
--
2.43.0
next reply other threads:[~2026-11-06 18:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 18:43 Atul Akella [this message]
2026-11-06 18:43 ` [PATCH 1/4] remoteproc: qcom: Fix bounds check in adsp_da_to_va() Atul Akella
2026-11-06 18:43 ` [PATCH 2/4] remoteproc: qcom: Fix bounds check in qcom_pas_da_to_va() Atul Akella
2026-11-06 18:43 ` [PATCH 3/4] remoteproc: qcom: Fix bounds check in q6v5_wcss_da_to_va() Atul Akella
2026-11-06 18:43 ` [PATCH 4/4] remoteproc: qcom: Fix bounds check in wcnss_da_to_va() Atul Akella
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=20261106184312.100-1-atul.akella@gmail.com \
--to=atul.akella@gmail.com \
--cc=andersson@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=quic_srichara@quicinc.com \
--cc=sibi.sankar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.