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 8FD1E28AAFC for ; Thu, 10 Jul 2025 07:44: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=1752133474; cv=none; b=QrPzh0BQUbbkbGKt9NuyMKhiZKpBDn9G2EVMzrbNDvAWVym87Qzt13CmKSVF05v56OUZPgqFhNHpaUCJdjR9qVXLwIUoLdk4DGAifq4gsu/KK9f5QdBM6gmWR6EUlnYlzV4LlEj7HXT2amBIRCleUrxk6Nxv28Xn8w5sWhaqcaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752133474; c=relaxed/simple; bh=YRZkkKiL0H6/IKjhl44Z0OnZV9R1fI8/NIsPKC4pZJ8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cqoRtw7bol6ejbZHbxz2H11U61CsAGtY0IxtU0F70Kkem3HeyCbQnmB4gPjbp7OqGBkXV53nmkoPIfVRyNTRPSoSnF70Skt5l9jitajgpQSWsJu7yN7DIPXllWHDKINEM9CjX2hiN6sxpXvjuVy8WidH87OF96YVz/zYtAWOkOs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AZggBTUk; 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="AZggBTUk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EBF0C4CEE3; Thu, 10 Jul 2025 07:44:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752133474; bh=YRZkkKiL0H6/IKjhl44Z0OnZV9R1fI8/NIsPKC4pZJ8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=AZggBTUkRgU0sP2FXhAEVT3WPcDw97eXH5H9P0nM4SvsiM+iHK/D6DxukSbPDgaMV NBtxOwV8XEPhpg/gGCReY+4ctjEGY4paBdaIsMCT9grqNji2+4FBpav3K+pPEZJZbX ynyJmUBhTBr7tbEXnODqPWsgYQSsJr+4yMxcvb5w= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38314: virtio-pci: Fix result size returned for the admin command completion Date: Thu, 10 Jul 2025 09:42:55 +0200 Message-ID: <2025071015-CVE-2025-38314-5977@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=2596; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=xph7+ALojLG3PNG83eVgHfHoTmZ7daDyvvZmko+XteI=; b=owGbwMvMwCRo6H6F97bub03G02pJDBn5edeFFKd57q+7ur3t9OzZPDbnlEMZpfXebetOOhA27 1TI4WmCHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRVdoM82Pt48782Oxvtutq yZyqM3dmTRPYzcKwoIF56XvzOWKnZaTD3/Ad3caUcixYBQA= 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: virtio-pci: Fix result size returned for the admin command completion The result size returned by virtio_pci_admin_dev_parts_get() is 8 bytes larger than the actual result data size. This occurs because the result_sg_size field of the command is filled with the result length from virtqueue_get_buf(), which includes both the data size and an additional 8 bytes of status. This oversized result size causes two issues: 1. The state transferred to the destination includes 8 bytes of extra data at the end. 2. The allocated buffer in the kernel may be smaller than the returned size, leading to failures when reading beyond the allocated size. The commit fixes this by subtracting the status size from the result of virtqueue_get_buf(). This fix has been tested through live migrations with virtio-net, virtio-net-transitional, and virtio-blk devices. The Linux kernel CVE team has assigned CVE-2025-38314 to this issue. Affected and fixed versions =========================== Issue introduced in 6.13 with commit 704806ca400e5daa86c110f14bfdda9d28203bb7 and fixed in 6.15.3 with commit 920b6720bb63893b81516c0c45884a8350f9e4bf Issue introduced in 6.13 with commit 704806ca400e5daa86c110f14bfdda9d28203bb7 and fixed in 6.16-rc1 with commit 9ef41ebf787fcbde99ac404ae473f8467641f983 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-38314 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/virtio/virtio_pci_modern.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/920b6720bb63893b81516c0c45884a8350f9e4bf https://git.kernel.org/stable/c/9ef41ebf787fcbde99ac404ae473f8467641f983