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 8EECB20E6F1 for ; Thu, 27 Mar 2025 13:38:51 +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=1743082731; cv=none; b=fVFLr3KVKD2QC5LQGnw9V+KFX7jhzfXXllPiVDmE4EMmpwfHStw1lpgg3WoIpejNcDpZ2ttcwADzQDJwwd465qdRd0VT8GbIF2U6qWc3eim4SSu/vP0wtNDOLid2ikZDc3GRg1nJyRJwncWTaUzwwa2mi1h14M6JD3hy6haSrAU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743082731; c=relaxed/simple; bh=hPVVmffktebJYimpXYKOPFwChW1OrKDLZuoCrIVmSl0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=n5X6vuEOMPObxUGUZbHPqB7k8yBK4U5BkrQywXclbUtJ+gnleilH/WOoB+FeoWKA8ml0A8mjPwioIwN/8RB94l5dfoqHIkMo89AJKYFrZ1avZKI1SoWthl6FgRKOxXc3QeFdka8NaD80CWlaipu3GgdPkBe7uKuOlx6xELzhbJg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vO9bz9k9; 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="vO9bz9k9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BB8DC4CEDD; Thu, 27 Mar 2025 13:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743082731; bh=hPVVmffktebJYimpXYKOPFwChW1OrKDLZuoCrIVmSl0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=vO9bz9k9Ku755YXiZevHj6S+KaKZ0LCxl8mVir4WxpygshCb1tmXyzf/vR9D+1LLu dfIcBzMPch+n+wvn93UEziyDVdmV8Yop6syYEdnVMNKxuwvoJ/LTCiyRge8ogJ4lza yF8Tep4cTBm306NykIKXYGfB19xpiF4bYSX1rApA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21870: ASoC: SOF: ipc4-topology: Harden loops for looking up ALH copiers Date: Thu, 27 Mar 2025 14:38:36 +0100 Message-ID: <2025032735-CVE-2025-21870-4c78@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2603; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hPVVmffktebJYimpXYKOPFwChW1OrKDLZuoCrIVmSl0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlPQ26f1WHYzLj7ruytkonmqwzj/Jbt//BgbUaFR9PGi Qnv3lwK74hlYRBkYpAVU2T5so3n6P6KQ4pehranYeawMoEMYeDiFICJ5K5gWNBe1iB12LwrLE/Y W1Ju7WzbjQYJ2QwLOhVrArcqH8jzdfgf9iu5Z9vNb3/bAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: ASoC: SOF: ipc4-topology: Harden loops for looking up ALH copiers Other, non DAI copier widgets could have the same stream name (sname) as the ALH copier and in that case the copier->data is NULL, no alh_data is attached, which could lead to NULL pointer dereference. We could check for this NULL pointer in sof_ipc4_prepare_copier_module() and avoid the crash, but a similar loop in sof_ipc4_widget_setup_comp_dai() will miscalculate the ALH device count, causing broken audio. The correct fix is to harden the matching logic by making sure that the 1. widget is a DAI widget - so dai = w->private is valid 2. the dai (and thus the copier) is ALH copier The Linux kernel CVE team has assigned CVE-2025-21870 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit a150345aa758492e05d2934f318ce7c2566b1cfe and fixed in 6.12.17 with commit 87c8768a96092ce75cd47fe076db5080db7ac515 Issue introduced in 6.0 with commit a150345aa758492e05d2934f318ce7c2566b1cfe and fixed in 6.13.5 with commit 93c6c2e5801aab09ef1ef99f248f3cd323c3f152 Issue introduced in 6.0 with commit a150345aa758492e05d2934f318ce7c2566b1cfe and fixed in 6.14 with commit 6fd60136d256b3b948333ebdb3835f41a95ab7ef Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-21870 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: sound/soc/sof/ipc4-topology.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/87c8768a96092ce75cd47fe076db5080db7ac515 https://git.kernel.org/stable/c/93c6c2e5801aab09ef1ef99f248f3cd323c3f152 https://git.kernel.org/stable/c/6fd60136d256b3b948333ebdb3835f41a95ab7ef