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 C55DD34EEF7 for ; Sat, 4 Jul 2026 11:54:04 +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=1783166045; cv=none; b=Yf8c4yWhlYlKfjz26Rkv5ihzAP7THdF2lBno5434Io0LBhhJgE4CRI4JTad7Ge88Q9qITkCaxFBs2v98z9adW36Ch05FZTnzBIL10CGHEV4XWXKTiJMqaaF+ib1MVN/W1HuWPqBeu7UaBv4AlcTd7FOFrZlDcRjMj+oaNkrrNTs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783166045; c=relaxed/simple; bh=7kMJfQ/sTLcO0EOfCfs/frTJz99zGU7ShpOi2MY3jK8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DE+9faUfciEzKvUvP+ip1SbHwip724MBCfLddFc7rc2hhB8l9rPX7JUdyiGPYKumw7lsnFh+rHZVZoZMV9nTeSH7/78Tx/OUdXGzabDRkumxnc80dL6xi/pP8KCU8duSdAGK4EvsjG/PDi8p7IvUHWV3AfTqF78/UD1nvxFWVvI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qR/tj1ae; 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="qR/tj1ae" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 088261F000E9; Sat, 4 Jul 2026 11:54:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1783166044; bh=6RzJLgNOJ6JHGQPNy3bTVc3rZPaFp8KPHiokmwN+Dus=; h=From:To:Cc:Subject:Date:Reply-To; b=qR/tj1ae5T3wiWhut/T5uJs1r+KP59ZT4IDUQZx9sEgAitx1E/eS5lPkOLjPO45B/ ZY53+0n8RSdnhsBz2rJxlSyWbm1+Cdxo1+lXCfbgaOADSFjoKiUfemcHVJPpF5+ei7 7qUVQhTya0CxNF8kw/upt8kDe61wtRWbozP3kDbE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-53360: KVM: SEV: Require in-GHCB scratch area if GHCB v2+ is in use Date: Sat, 4 Jul 2026 13:54:14 +0200 Message-ID: <2026070413-CVE-2026-53360-3284@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=5237; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ZFt70BHyMJlYQ9LcWUjiGpcYsunQGuqzyhbsbmGDxYg=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkeX1IvPpDs2hq0JexZ4Z+5O3QeFRyekPtKdnZL9YeMv fK+JYxrOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiCUsZ5qlt3+esKd93/WOY d3v15VNPw9nqExnmJ5kfc7zJo6pcVb+b7ZWwjPqMZ8+vAAA= 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: Require in-GHCB scratch area if GHCB v2+ is in use As per the GHCB spec, when using GHCB v2+ require the software scratch area to reside in the GHCB's shared buffer. Note, things like Page State Change (PSC) requests _rely_ on this behavior, as the guest can't provide a length when making the request, i.e. the size of the guest payload is bounded by the size of the shared buffer. Failure to force usage of the GHCB, and a slew of other flaws, lets a malicious SNP guest corrupt host kernel heap memory, and leak host heap layout information. setup_vmgexit_scratch() allocates a buffer via kvzalloc(exit_info_2), where exit_info_2 is guest-controlled. With exit_info_2=24, this yields a 24-byte allocation in kmalloc-cg-32 (32-byte slab objects). The buffer holds an 8-byte psc_hdr followed by 8-byte psc_entry structs, so only entries[0] and entries[1] are in-bounds. snp_begin_psc() validates end_entry against VMGEXIT_PSC_MAX_COUNT (253) but NOT against the actual buffer size: idx_end = hdr->end_entry; if (idx_end >= VMGEXIT_PSC_MAX_COUNT) { // checks 253, not buffer snp_complete_psc(svm, ...); return 1; } for (idx = idx_start; idx <= idx_end; idx++) { entry_start = entries[idx]; // OOB when idx >= 2 The guest sets end_entry=10+, causing the host to iterate entries[2+] which are OOB into adjacent slab objects. For each OOB entry: - The host reads 8 bytes (OOB READ / info leak oracle) - If the data passes PSC validation, __snp_complete_one_psc() writes cur_page = 1 or 512 into the entry (OOB WRITE, sev.c:3806) - If validation fails, the error response reveals whether adjacent memory is zero vs non-zero (information disclosure to guest) The guest controls allocation size (exit_info_2), entry range (cur_entry/end_entry), and can fire unlimited VMGEXITs to repeatedly hit different slab positions. By exploiting the variety of bugs, a malicious SEV-SNP guest can: - OOB read adjacent kmalloc-cg-32 objects (heap layout disclosure) - OOB write cur_page bits into adjacent objects (heap corruption) - Trigger use-after-free conditions across VMGEXITs E.g. with KASAN enabled, a single insmod of the PoC guest module produces 73 KASAN reports: BUG: KASAN: slab-out-of-bounds in snp_begin_psc+0x126/0x890 Read of size 8 at addr ffff888219ffb5e0 by task qemu-system-x86/2199 BUG: KASAN: slab-out-of-bounds in snp_begin_psc+0x468/0x890 Write of size 8 at addr ffff888351566648 by task qemu-system-x86/2199 The buggy address belongs to the object at ffff888XXXXXXXXX which belongs to the cache kmalloc-cg-32 of size 32 The buggy address is located N bytes to the right of allocated 32-byte region [ffff888XXXXXXXXX, ffff888XXXXXXXXX) Breakdown: 62 slab-out-of-bounds (reads + writes past allocation) 7 slab-use-after-free 4 use-after-free All credit to Stan for the wonderful description and reproducer! [sean: write changelog] The Linux kernel CVE team has assigned CVE-2026-53360 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit 4af663c2f64a8d252e690c60cf8b8abf22dc2951 and fixed in 6.12.93 with commit bf9ba093fbb83c0c9a3dedd50efec29424eca2fc Issue introduced in 6.10 with commit 4af663c2f64a8d252e690c60cf8b8abf22dc2951 and fixed in 6.18.35 with commit c9b4198fbc6ed99a9da4bee9f74bb730f926c9ae Issue introduced in 6.10 with commit 4af663c2f64a8d252e690c60cf8b8abf22dc2951 and fixed in 7.0.12 with commit b328ede59ac34e7998e1eee5e5f0cc26c2a91846 Issue introduced in 6.10 with commit 4af663c2f64a8d252e690c60cf8b8abf22dc2951 and fixed in 7.1 with commit db3f2195d29344a3cf1e9dd9ab7f21ced7308cf7 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-53360 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/bf9ba093fbb83c0c9a3dedd50efec29424eca2fc https://git.kernel.org/stable/c/c9b4198fbc6ed99a9da4bee9f74bb730f926c9ae https://git.kernel.org/stable/c/b328ede59ac34e7998e1eee5e5f0cc26c2a91846 https://git.kernel.org/stable/c/db3f2195d29344a3cf1e9dd9ab7f21ced7308cf7