Skip to content

FROMLIST: soc: qcom: smd-rpm: Avoid out-of-bounds write on empty error message - #1614

Open
smankad-oss wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
smankad-oss:qcom-6.18.y
Open

smankad-oss wants to merge 1 commit into
qualcomm-linux:qcom-6.18.yfrom
smankad-oss:qcom-6.18.y

Conversation

@smankad-oss

@smankad-oss smankad-oss commented Dec 2, 2026 •

Copy link
Copy Markdown

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

…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>
@qswat-orbit-external

Copy link
Copy Markdown

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.

@smankad-oss smankad-oss changed the title FROMLIST: soc: qcom: smd-rpm: Avoid out-of-bounds write on empty erro… FROMLIST: soc: qcom: smd-rpm: Avoid out-of-bounds write on empty error message Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant