CVE-2026-63806: KVM: Replace guest-triggerable BUG_ON() in ioeventfd datamatch with get_unaligned()
In the Linux kernel, the following vulnerability has been resolved:
KVM: Replace guest-triggerable BUGON() in ioeventfd datamatch with getunaligned()
Drop a BUGON() that has been reachable since it was first added, way back in 2009, and instead use getunaligned() to perform potentially-unaligned accesses.
For a given store, KVM x86's emulator tracks the entire value in the destination operand, x86emulatectxt.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 BUGON() fires.
E.g. with a 16-byte store at page offset 0xffc, to an ioeventfd of len 8, all initial checks in ioeventfdinrange() will succeed, and the BUGON() 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:ioeventfdwrite+0x6c/0x70 [kvm] Call Trace: <TASK> kvmiobuswrite+0x85/0xb0 [kvm] kvmiobuswrite+0x53/0x80 [kvm] vcpummiowrite+0x66/0xf0 [kvm] emulatorreadwriteonepage+0x12a/0x540 [kvm] emulatorreadwrite+0x109/0x2b0 [kvm] x86emulateinsn+0x4f8/0xfb0 [kvm] x86emulateinstruction+0x181/0x790 [kvm] kvmmmupagefault+0x313/0x630 [kvm] vmxhandleexit+0x18a/0x590 [kvmintel] kvmarchvcpuioctlrun+0xc81/0x1c90 [kvm] kvmvcpuioctl+0x2d5/0x970 [kvm] x64sysioctl+0x8a/0xd0 dosyscall64+0xb7/0x890 entrySYSCALL64afterhwframe+0x4b/0x53 RIP: 0033:0x7f19c931a9bf </TASK> Modules linked in: kvmintel kvm irqbypass ---[ end trace 0000000000000000 ]---
In a perfect world, the fix would be to simply delete the BUGON(), 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 CONFIGUBSANALIGNMENT=y.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.145.2-1 - Upgrade
Upgrade
Linux kernelto a version that resolves this vulnerability.Patch KVM: Replace guest-triggerable BUG_ON() in ioeventfd datamatch with get_unaligned() - Configuration
Resolve the guest-reachable BUG_ON() in ioeventfd datamatch (eventfd.c:783) by replacing the direct potentially-unaligned dereference with get_unaligned() as described in the resolution text.
KVM (Linux kernel) ioeventfd datamatch BUG_ON in arch/x86/kvm/virt/kvm/eventfd.c:783 = Replace with get_unaligned()
Event History
Frequently Asked Questions
What is the severity of CVE-2026-63806?
The severity of CVE-2026-63806 is high, rated at 7.1 based on CVSS 3.1.
How do I fix CVE-2026-63806?
To fix CVE-2026-63806, update the Linux kernel to the latest stable version where the vulnerability has been resolved.
What are the potential impacts of CVE-2026-63806?
CVE-2026-63806 may lead to denial of service through a guest-triggerable BUG_ON() condition in the KVM module.
Is CVE-2026-63806 present in all Linux kernel versions?
CVE-2026-63806 is present in Linux kernel versions prior to the patch that resolves this issue.
What component of the Linux kernel does CVE-2026-63806 affect?
CVE-2026-63806 affects the KVM module specifically related to ioeventfd datamatch functionality.