# CVE-2025-40026: KVM: x86: Don't (re)check L1 intercepts when completing userspace I/O

> A flaw in Linux KVM allows a guest to trigger a kernel warning and potential denial of service by modifying I/O permission bitmaps during userspace exits.

- **Severity:** High 7.9 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Oct 2025
- **Updated:** 15 Oct 2026
- **Also known as:** BELL-CVE-2025-40026, DEBIAN-CVE-2025-40026, GHSA-3p46-x25w-pgvh, RHSA-2026:68131, RHSA-2026:78843, RHSA-2026:78844, ROOT-OS-DEBIAN-11-CVE-2025-40026, ROOT-OS-DEBIAN-12-CVE-2025-40026, ROOT-OS-DEBIAN-13-CVE-2025-40026, ROOT-OS-UBUNTU-2204-CVE-2025-40026, ROOT-OS-UBUNTU-2404-CVE-2025-40026, UBUNTU-CVE-2025-40026

## What is CVE-2025-40026?

CVE-2025-40026 is a high-severity denial of service vulnerability in Linux, published on 28 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

In the Linux kernel, the following vulnerability has been resolved:

KVM: x86: Don't (re)check L1 intercepts when completing userspace I/O

When completing emulation of instruction that generated a userspace exit
for I/O, don't recheck L1 intercepts as KVM has already finished that
phase of instruction execution, i.e. has already committed to allowing L2
to perform I/O.  If L1 (or host userspace) modifies the I/O permission
bitmaps during the exit to userspace,  KVM will treat the access as being
intercepted despite already having emulated the I/O access.

Pivot on EMULTYPE_NO_DECODE to detect that KVM is completing emulation.
Of the three users of EMULTYPE_NO_DECODE, only complete_emulated_io() (the
intended "recipient") can reach the code in question.  gp_interception()'s
use is mutually exclusive with is_guest_mode(), and
complete_emulated_insn_gp() unconditionally pairs EMULTYPE_NO_DECODE with
EMULTYPE_SKIP.

The bad behavior was detected by a syzkaller program that toggles port I/O
interception during the userspace I/O exit, ultimately resulting in a WARN
on vcpu->arch.pio.count being non-zero due to KVM no completing emulation
of the I/O instruction.

  WARNING: CPU: 23 PID: 1083 at arch/x86/kvm/x86.c:8039 emulator_pio_in_out+0x154/0x170 [kvm]
  Modules linked in: kvm_intel kvm irqbypass
  CPU: 23 UID: 1000 PID: 1083 Comm: repro Not tainted 6.16.0-rc5-c1610d2d66b1-next-vm #74 NONE
  Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
  RIP: 0010:emulator_pio_in_out+0x154/0x170 [kvm]
  PKRU: 55555554
  Call Trace:
   <TASK>
   kvm_fast_pio+0xd6/0x1d0 [kvm]
   vmx_handle_exit+0x149/0x610 [kvm_intel]
   kvm_arch_vcpu_ioctl_run+0xda8/0x1ac0 [kvm]
   kvm_vcpu_ioctl+0x244/0x8c0 [kvm]
   __x64_sys_ioctl+0x8a/0xd0
   do_syscall_64+0x5d/0xc60
   entry_SYSCALL_64_after_hwframe+0x4b/0x53
   </TASK>

## Which versions are affected by CVE-2025-40026?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `bpftool` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `bpftool-debuginfo` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-abi-stablelists` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-core` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-debug` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-debug-core` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-debug-debuginfo` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-debug-devel` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-debug-modules` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-debug-modules-extra` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-debuginfo` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-debuginfo-common-x86_64` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-devel` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-doc` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-modules` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-modules-extra` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-tools` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-tools-debuginfo` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `kernel-tools-libs` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `perf` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `perf-debuginfo` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `python3-perf` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `python3-perf-debuginfo` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:4.18.0-372.214.1.el8_6 |
| `bpftool` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `bpftool-debuginfo` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-abi-whitelists` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-bootwrapper` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-debug` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-debug-debuginfo` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-debug-devel` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-debuginfo` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-debuginfo-common-ppc64` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-debuginfo-common-ppc64le` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-debuginfo-common-s390x` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-debuginfo-common-x86_64` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-devel` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-doc` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |
| `kernel-kdump` | Red Hat:rhel_els:7 | All versions | 0:3.10.0-1160.165.1.el7 |

## How do I fix CVE-2025-40026?

Apply the vendor's patch.

## Is CVE-2025-40026 being exploited?

There is no known exploitation of CVE-2025-40026 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-40026 and fix it if it is affected.

What it is: CVE-2025-40026 is a high-severity denial of service vulnerability in Linux, published on 28 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-40026 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-40026/ (Markdown: https://insights.sbomify.com/CVE-2025-40026/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-40026
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-40026
- OSV: https://osv.dev/vulnerability/CVE-2025-40026

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-40026/
Summaries are generated and may contain mistakes; the official description above is the record.
