Repository navigation
FROMLIST: soc: qcom: smd-rpm: Avoid out-of-bounds write on empty error message - #1614
Open
smankad-oss wants to merge 1 commit into
Open
smankad-oss wants to merge 1 commit into
smankad-oss wants to merge 1 commit into
Conversation
…r message 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: 936f14c ("soc: qcom: Driver for the Qualcomm RPM over SMD") Link: https://lore.kernel.org/all/20261118-smd_rpm_oob_fix-v1-1-e233c4262caf@oss.qualcomm.com/ Signed-off-by: Sneh Mankad <sneh.mankad@oss.qualcomm.com>
smankad-oss
requested review from
a team,
Komal Bajaj (Komal-Bajaj),
Amit Kucheria (idlethread) and
Salendarsingh Gaud (sgaud-quic)
December 2, 2026 13:38
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Link: https://lore.kernel.org/all/20261118-smd_rpm_oob_fix-v1-1-e233c4262caf@oss.qualcomm.com/
CRs-Fixed: 4766527