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 069EC1D5165 for ; Fri, 25 Jul 2025 15:28:34 +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=1753457315; cv=none; b=c8nduAg+8V7c9WhsF0AJHwbARo7v8Si9NFxim1qcSiDvBHPoK6Xp4HGMua1kE9RzFHdGNRTrEITzv9vDk78LrvLW2AOdPKMzkxz07vtRl4kAsNEPa5HQLr66mVtRZgBgKF4YPJwsJwCZdpl0g79CUvReiC2G4Osy/PvNBRCHGcE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753457315; c=relaxed/simple; bh=K6DkvyR8HMkUWmS5yUyPUd0iAeJJB37QK3BXKOJP14c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PmJ9npi7agB0cjB6IkwueEC2egw6h9+RnFaWVxd0JDH7+TCD8AMFw6ZrkNmVhX5bHTyHwqbCJkD21ByMBIsDB5btIjPNy4yzs3cwuHJLJECvg0uxBajq1L5Tz4M0gIAAJFiPtxh5DGKjzFsAW2NAUpKkQfFbxriMVbNG8LiC0qI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=U9XIYs3m; 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="U9XIYs3m" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31C90C4CEE7; Fri, 25 Jul 2025 15:28:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753457314; bh=K6DkvyR8HMkUWmS5yUyPUd0iAeJJB37QK3BXKOJP14c=; h=From:To:Cc:Subject:Date:Reply-to:From; b=U9XIYs3mco+nTWELxx8ozl6sMrDWkFlbzR0cmfKUgWkikpC7ro3Cv0k4VSu0kHgHg 5dGojvb3LJo8l1DtRWqnHK/VjAP4UsDpoauGr57whagsy+UXOiykOHYPxQpe+x0iun b2PvNf09/0ui08pmK1h+PNqFp2h6xcC7U02BSCUw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38438: ASoC: SOF: Intel: hda: Use devm_kstrdup() to avoid memleak. Date: Fri, 25 Jul 2025 17:28:00 +0200 Message-ID: <2025072501-CVE-2025-38438-f653@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=2549; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=l4wqvor9VM1sqcHf/WuDOUKxGec3GYXQ8YwucCLH+fM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNixodF6rt5XsWw3HbapXLyl+Bs4N3TLaNmLrAe2P38 xPp1w3OdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE7q9kmM125/nihX9/vY8X 8Dv4rtLmQsuXsAaGBbvePnz8aOuj05vC939oWnF9bc0hpokA 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: SOF: Intel: hda: Use devm_kstrdup() to avoid memleak. sof_pdata->tplg_filename can have address allocated by kstrdup() and can be overwritten. Memory leak was detected with kmemleak: unreferenced object 0xffff88812391ff60 (size 16): comm "kworker/4:1", pid 161, jiffies 4294802931 hex dump (first 16 bytes): 73 6f 66 2d 68 64 61 2d 67 65 6e 65 72 69 63 00 sof-hda-generic. backtrace (crc 4bf1675c): __kmalloc_node_track_caller_noprof+0x49c/0x6b0 kstrdup+0x46/0xc0 hda_machine_select.cold+0x1de/0x12cf [snd_sof_intel_hda_generic] sof_init_environment+0x16f/0xb50 [snd_sof] sof_probe_continue+0x45/0x7c0 [snd_sof] sof_probe_work+0x1e/0x40 [snd_sof] process_one_work+0x894/0x14b0 worker_thread+0x5e5/0xfb0 kthread+0x39d/0x760 ret_from_fork+0x31/0x70 ret_from_fork_asm+0x1a/0x30 The Linux kernel CVE team has assigned CVE-2025-38438 to this issue. Affected and fixed versions =========================== Fixed in 6.12.39 with commit 68397fda2caa90e99a7c0bcb2cf604e42ef3b91f Fixed in 6.15.7 with commit 58ecf51af12cb32b890858b52b2c34e80590c74a Fixed in 6.16-rc4 with commit 6c038b58a2dc5a008c7e7a1297f5aaa4deaaaa7e 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-38438 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/intel/hda.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/68397fda2caa90e99a7c0bcb2cf604e42ef3b91f https://git.kernel.org/stable/c/58ecf51af12cb32b890858b52b2c34e80590c74a https://git.kernel.org/stable/c/6c038b58a2dc5a008c7e7a1297f5aaa4deaaaa7e