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 62A181DDCE for ; Sun, 19 May 2024 10:12:12 +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=1716113532; cv=none; b=WYb0PkJkaoXIPZXxjjyUGsEGxj+/mlav3TeBtzdslhvXzXeA869P6t5d9AqYLx6XPPjiJe3Ov443Hj9DnFojyK+oPZEhyj9NX1IdkuIEyvyVTb/WR02nF08MeeIjoCJrBP3muloa7nECTufvs4B0f6MoVGhTPeyz2y+nGMgXKPs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716113532; c=relaxed/simple; bh=/hJzIdTjnioxKbol6Uh1+5+j/MI+qKd3zT0LOIjfZgA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qbvxp4lEp4/GT1OTS4wvSQUOY60MNOF8BlBtpOSkVK3mgPXXplVfaKSOkGz9c1tafiieQdBxRNivxYF9VL0NTLrQqS9gzbTWKM//6khSQpaG49/f71iEfW9zT2Qd2WMWncRYXIKZXOe4R3R3yp8BWS30z0DV3FJAcG+RDpC+0Fw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QWDrj8QC; 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="QWDrj8QC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97D06C32781; Sun, 19 May 2024 10:12:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716113532; bh=/hJzIdTjnioxKbol6Uh1+5+j/MI+qKd3zT0LOIjfZgA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QWDrj8QC4DV+D+ak5pTNyr6BElw//zsky/UDXlGKRqY7apFNzk17vSbFrAx8+4QOJ uCbtildh5NNb8JrObpQXig1cL0dLmy401EI8/1uBIdK7uFAoaGhfpr7v9jvkg+V61+ qto28e8chGRRBLnxz2dNE6tipyVRezzIuDDgNoOA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35939: dma-direct: Leak pages on dma_set_decrypted() failure Date: Sun, 19 May 2024 12:11:33 +0200 Message-ID: <2024051919-CVE-2024-35939-f877@gregkh> X-Mailer: git-send-email 2.45.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=2279; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/hJzIdTjnioxKbol6Uh1+5+j/MI+qKd3zT0LOIjfZgA=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmeF9w15hx+/OGPRl7CmyOr26K3LDt41LbF9EKU5Pmb7 i/5YjxDOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiMSUM80xFdu9KDZZombWO ZUvmql+unA+vvmNYcDQgurrxzLR/K9sP/a1zYTU59vV5BwA= 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: dma-direct: Leak pages on dma_set_decrypted() failure On TDX it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory to the page allocator, which could lead to functional or security issues. DMA could free decrypted/shared pages if dma_set_decrypted() fails. This should be a rare case. Just leak the pages in this case instead of freeing them. The Linux kernel CVE team has assigned CVE-2024-35939 to this issue. Affected and fixed versions =========================== Fixed in 6.1.86 with commit 4e0cfb25d49d Fixed in 6.6.27 with commit 4031b72ca747 Fixed in 6.8.6 with commit b57326c96b7b Fixed in 6.9 with commit b9fa16949d18 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-35939 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: kernel/dma/direct.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/4e0cfb25d49da2e6261ad582f58ffa5b5dd8c8e9 https://git.kernel.org/stable/c/4031b72ca747a1e6e9ae4fa729e765b43363d66a https://git.kernel.org/stable/c/b57326c96b7bc7638aa8c44e12afa2defe0c934c https://git.kernel.org/stable/c/b9fa16949d18e06bdf728a560f5c8af56d2bdcaf