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 3880128DF07 for ; Thu, 3 Jul 2025 08:38:22 +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=1751531902; cv=none; b=FoRF7ZS06A8KedDBN0vrnN116a+6nUne35hzmpM18J8it75hoBXARhAxJkHYkL3HsZ2Ukjc2T1cG20+9DopBwBIuialTpATI88qpfFS15COFtb/KZZNluTM9gNY2Zi+QrLHZlBSjkO7k0LXFZOIcGH5EgErWfY3rWaoge2bAK88= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751531902; c=relaxed/simple; bh=eYvr8aA3IFu3JsokE8sUAQyPEl6xzk9rpPmln/ehSL0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HfAx1gsr0CgPLZk0k+Z7e4+C+rM6qY/DvxtkZ0q4PZNoqmskTYZj03ujIsGHtCJFi+dtlC2KipOLOWwUssPgbPeYrrxQIbot5it4+puE6VYfUeieJ28w6Zx15e+KXUi0xdTU+u0trvKC5E/7ObaoNy5lnNyuQF6/XCojCbY+Kh4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eHDPFVB1; 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="eHDPFVB1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC1F9C4CEE3; Thu, 3 Jul 2025 08:38:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751531902; bh=eYvr8aA3IFu3JsokE8sUAQyPEl6xzk9rpPmln/ehSL0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=eHDPFVB1+11DdaUzZvyCanSZIUUdHBXqv8XqLpMtOQ/H4ZruT/PY6rrNHFjEPrB56 jNokb5nce01CVnpDLwiBXpgrfVSjZyfDeJA9ugpOmlcXn3imLv027PhzmHN3gWUM79 lJpkOGACPEwo3M9wblQ1YQRvjwmbUE/06M6PFvHE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38158: hisi_acc_vfio_pci: fix XQE dma address error Date: Thu, 3 Jul 2025 10:36:14 +0200 Message-ID: <2025070338-CVE-2025-38158-d5f0@gregkh> X-Mailer: git-send-email 2.50.0 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=3158; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8WdMcTV7l1O/rGvNHiVx7dkxy0iPO0019FpiJggbH7E=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlpDrfqv59WXx9815nb8cPvrpw6ASaxA/Gr3vosEP3cU sIvt+5lRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykv5phwZ4l3qsv1Bfdujat QO/KSkvughrxZQwLdvau2Sb8Jym/w3jb8UmBB7+/UxY2AAA= 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: hisi_acc_vfio_pci: fix XQE dma address error The dma addresses of EQE and AEQE are wrong after migration and results in guest kernel-mode encryption services failure. Comparing the definition of hardware registers, we found that there was an error when the data read from the register was combined into an address. Therefore, the address combination sequence needs to be corrected. Even after fixing the above problem, we still have an issue where the Guest from an old kernel can get migrated to new kernel and may result in wrong data. In order to ensure that the address is correct after migration, if an old magic number is detected, the dma address needs to be updated. The Linux kernel CVE team has assigned CVE-2025-38158 to this issue. Affected and fixed versions =========================== Issue introduced in 5.18 with commit b0eed085903e7758532696d64397901a75bba8ba and fixed in 6.1.142 with commit 809a9c10274e1bcf6d05f1c0341459a425a4f05f Issue introduced in 5.18 with commit b0eed085903e7758532696d64397901a75bba8ba and fixed in 6.6.94 with commit f0423873e7aeb69cb68f4e8fa3827832e7b037ba Issue introduced in 5.18 with commit b0eed085903e7758532696d64397901a75bba8ba and fixed in 6.12.34 with commit 884a76e813178778d271fea59783763d32bb7e72 Issue introduced in 5.18 with commit b0eed085903e7758532696d64397901a75bba8ba and fixed in 6.15.3 with commit 7710c883eb8cb5cf510ca47ec0e26c6cb7e94a4f Issue introduced in 5.18 with commit b0eed085903e7758532696d64397901a75bba8ba and fixed in 6.16-rc1 with commit 8bb7170c5a055ea17c6857c256ee73c10ff872eb 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-38158 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/vfio/pci/hisilicon/hisi_acc_vfio_pci.c drivers/vfio/pci/hisilicon/hisi_acc_vfio_pci.h 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/809a9c10274e1bcf6d05f1c0341459a425a4f05f https://git.kernel.org/stable/c/f0423873e7aeb69cb68f4e8fa3827832e7b037ba https://git.kernel.org/stable/c/884a76e813178778d271fea59783763d32bb7e72 https://git.kernel.org/stable/c/7710c883eb8cb5cf510ca47ec0e26c6cb7e94a4f https://git.kernel.org/stable/c/8bb7170c5a055ea17c6857c256ee73c10ff872eb