Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796131305; b=pVKzuSZ9bIqYaKCSzIuierV3JufbVmlP13UPawU4ZzdkPmUBV94l3jbi542H7iJ/dcW3 /nsbSUjIYoq52sopJovOSxYNBQdJX8VXSrdGSgVHgjuaqyMprJT4quKRaFKYueTBGDzUf NgMHFeX0hV3hAe2Q+q/ZEOuBJkk9uaAPZE/woeq1gOgQMKB3evXp3FzOUi0xLBFgj1qX6 uwbz1EK9Tocj4Osh5NHvAWF9FrP+Tgxz+7hrg1gqiWg6SpR3DfLmlEhwECIItn39ypD38 y38oXoX38983b9ACRX4c83LkRNzGQ9NmFm3/5zSjuB6jD7kRYDMi/lAue2B1MMvx9PQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796131305; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=groclHBDsRsPo2bGKlaLMxtcrI8dX1TdFy7Ys+gLD7Q=; b=XG6mkI75mccqox9yOuPWdfNbsdP9AhQDsjx5CEQ6rGJAE791Uc4aOctbTMZFvTTFT6jp 0ZbBdJjtBIPkznpYbsib45b4YezuXqNb1YCwtNgDn6bwDgkac8qCQrk2xOvyHtyJdXbMO 0nT9IFcqCos4mE6hGGVqrHqn8nhKFApMPvrk+OYgwSt5VIQ+sr/lVDlsYoSqFdm9zMsB8 QapoVXBn2/vF1Vd/lqwHxVelODXP6qhjl4QJjbDs/I1jO1iIpAb7Khu37s/ensGwar31s rsMgPaWFVsYj2/Ix2x8q41FPlNwUpIDOzNe9GZw8CkcdTR2vgc81Gepe5PKlZ3roFuA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QP9jp17i; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4ED9606A31A for ; Tue, 1 Dec 2026 13:21:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=QP9jp17i Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB8311F00937; Tue, 1 Dec 2026 13:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796131303; bh=groclHBDsRsPo2bGKlaLMxtcrI8dX1TdFy7Ys+gLD7Q=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=QP9jp17iMbJifdF0GxVp91BO41pOnmz9jd1hl/64PyI7I4WjMJrhjRlT+4K+lvm0U ak4q9IwepwKbHcoGTz1fLvgdN8jjq2Ux1Bq5eh9SHIMheZmZmcTs9d+vOTpIeffMC5 PPMG3oRIMpJEGsZTYeMZXga5t34ZF5Q3hj80wT4JHVjJKjbGb2XUW0ITqBCZrgXz2i 52BFJ2XoNbWalXBkG9GaTHBhzhspH0/luo/U8Zc39EcezpvI/TnzgMugzxZSaaTX3j fO2wUMciNgtMLaLuEUsac8DVKBXhiDsi3CJz5svbFJgZRTiYbit40giF15V+fcHa2Q RVyD24YAbrMSw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] ASoC: qcom: q6afe: do not report the unvote response as unknown Reply-To: sashiko-reviews@lists.linux.dev To: "Riccardo Mereu" Cc: linux-sound@vger.kernel.org In-Reply-To: <20261201131548.161908-1-r.mereu.kernel@arduino.cc> References: <20261201131548.161908-1-r.mereu.kernel@arduino.cc> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 13:21:43 +0000 X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [Critical] soc: qcom: apr: uninitialized pointer deref in apr_do_rx_callback() [1] -- commit cd38bd3ad96610d53840f172cb39125a91b67488 Author: Riccardo Mereu ASoC: qcom: q6afe: do not report the unvote response as unknown This commit adds a case for AFE_CMD_REMOTE_LPASS_CORE_HW_DEVOTE_REQUEST in q6afe_callback() so that asynchronous unvote acknowledgements from the DSP are ignored instead of logged as unknown commands. > diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c > index 4f7b706c77b5d..4b2620cb9c4a7 100644 > --- a/sound/soc/qcom/qdsp6/q6afe.c > +++ b/sound/soc/qcom/qdsp6/q6afe.c > @@ -1038,6 +1038,9 @@ static int q6afe_callback(struct apr_device *adev, = const struct apr_resp_pkt *da > wake_up(&afe->wait); > } > break; > + case AFE_CMD_REMOTE_LPASS_CORE_HW_DEVOTE_REQUEST: > + /* nobody waits for the unvote to be acknowledged */ > + break; > default: > dev_err(afe->dev, "Unknown cmd 0x%x\n", res->opcode); > break; [Severity: Critical] This problem wasn't introduced by this patch, but can q6afe_callback() dereference an uninitialized data->payload pointer via res [1]? In apr_do_rx_callback(), hdr->pkt_size and hdr_size are unsigned 16-bit integers, so a malformed packet with hdr_size > hdr->pkt_size produces a negative resp.payload_size and leaves the stack pointer resp.payload uninitialized: drivers/soc/qcom/apr.c:apr_do_rx_callback() { ... resp.payload_size =3D hdr->pkt_size - hdr_size; ... if (resp.payload_size > 0) resp.payload =3D buf + hdr_size; adrv->callback(adev, &resp); ... } Because q6afe_callback() only checks if (!data->payload_size), a negative payload_size passes that check and res =3D data->payload is dereferenced. [1] https://sashiko.dev/#/bug/linux-82d40745-1593-4c20-8432-d86099836525 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201131548.1619= 08-1-r.mereu.kernel@arduino.cc?part=3D1