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 4B1361E86E for ; Fri, 25 Jul 2025 14:17:00 +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=1753453021; cv=none; b=dGsfQamDo+R4JDC66KIp1H/XUm7CkkTZkL3cLcickOlqyzZOyYo6FeSY5TLSu1W4jt7+CeVXG3q2Pr8FZX/F630i3Yc6Lw/DOPDXiPmSklVxA/74DrGXXezPnybzdDvwkYJaDlV4cnPY3khdoC2mz9tY67USo6DkCVAUF/Swb08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753453021; c=relaxed/simple; bh=dsSEygVL39SFb4RDrMvjtZe0C7OkodktxJCTEPPrJYw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VdhfXbS4V3hyY9Zwq4GEgZpn5trru9Ya/qWCtg/CUiYYmQtEtg5Rla3cuFTgy1K5lwZqsIDG/js6PXi+hPgZg5g+ij+QbJpR6B21U2VjPrzzPFIiS/W31ZoD/nr4GeJ+smcU6JEnyHg639CfeuZZchoUVB7BdZoHqz8cXfp8mew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Wx0w4LBS; 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="Wx0w4LBS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16908C4CEEB; Fri, 25 Jul 2025 14:16:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753453020; bh=dsSEygVL39SFb4RDrMvjtZe0C7OkodktxJCTEPPrJYw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Wx0w4LBS2mdfpLrhvfeXs7x5PNSlGb3HypdUmUxYbgGXneRqraCH+McJmh8bzCQc0 /0D/BKJ7tzcj2qJ3MxGggUa/7nw9wE+55j0qW7JCXhiqWuCLl7fgrU3X0df9tmvORN 3HZORMDyDodtjkOp6b8uuCKxqpmIwzZRleiOYsBo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38421: platform/x86/amd: pmf: Use device managed allocations Date: Fri, 25 Jul 2025 16:16:54 +0200 Message-ID: <2025072554-CVE-2025-38421-8601@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=2314; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WkzZzppSiVC6yIMRfWwwUpa4Rue67SgOJDAD50qldXQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNE6/l1WS+kDj57vpns5IN6UZf0xbGnZJ7KnRtg9CK8 KhtcvpzOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiS+sYFjTmrpro2/cztOLe jLjY4F239k4xkmWYp1aza6P4zYubag9FMH/oUHRPU5b2BwA= 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: platform/x86/amd: pmf: Use device managed allocations If setting up smart PC fails for any reason then this can lead to a double free when unloading amd-pmf. This is because dev->buf was freed but never set to NULL and is again freed in amd_pmf_remove(). To avoid subtle allocation bugs in failures leading to a double free change all allocations into device managed allocations. The Linux kernel CVE team has assigned CVE-2025-38421 to this issue. Affected and fixed versions =========================== Issue introduced in 6.14 with commit 5b1122fc4995f308b21d7cfc64ef9880ac834d20 and fixed in 6.15.4 with commit 0d10b532f861253c283863522d59d099fcb0796d Issue introduced in 6.14 with commit 5b1122fc4995f308b21d7cfc64ef9880ac834d20 and fixed in 6.16-rc3 with commit d9db3a941270d92bbd1a6a6b54a10324484f2f2d Issue introduced in 6.12.23 with commit e70b4b8f93d7fcf8ee063a1d1f18782c4da3d335 Issue introduced in 6.13.11 with commit 3ed60e51ffdbfef14169bd967e21a6ba5e5ff42b 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-38421 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: drivers/platform/x86/amd/pmf/core.c drivers/platform/x86/amd/pmf/tee-if.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/0d10b532f861253c283863522d59d099fcb0796d https://git.kernel.org/stable/c/d9db3a941270d92bbd1a6a6b54a10324484f2f2d