Re: [PATCH] soc: qcom: smd-rpm: Avoid out-of-bounds write on empty error message
From: Maulik Shah
Date: Mon Nov 30 2026 - 01:21:56 EST
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@xxxxxxxxxxxxxxxx>
Reviewed-by: Maulik Shah <maulik.shah@xxxxxxxxxxxxxxxx>
Thanks,
Maulik