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 36E4015CD77 for ; Mon, 29 Jul 2024 16:27:05 +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=1722270425; cv=none; b=t/K15jj2SRQcVBQU7o1VZP3XJdZNnxkQDtJCv5MJ2FrCUybSTLFB17DV6QXsYG9/lFssQTDcCay6iC81a5JOBksPu5NgOS1dw0e/hHH4eE6911Gkik3uqykUGS8z+bo2MJyjuxA2DPosVHgrOcGCnQ9TwtIP0U6hqFV0dS8j4Kw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722270425; c=relaxed/simple; bh=9pPXn0tWV7AaoNBKPtwfK3rJpicQUqDTwaV8PSlGawk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dwhUE3HPJIzOvpnqh7ml54LavS6f0mqKjQHRlQ5aAWtGDv53MNulDkNRWoJFiFJ01DPaGmTmSpVnIKYTUM3hzPZm6wK+bquz4yqkO3FXAwobRMAThI2nobCAcJOh80iDIlODUXmlChkDrGSeDQ1tsb/CFr0F5HVtCsNug458LtY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jKF9itco; 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="jKF9itco" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93606C32786; Mon, 29 Jul 2024 16:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1722270425; bh=9pPXn0tWV7AaoNBKPtwfK3rJpicQUqDTwaV8PSlGawk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jKF9itcoQ0jSXKs6GKzFwUsbeW1o12x8iXOwyLv4D8/X8UF5G5hW4BbkeTuOiXHpN nRwfdL+2yBnPnAFtY6u6MV4w/PZ5ueQmD5aSeMB31qY0huX79WQDqh5Q2x480U5RDm UBm8TKl+OtfQYkQyeHabjGQWjK942opTor+fTJr8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-42088: ASoC: mediatek: mt8195: Add platform entry for ETDM1_OUT_BE dai link Date: Mon, 29 Jul 2024 18:26:47 +0200 Message-ID: <2024072945-CVE-2024-42088-b65a@gregkh> X-Mailer: git-send-email 2.45.2 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=2715; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9pPXn0tWV7AaoNBKPtwfK3rJpicQUqDTwaV8PSlGawk=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnLDx0NuN7w1VnvsNCGk4LvL9uoTpe4+aAqf4eb0rzFC tXWwdfDOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAil5YwLJidZnH/mtHGlyll PAGXpmo+XbE77QDDggllWnlrFproSG++qPqQt0bv8YzwLQA= 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: mediatek: mt8195: Add platform entry for ETDM1_OUT_BE dai link Commit e70b8dd26711 ("ASoC: mediatek: mt8195: Remove afe-dai component and rework codec link") removed the codec entry for the ETDM1_OUT_BE dai link entirely instead of replacing it with COMP_EMPTY(). This worked by accident as the remaining COMP_EMPTY() platform entry became the codec entry, and the platform entry became completely empty, effectively the same as COMP_DUMMY() since snd_soc_fill_dummy_dai() doesn't do anything for platform entries. This causes a KASAN out-of-bounds warning in mtk_soundcard_common_probe() in sound/soc/mediatek/common/mtk-soundcard-driver.c: for_each_card_prelinks(card, i, dai_link) { if (adsp_node && !strncmp(dai_link->name, "AFE_SOF", strlen("AFE_SOF"))) dai_link->platforms->of_node = adsp_node; else if (!dai_link->platforms->name && !dai_link->platforms->of_node) dai_link->platforms->of_node = platform_node; } where the code expects the platforms array to have space for at least one entry. Add an COMP_EMPTY() entry so that dai_link->platforms has space. The Linux kernel CVE team has assigned CVE-2024-42088 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit e70b8dd26711 and fixed in 6.9.8 with commit 42b9ab7a4d7e Issue introduced in 6.8 with commit e70b8dd26711 and fixed in 6.10 with commit 282a4482e198 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-2024-42088 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/mediatek/mt8195/mt8195-mt6359.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/42b9ab7a4d7e6c5efd71847541e4fcc213585aad https://git.kernel.org/stable/c/282a4482e198e03781c152c88aac8aa382ef9a55