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 152B32594BE for ; Fri, 22 Aug 2025 16:04:04 +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=1755878645; cv=none; b=q9/5bTF254GKeE4hItBVi0kbdSboakKUmqpR07s9lXBKiwAPedQADYksN7hCjLo14ti0vJXJhQeKVsTn3g0U2gJRlFxBaetoQU9Iwc4JVzbC+3ewpFona169DtCFS2uIiKAAleg+wFtDgSTaGoyZvqEpVQjjWwmolB9oKXscC4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755878645; c=relaxed/simple; bh=GVezTnYb7k02VeTbqhYstTRqassaJsUbmtqZ33k9gA8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=O3beDfoJeMFaSyLXL0tAeBGGC67znLykowDYsmHvhHNMrWjdQC7TelRBxQRgmIo1i3QiC1vLbSxW5/G3c+zY9u64gcPj6obOVBKTEOX80gNy/52+bdUmdwRxMBh3WEA0Y7Uqxe/EzrnMgEmAFFCl/FWCL5yR/EKZopK4TY/QkBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dCo0oIao; 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="dCo0oIao" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 105AFC4CEED; Fri, 22 Aug 2025 16:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1755878644; bh=GVezTnYb7k02VeTbqhYstTRqassaJsUbmtqZ33k9gA8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=dCo0oIaoJs697pk62hGJ52wZqdOwltD+95QL4jypuNpDw/DjyOWR3wSu9DelEfGLa 9ZC9ch3Iq3CJ+LdDo0DsW2zn5XOLoFBcjFb1IHTDm3cNZ3vm50OjRaRVojQ0AMVl9/ MpLDYtWn84WMYHRQCzOvhxxlqK4jthPFZjkF/EqI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38662: ASoC: mediatek: mt8365-dai-i2s: pass correct size to mt8365_dai_set_priv Date: Fri, 22 Aug 2025 18:02:59 +0200 Message-ID: <2025082259-CVE-2025-38662-a8c5@gregkh> X-Mailer: git-send-email 2.50.1 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=3459; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dkcVxaMThfaTwqtx3GL4Q2AL6lsfU7dncMkyyOXwCVk=; b=kA0DAAIRMUfUDdst+ykByyZiAGiolLOhRioqDkTOvdNqCpdZwHcfViaDR6xjS1L6H4woigm18 ohdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmiolLMACgkQMUfUDdst+ynj4wCfctK9 yvhTyAJoBOuAPYbMN8jvZ5sAn0dj8Y55zM1f/mEdWJSlhlGxbuuy X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: ASoC: mediatek: mt8365-dai-i2s: pass correct size to mt8365_dai_set_priv Given mt8365_dai_set_priv allocate priv_size space to copy priv_data which means we should pass mt8365_i2s_priv[i] or "struct mtk_afe_i2s_priv" instead of afe_priv which has the size of "struct mt8365_afe_private". Otherwise the KASAN complains about. [ 59.389765] BUG: KASAN: global-out-of-bounds in mt8365_dai_set_priv+0xc8/0x168 [snd_soc_mt8365_pcm] ... [ 59.394789] Call trace: [ 59.395167] dump_backtrace+0xa0/0x128 [ 59.395733] show_stack+0x20/0x38 [ 59.396238] dump_stack_lvl+0xe8/0x148 [ 59.396806] print_report+0x37c/0x5e0 [ 59.397358] kasan_report+0xac/0xf8 [ 59.397885] kasan_check_range+0xe8/0x190 [ 59.398485] asan_memcpy+0x3c/0x98 [ 59.399022] mt8365_dai_set_priv+0xc8/0x168 [snd_soc_mt8365_pcm] [ 59.399928] mt8365_dai_i2s_register+0x1e8/0x2b0 [snd_soc_mt8365_pcm] [ 59.400893] mt8365_afe_pcm_dev_probe+0x4d0/0xdf0 [snd_soc_mt8365_pcm] [ 59.401873] platform_probe+0xcc/0x228 [ 59.402442] really_probe+0x340/0x9e8 [ 59.402992] driver_probe_device+0x16c/0x3f8 [ 59.403638] driver_probe_device+0x64/0x1d8 [ 59.404256] driver_attach+0x1dc/0x4c8 [ 59.404840] bus_for_each_dev+0x100/0x190 [ 59.405442] driver_attach+0x44/0x68 [ 59.405980] bus_add_driver+0x23c/0x500 [ 59.406550] driver_register+0xf8/0x3d0 [ 59.407122] platform_driver_register+0x68/0x98 [ 59.407810] mt8365_afe_pcm_driver_init+0x2c/0xff8 [snd_soc_mt8365_pcm] The Linux kernel CVE team has assigned CVE-2025-38662 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 402bbb13a195caa83b3279ebecdabfb11ddee084 and fixed in 6.12.41 with commit 1dc0ed16cfbc3c28a07a89904071cfa802fdcee1 Issue introduced in 6.12 with commit 402bbb13a195caa83b3279ebecdabfb11ddee084 and fixed in 6.15.9 with commit 6e621dd99c57db916842865debaa65f20bbd6d8e Issue introduced in 6.12 with commit 402bbb13a195caa83b3279ebecdabfb11ddee084 and fixed in 6.16 with commit 6bea85979d05470e6416a2bb504a9bcd9178304c 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-38662 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/mt8365/mt8365-dai-i2s.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/1dc0ed16cfbc3c28a07a89904071cfa802fdcee1 https://git.kernel.org/stable/c/6e621dd99c57db916842865debaa65f20bbd6d8e https://git.kernel.org/stable/c/6bea85979d05470e6416a2bb504a9bcd9178304c