From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B380D3E4C73; Tue, 17 Mar 2026 16:38:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773765503; cv=none; b=XL3lHQp0Tk4erzx5neeQSUbaMo+wIS9L/NEcNkzOc9THM16pApDl83ZoDzMQdwkKq8+cPNY9S8U10fJfhb0CzPhIaJWJLp6WK92Bve2+xx+RPjjOtFwWZakO+idbkondwppq5fPh0yVHYBN4ET4A19PzR3loLV/KfQAa0vZ+1x8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773765503; c=relaxed/simple; bh=fzXbBKusYW/jXS8x2Uf2CNRmUTFjnoT1RBNckf22hQk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o6p0KE6Uy2MnEYVpm+ypGEhsTaH9BGkrpbr3cV5vMeBpXCUEyMR03N+PnxIty5xi2tayTyq7nrtYhyZLJQ32li8HSZ1d0hqKJ/Z1t6hNv5nTkIgG46MP3qmK6Ka9AoKfyjceDFJNfXqLvf8lojQE0uJR4oJCHjUZJ78iW9wPru0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=d0RAru41; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="d0RAru41" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4CF8C4CEF7; Tue, 17 Mar 2026 16:38:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773765503; bh=fzXbBKusYW/jXS8x2Uf2CNRmUTFjnoT1RBNckf22hQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d0RAru41MN1AJTXugt3rjUhaau7/VY3GvcysHOPQhoTNXOo9jKjaOiKGeJo0KR+v6 cldD7aOaun5wm1fi3DbYcu8beteUqmcrXsRtylKQzVriUXF15qMaCRsfIWDZ1rf84O q38EvRjSsybYRng4uoxuExer7VCbmBXs4T17eHEE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bjorn Andersson , Chris Lew , Bjorn Andersson , Sasha Levin Subject: [PATCH 6.19 005/378] remoteproc: sysmon: Correct subsys_name_len type in QMI request Date: Tue, 17 Mar 2026 17:29:22 +0100 Message-ID: <20260317163007.166669647@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260317163006.959177102@linuxfoundation.org> References: <20260317163006.959177102@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bjorn Andersson [ Upstream commit da994db94e60f9a9411108ddf4d1836147ad4c9c ] The QMI message encoder has up until recently read a single byte (as elem_size == 1), but with the introduction of big endian support it's become apparent that this field is expected to be a full u32 - regardless of the size of the length in the encoded message (which is what elem_size specifies). The result is that the encoder now reads past the length byte and rejects the unreasonably large length formed when including the following 3 bytes from the subsys_name array. Fix this by changing to the expected type. Fixes: 1fb82ee806d1 ("remoteproc: qcom: Introduce sysmon") Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Link: https://lore.kernel.org/r/20260220-qmi-encode-invalid-length-v2-1-5674be35ab29@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- drivers/remoteproc/qcom_sysmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc/qcom_sysmon.c index 660ac6fc40821..c6cc6e519fe56 100644 --- a/drivers/remoteproc/qcom_sysmon.c +++ b/drivers/remoteproc/qcom_sysmon.c @@ -203,7 +203,7 @@ static const struct qmi_elem_info ssctl_shutdown_resp_ei[] = { }; struct ssctl_subsys_event_req { - u8 subsys_name_len; + u32 subsys_name_len; char subsys_name[SSCTL_SUBSYS_NAME_LENGTH]; u32 event; u8 evt_driven_valid; -- 2.51.0