Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D3957392C56 for ; Sun, 19 Jul 2026 15:00:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784473227; cv=none; b=WhF4DbVrbfsyBsDW+Vn7IVPJZ5b0FHc1ulhDu5uTl6zSQCUe85EuXwH8lsHGhIAu5ysMed4ONbxrYizqIyQHpuUsyUtEW4fBPNfRyUeFYkQDI7GTZ0PuKBBCe5hA8NSrJlhCVCTNbHLQcQpcfmlxzmFyYCUo6k2rNd6hR2QrRyw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784473227; c=relaxed/simple; bh=SQQ17m5y/RLdXcBqMLOaSUV7/fPYKmS3i2+69qDBk1g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QRRvUlleH7eagBzDMojmMnPmY1SN7eclx0eQgjqCKcizT9JpxXDBuTivdFLLnJn6CooXPWJ4DVbPlsdT0WKwHyEO82gi3SHN6Xhdiq4UOsncMhSCEIl35Y7JPZcRRUr14ZTDEpTxfakX2SKeKuNHkkxm6upfEFEiv1OYAqYxVyE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wpGLs/xf; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wpGLs/xf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C1C71F000E9; Sun, 19 Jul 2026 15:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784473225; bh=0IkZMKbcH3t9S7CJDbAZAkTvxXamakvLbHg4RIt1ul4=; h=From:To:Cc:Subject:Date:Reply-To; b=wpGLs/xfBp8QsT8WRc1TihlZA6EcPneqg2Jwrvsf0AmHI8O08DyKq8XBFxE4yOk/C v5pSafL0x9Hub/0yoMR5Ttj1lqfNF+FH0NA7EAn1Glj2BmJSNS3hLJN4jefSbBnVL8 4ZyXuepoazzBtnFFS8WKmtF0ZeX3Hv26+bdh3+Ew= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63939: KVM: SEV: Compute the correct max length of the in-GHCB scratch area Date: Sun, 19 Jul 2026 16:56:39 +0200 Message-ID: <2026071952-CVE-2026-63939-8061@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2930; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=36ld5cBVoNuLL6Z5Jca77CYhfnDJdBZU0hmGB/qLwQA=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkxTytOBz+XXmLkcyz9yy/nq2ufX85h1D5Zf6UztUJ21 RShT0HxHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR9+IMczhqP+icPHOnbQH3 mXcbi3ivW3+y2sWwYPn9b/9/pimYprPIL885a1ftNWWXGgA= 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: KVM: SEV: Compute the correct max length of the in-GHCB scratch area When setting the length of the GHCB scratch area, and the area is in the GHCB shared buffer, set the effective length of the scratch area to the max possible size given the start of the guest-provided pointer, and the end of the shared buffer. The code was "fine" when first introduced, as KVM doesn't consult the length of the buffer when emulating MMIO, because the passed in @len always specifies the *max* size required. But for PSC requests, the incoming @len is just the minimum length (to process the header), and KVM needs to know the full size of the scratch area to avoid buffer overflows (spoiler alert). Opportunistically rename @len => @min_len to better reflect its role. The Linux kernel CVE team has assigned CVE-2026-63939 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 9b54e248d2644be71cb394eb85f31ad99e023a05 and fixed in 6.12.93 with commit 6ca9400d36005ffdca25f80186bea781c7e1dc4c Issue introduced in 6.11 with commit 9b54e248d2644be71cb394eb85f31ad99e023a05 and fixed in 6.18.35 with commit 9f0a9e780f02c02d025a190f1885e1d1d73b87bd Issue introduced in 6.11 with commit 9b54e248d2644be71cb394eb85f31ad99e023a05 and fixed in 7.0.12 with commit 6644565527c4c5f507088b1c9ddf72de47790b68 Issue introduced in 6.11 with commit 9b54e248d2644be71cb394eb85f31ad99e023a05 and fixed in 7.1 with commit 5867d7e202e09f037cefe77f7af4413c7c0fa088 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-2026-63939 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: arch/x86/kvm/svm/sev.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/6ca9400d36005ffdca25f80186bea781c7e1dc4c https://git.kernel.org/stable/c/9f0a9e780f02c02d025a190f1885e1d1d73b87bd https://git.kernel.org/stable/c/6644565527c4c5f507088b1c9ddf72de47790b68 https://git.kernel.org/stable/c/5867d7e202e09f037cefe77f7af4413c7c0fa088