From: Maulik Shah <maulik.shah@oss.qualcomm.com>
To: Sneh Mankad <sneh.mankad@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>,
Andy Gross <agross@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: qcom: smd-rpm: Avoid out-of-bounds write on empty error message
Date: Mon, 30 Nov 2026 11:51:41 +0530 [thread overview]
Message-ID: <329ba191-eb00-4eb2-89bc-2597fbe5a4d5@oss.qualcomm.com> (raw)
In-Reply-To: <20261118-smd_rpm_oob_fix-v1-1-e233c4262caf@oss.qualcomm.com>
On 18-11-2026 18:19, Sneh Mankad wrote:
> For an error response the RPM driver copies the error string from IO
> memory into a fixed size stack buffer and NUL terminates it at
> msgbuf[len - 1].
>
> The copy length is derived from the message length advertised by the
> RPM firmware, so a message that carries no payload leaves len at zero
> and the NUL termination writes one byte before the buffer.
>
> Treat such a message as an error without inspecting its payload.
>
> Fixes: 936f14cf4e67 ("soc: qcom: Driver for the Qualcomm RPM over SMD")
> Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
Reviewed-by: Maulik Shah <maulik.shah@oss.qualcomm.com>
Thanks,
Maulik
prev parent reply other threads:[~2026-11-30 6:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 12:49 Sneh Mankad
2026-11-30 6:21 ` Maulik Shah [this message]
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=329ba191-eb00-4eb2-89bc-2597fbe5a4d5@oss.qualcomm.com \
--to=maulik.shah@oss.qualcomm.com \
--cc=abelvesa@kernel.org \
--cc=agross@codeaurora.org \
--cc=andersson@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sneh.mankad@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®