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 CADA5392812 for ; Sun, 19 Jul 2026 12:04:44 +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=1784462686; cv=none; b=nZH762JHd+EtXxH1uypsvLvnOC6jqen17V11cbpTpSLsDs/aLuHfZlOblmZpATSuYIt/gWwZni210xfcNTYHMXvOCdQDxy5H/Wm8vGq6cMyd+JZiu/4KaVB5JxM5Tu6JoDHoZzpjwkGrBOmLT2YqK4KKbFHdC41G1JRFTW8M3h8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784462686; c=relaxed/simple; bh=Xsfk4eh4LbopmSm2LffymU8l0nAlUYNVd76cd+fGj3k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QU3jgXTjZAbdOa7hIm2Y1aNET29QyTfiMkch3w/b9e152ior+57dgtIyWS5oOdM9vjld9z3CeTU13Xlm9eluAjhGa9lsL+Goh8kMsuzCK3k7ZXFPF6bjxI0c0xAO0tb2kEeWO18gER46dkeSrpPX3lgu4s0Aay7syYYWWhaPgmA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HY1jFkfN; 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="HY1jFkfN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35FF01F000E9; Sun, 19 Jul 2026 12:04:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784462684; bh=nQu1CIGFjDHtyhcFn0m7mevCOpvIhngCrP88QhnppW4=; h=From:To:Cc:Subject:Date:Reply-To; b=HY1jFkfN20rFNtU7AdnRXjOmT1zpcl/qsvyf88kN598ukFEdUB/OBnSCfiPrV3ioJ VaZo4tAU/nRrJL7b8zK9fos8BRX16S0e3gv+uSTfroUxOG1hv9DYEwWAE4V9KbZd2S hy20vsWq5YznQBQsC6ZTeNo7IXKpmRXiLkQyUarw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-63806: KVM: Replace guest-triggerable BUG_ON() in ioeventfd datamatch with get_unaligned() Date: Sun, 19 Jul 2026 14:02:23 +0200 Message-ID: <2026071902-CVE-2026-63806-b5c7@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=5215; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=T7JeZIZKzrDqjNEO0Q5VrnB/Sf3g9zqM0MQaxwliCLs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkxe3ZFGMu7cEtb3YnsDnJwjqw9YSt5mn156dfS2p9sL habUsQ7YlkYBJkYZMUUWb5s4zm6v+KQopeh7WmYOaxMIEMYuDgFYCL8kxjmp66M6n36NcfnzfEU qeptCU9Lnx74wbDg1MfXussnzqr6MEVvgeDTs3fu7+njBQA= 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: Replace guest-triggerable BUG_ON() in ioeventfd datamatch with get_unaligned() Drop a BUG_ON() that has been reachable since it was first added, way back in 2009, and instead use get_unaligned() to perform potentially-unaligned accesses. For a given store, KVM x86's emulator tracks the entire value in the destination operand, x86_emulate_ctxt.dst. If the destination is memory, and the target splits multiple pages and/or is emulated MMIO, then KVM handles each fragment independently. E.g. on a page split starting at page offset 0xffc, KVM writes 4 bytes to the first page, then the remaining bytes to the second page, using ctxt->dst as the source for both (with appropriate offsets). If the destination splits a page *and* hits emulated MMIO on the second page, then KVM will complete the write to the first page, then emulate the MMIO access to the second page. If there is a datamatch-enabled ioeventfd at offset 0 of the second page, then KVM will process the remainder of the store as a potential ioeventfd signal. Putting it all together, if the guest emits a store that splits a page starting at page offset N, and the second page has a datamatch-enabled ioeventfd at offset 0, then KVM will check for datamatch using &dst.valptr[N] as the source. Due to dst (and thus dst.valptr) being 32-byte aligned, if N is not aligned to @len, the BUG_ON() fires. E.g. with a 16-byte store at page offset 0xffc, to an ioeventfd of len 8, all initial checks in ioeventfd_in_range() will succeed, and the BUG_ON() fires due to @val being 4-byte aligned, but not 8-byte aligned. ------------[ cut here ]------------ kernel BUG at arch/x86/kvm/../../../virt/kvm/eventfd.c:783! Oops: invalid opcode: 0000 [#1] SMP CPU: 0 UID: 1000 PID: 615 Comm: repro Not tainted 7.1.0-rc2-ff238429d1ea #365 PREEMPT Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:ioeventfd_write+0x6c/0x70 [kvm] Call Trace: __kvm_io_bus_write+0x85/0xb0 [kvm] kvm_io_bus_write+0x53/0x80 [kvm] vcpu_mmio_write+0x66/0xf0 [kvm] emulator_read_write_onepage+0x12a/0x540 [kvm] emulator_read_write+0x109/0x2b0 [kvm] x86_emulate_insn+0x4f8/0xfb0 [kvm] x86_emulate_instruction+0x181/0x790 [kvm] kvm_mmu_page_fault+0x313/0x630 [kvm] vmx_handle_exit+0x18a/0x590 [kvm_intel] kvm_arch_vcpu_ioctl_run+0xc81/0x1c90 [kvm] kvm_vcpu_ioctl+0x2d5/0x970 [kvm] __x64_sys_ioctl+0x8a/0xd0 do_syscall_64+0xb7/0x890 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7f19c931a9bf Modules linked in: kvm_intel kvm irqbypass ---[ end trace 0000000000000000 ]--- In a perfect world, the fix would be to simply delete the BUG_ON(), as KVM x86 doesn't perform alignment checks on "normal" memory accesses at CPL0. Sadly, C99 ruins all the fun; while the x86 architecture plays nice, dereferencing an unaligned pointer directly is undefined behavior in C, e.g. triggers splats when running with CONFIG_UBSAN_ALIGNMENT=y. The Linux kernel CVE team has assigned CVE-2026-63806 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.32 with commit d34e6b175e61821026893ec5298cc8e7558df43a and fixed in 6.12.95 with commit bf89e3738480d33cd515b4a18900e8443d40cd2e Issue introduced in 2.6.32 with commit d34e6b175e61821026893ec5298cc8e7558df43a and fixed in 6.18.38 with commit 5da9b1a87ec7cc3489c27016313524769f12d9e0 Issue introduced in 2.6.32 with commit d34e6b175e61821026893ec5298cc8e7558df43a and fixed in 7.1.3 with commit 5c87b47374682f69686068ad0a7779365a527b1c Issue introduced in 2.6.32 with commit d34e6b175e61821026893ec5298cc8e7558df43a and fixed in 7.2-rc1 with commit f1edbed787ba67988ed34e0132ca128b052b6ce8 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-63806 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: virt/kvm/eventfd.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/bf89e3738480d33cd515b4a18900e8443d40cd2e https://git.kernel.org/stable/c/5da9b1a87ec7cc3489c27016313524769f12d9e0 https://git.kernel.org/stable/c/5c87b47374682f69686068ad0a7779365a527b1c https://git.kernel.org/stable/c/f1edbed787ba67988ed34e0132ca128b052b6ce8