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 4AC2337BE7F for ; Sun, 19 Jul 2026 12:02:43 +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=1784462564; cv=none; b=aw97oTfi7GCALvDE/ZYx66/TzpWH3ackKsNb4SA1+x85v81Fbuji6JmG6NjCqdW/AKXLBYhTxbeRVKvKrLeAL+Ee7AfqzXqgs/F/89OIbrdUfAEvXRv8dGGygDt1rtO95GtfnDkU4uywdCtn/vHymx1t2WvgRBkcPJQVOWiUkjk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784462564; c=relaxed/simple; bh=M9jb4KER8ZN1GE/OtpRLfjTTRe/VQsO//3tXOk8fyiU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZW/ZdRKQwobc88Lb57cpCeZocmiG2Y8z4EJPk36dqkT2AzXVg+KORySn0uw3hxlhyHEh/YgjWrj9kXxmNAC+FOqTSsAlkCMd/sSgOUx0sPwD2+Tc3ruTyzALJgKzoWoJ/oiVR8YPYhwU3rRwE7OFQcpigMp+DxnES5U2VGptdrI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qM1mPtAQ; 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="qM1mPtAQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 753101F000E9; Sun, 19 Jul 2026 12:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784462563; bh=WnQc6gpRUNEPDB1y2eEOO38hYOaB6wmWxhxy0r+3Xww=; h=From:To:Cc:Subject:Date:Reply-To; b=qM1mPtAQdF0Twz4KGl0AmvXSg4eGQeUAcgx1dpfsljGEVSuBQLbrOoTkv2YfUA2sN oRNsOQuqLQhuGXpMmui50t4l27VL3n4f0m8ROJLvrqc62T5txZV/lJAovWI3A5zLDW 2gu7sgx9gOE7Po8QZ4e9WD6MnfL0G4eqrqZaFw/s= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63794: KVM: SVM: Fix page overflow in sev_dbg_crypt() for ENCRYPT path Date: Sun, 19 Jul 2026 14:02:11 +0200 Message-ID: <2026071959-CVE-2026-63794-b463@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=5998; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=FxHBgxgEMmSeWrgSknPD5p+x1Gdo+KiRs58IQu60jYY=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkxe7a/q2v6vftpDePDhBU/OT/uWy5fzxx2cW/ZM0/nN 6/4jbe5d8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBE1PcwzC/d/aonR+TfsgVn dje5Xg+1YekzlWGYZ3Yos/G0z2HtWXKb/m5c+/ehs0nGVAA= 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: SVM: Fix page overflow in sev_dbg_crypt() for ENCRYPT path In sev_dbg_crypt(), the per-iteration transfer length is bounded by the source page offset (PAGE_SIZE - s_off) but not by the destination page offset (PAGE_SIZE - d_off). When d_off > s_off, the encrypt path (__sev_dbg_encrypt_user) performs a read-modify-write using a single-page intermediate buffer (dst_tpage): 1. __sev_dbg_decrypt() expands the size to round_up(len + (d_off & 15), 16) before issuing the PSP command. If len + (d_off & 15) > PAGE_SIZE, the PSP writes beyond the end of the 4096-byte dst_tpage allocation. 2. The subsequent memcpy()/copy_from_user() into page_address(dst_tpage) + (d_off & 15) of 'len' bytes overflows by up to 15 bytes under the same condition. Trigger example: s_off = 0, d_off = 1, debug.len = PAGE_SIZE - the PSP is instructed to write round_up(4097, 16) = 4112 bytes to a 4096-byte buffer. Fix by also bounding len by (PAGE_SIZE - d_off), the same check that sev_send_update_data() already performs for its single-page guest region. ================================================================== BUG: KASAN: slab-use-after-free in sev_dbg_crypt+0x993/0xd10 [kvm_amd] Write of size 4095 at addr ff110062293bb009 by task sev_dbg_test/228214 CPU: 96 UID: 0 PID: 228214 Comm: sev_dbg_test Tainted: G U W 7.0.0-smp--5ce9b0c48211-dbg #156 PREEMPTLAZY Tainted: [U]=USER, [W]=WARN Hardware name: Google Astoria/astoria, BIOS 0.20250817.1-0 08/25/2025 Call Trace: dump_stack_lvl+0x54/0x70 print_report+0xbc/0x260 kasan_report+0xa2/0xd0 kasan_check_range+0x25f/0x2c0 __asan_memcpy+0x40/0x70 sev_dbg_crypt+0x993/0xd10 [kvm_amd] sev_mem_enc_ioctl+0x33c/0x450 [kvm_amd] kvm_vm_ioctl+0x65d/0x6d0 [kvm] __se_sys_ioctl+0xb2/0x100 do_syscall_64+0xe8/0x870 entry_SYSCALL_64_after_hwframe+0x4b/0x53 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x7fe72b6a0 pfn:0x62293bb memcg:ff11000112827d82 flags: 0x1400000000000000(node=1|zone=1) raw: 1400000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 00000007fe72b6a0 0000000000000000 00000001ffffffff ff11000112827d82 page dumped because: kasan: bad access detected Memory state around the buggy address: ff110062293bbf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff110062293bbf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ff110062293bc000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ff110062293bc080: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ff110062293bc100: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== Disabling lock debugging due to kernel taint [sean: add sample KASAN splat, Fixes, and stable@] The Linux kernel CVE team has assigned CVE-2026-63794 to this issue. Affected and fixed versions =========================== Issue introduced in 4.16 with commit 24f41fb23a39bc2b6f190dcef35a5813a4bf183a and fixed in 5.10.260 with commit f701ae476cb92a3a3d8844bb39bb63b4512684c8 Issue introduced in 4.16 with commit 24f41fb23a39bc2b6f190dcef35a5813a4bf183a and fixed in 5.15.211 with commit 64f2449841ffc7d203183aa4c748c9c77951ecc5 Issue introduced in 4.16 with commit 24f41fb23a39bc2b6f190dcef35a5813a4bf183a and fixed in 6.1.177 with commit 9349b50f4b11f135fe73b56cb2c2c872d8bc71d7 Issue introduced in 4.16 with commit 24f41fb23a39bc2b6f190dcef35a5813a4bf183a and fixed in 6.6.144 with commit 889c2a9c59897ca912bf39df5bb92555a0a13df4 Issue introduced in 4.16 with commit 24f41fb23a39bc2b6f190dcef35a5813a4bf183a and fixed in 6.12.95 with commit e1a0fe288dee07b7da25a71e007c1ecd1080315b Issue introduced in 4.16 with commit 24f41fb23a39bc2b6f190dcef35a5813a4bf183a and fixed in 6.18.38 with commit 720949ed666f34ff28ffdfe1471a5861d1e41fdf Issue introduced in 4.16 with commit 24f41fb23a39bc2b6f190dcef35a5813a4bf183a and fixed in 7.1.3 with commit 2753a097d1fe24c4351c608048612c74108aa89f Issue introduced in 4.16 with commit 24f41fb23a39bc2b6f190dcef35a5813a4bf183a and fixed in 7.2-rc1 with commit 78ee2d50185a037b3d2452a97f3dad69c3f7f389 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-63794 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/f701ae476cb92a3a3d8844bb39bb63b4512684c8 https://git.kernel.org/stable/c/64f2449841ffc7d203183aa4c748c9c77951ecc5 https://git.kernel.org/stable/c/9349b50f4b11f135fe73b56cb2c2c872d8bc71d7 https://git.kernel.org/stable/c/889c2a9c59897ca912bf39df5bb92555a0a13df4 https://git.kernel.org/stable/c/e1a0fe288dee07b7da25a71e007c1ecd1080315b https://git.kernel.org/stable/c/720949ed666f34ff28ffdfe1471a5861d1e41fdf https://git.kernel.org/stable/c/2753a097d1fe24c4351c608048612c74108aa89f https://git.kernel.org/stable/c/78ee2d50185a037b3d2452a97f3dad69c3f7f389