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 EMULTYPENODECODE to detect that KVM is completing emulation. Of the three users of EMULTYPENODECODE, only completeemulatedio() (the intended "recipient") can reach the code in question. gpinterception()'s use is mutually exclusive with isguestmode(), and completeemulatedinsngp() unconditionally pairs EMULTYPENODECODE 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 emulatorpioinout+0x154/0x170 [kvm] Modules linked in: kvmintel 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:emulatorpioinout+0x154/0x170 [kvm] PKRU: 55555554 Call Trace: <TASK> kvmfastpio+0xd6/0x1d0 [kvm] vmxhandleexit+0x149/0x610 [kvmintel] kvmarchvcpuioctlrun+0xda8/0x1ac0 [kvm] kvmvcpuioctl+0x244/0x8c0 [kvm] _x64sysioctl+0x8a/0xd0 dosyscall64+0x5d/0xc60 entrySYSCALL64after_hwframe+0x4b/0x53 </TASK>
[
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/x86.c"
},
"digest": {
"line_hashes": [
"144857076711865654332685083646702322177",
"272902973524832792961947892794656568805",
"166688436263922745769299475751879510241",
"199064885760373057282694904218930696061"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0ce3ed1048a47986d15aef1a98ebda25560d257",
"signature_version": "v1",
"id": "CVE-2025-40026-0312c03d"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/kvm_emulate.h"
},
"digest": {
"line_hashes": [
"106647186785608495934955204283528374125",
"96608136855087726489417445730016745358",
"285219933891797317479196142047039205518",
"190209277626260062727227427803278968083",
"310660297965626043032953353348001265664",
"151261066091741694079701560520543710906",
"335661457114553608741715220031040711012",
"154940195251981227150106295786868341261"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e7177c7e32cb806f348387b7f4faafd4a5b32054",
"signature_version": "v1",
"id": "CVE-2025-40026-0b83104e"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/x86.c"
},
"digest": {
"line_hashes": [
"130377798975945569282842693291032002760",
"217348579272771529504388032258338199769",
"302503695559815895920922277866981806484",
"254159828375670804415000563491584223234",
"48670451455373325948109766135440159959",
"254849255455730782377942622667223133678",
"2094518076598347231982505540135020688",
"120837078548430238286378133673606073694",
"147373818124331515705043524704760784581",
"119554806285798746430431581469665668295",
"121647726574845106276950029619152503175",
"144857076711865654332685083646702322177",
"272902973524832792961947892794656568805",
"166688436263922745769299475751879510241",
"199064885760373057282694904218930696061"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e750f85391286a4c8100275516973324b621a269",
"signature_version": "v1",
"id": "CVE-2025-40026-114d0cce"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/emulate.c",
"function": "x86_emulate_insn"
},
"digest": {
"length": 8107.0,
"function_hash": "128013767111949618305767066290562268794"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0ce3ed1048a47986d15aef1a98ebda25560d257",
"signature_version": "v1",
"id": "CVE-2025-40026-23be7d89"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/emulate.c"
},
"digest": {
"line_hashes": [
"153790226326597659162592430631941178453",
"295476608182980693261176038876853694740",
"85230926739753430855283595659994990402",
"126649358950504260520514071022541856080",
"11813721545133892487314489003016012280",
"181226246891281476718944063254743727146",
"129740607528657045721487553026134892929",
"223039576194188528492160050259966657",
"218103701191498615604066105117419167210",
"197217172603697387679993753732209938374",
"24385148157859081783502050318821783873",
"233192441151857825303585177572805810739",
"37267532226326296981887393769940749821",
"83914188566488684050517807882063995893",
"337040602137750019166867469554058811434",
"275669200788856169299608239512414316614",
"137699264467308348401562607817335036041",
"195957466573875519635957775543934093782",
"126149098233792544448979213660693882304",
"24714174651133776388373673858862075883",
"28673893287572186665458104367250009379",
"282585318028349037989826319033861184232",
"224016407007188668258087197436837133260",
"95076498076431445584088830897126665935",
"25241633650539542727856099143475314461"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0ce3ed1048a47986d15aef1a98ebda25560d257",
"signature_version": "v1",
"id": "CVE-2025-40026-24137191"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/emulate.c"
},
"digest": {
"line_hashes": [
"153790226326597659162592430631941178453",
"295476608182980693261176038876853694740",
"85230926739753430855283595659994990402",
"126649358950504260520514071022541856080",
"11813721545133892487314489003016012280",
"20153633350851441948100096111524692940",
"86435522997446190556965254250825167823",
"191584763573660635290078340320910375534",
"289928914652809792287881191187655624776",
"71220849615741216828689647389922728419",
"59962654482365587223478216180116567913",
"46625515339525920361289181710896294868",
"242350480934469420081760314102366576889",
"296461698424423615030619686705442591943",
"322922311455303510822430547916785002271",
"301357440184319167928673937256632747578",
"71908656005807065227572258862473856237",
"31338316841096749415055666054787630841",
"155382160774322705084935745016407525121",
"134248831652767635168540656452487721749",
"223685389389863087687727366723175868266"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e7177c7e32cb806f348387b7f4faafd4a5b32054",
"signature_version": "v1",
"id": "CVE-2025-40026-27a54e1a"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/emulate.c",
"function": "x86_emulate_insn"
},
"digest": {
"length": 8059.0,
"function_hash": "20469332788118851505075582979475805342"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a062a5c55adc5507600b9ae6d911e247e2f1d6e",
"signature_version": "v1",
"id": "CVE-2025-40026-2cdede55"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/x86.c"
},
"digest": {
"line_hashes": [
"130377798975945569282842693291032002760",
"217348579272771529504388032258338199769",
"302503695559815895920922277866981806484",
"254159828375670804415000563491584223234",
"48670451455373325948109766135440159959",
"254849255455730782377942622667223133678",
"2094518076598347231982505540135020688",
"120837078548430238286378133673606073694",
"147373818124331515705043524704760784581",
"119554806285798746430431581469665668295",
"121647726574845106276950029619152503175",
"144857076711865654332685083646702322177",
"272902973524832792961947892794656568805",
"166688436263922745769299475751879510241",
"199064885760373057282694904218930696061"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e7177c7e32cb806f348387b7f4faafd4a5b32054",
"signature_version": "v1",
"id": "CVE-2025-40026-5b7e951a"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/x86.c"
},
"digest": {
"line_hashes": [
"130377798975945569282842693291032002760",
"217348579272771529504388032258338199769",
"302503695559815895920922277866981806484",
"254159828375670804415000563491584223234",
"48670451455373325948109766135440159959",
"254849255455730782377942622667223133678",
"2094518076598347231982505540135020688",
"120837078548430238286378133673606073694",
"147373818124331515705043524704760784581",
"119554806285798746430431581469665668295",
"121647726574845106276950029619152503175",
"144857076711865654332685083646702322177",
"272902973524832792961947892794656568805",
"166688436263922745769299475751879510241",
"199064885760373057282694904218930696061"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a062a5c55adc5507600b9ae6d911e247e2f1d6e",
"signature_version": "v1",
"id": "CVE-2025-40026-677df7b6"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/emulate.c"
},
"digest": {
"line_hashes": [
"153790226326597659162592430631941178453",
"295476608182980693261176038876853694740",
"85230926739753430855283595659994990402",
"126649358950504260520514071022541856080",
"11813721545133892487314489003016012280",
"20153633350851441948100096111524692940",
"86435522997446190556965254250825167823",
"191584763573660635290078340320910375534",
"289928914652809792287881191187655624776",
"71220849615741216828689647389922728419",
"59962654482365587223478216180116567913",
"46625515339525920361289181710896294868",
"242350480934469420081760314102366576889",
"296461698424423615030619686705442591943",
"322922311455303510822430547916785002271",
"301357440184319167928673937256632747578",
"71908656005807065227572258862473856237",
"31338316841096749415055666054787630841",
"155382160774322705084935745016407525121",
"134248831652767635168540656452487721749",
"223685389389863087687727366723175868266"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e750f85391286a4c8100275516973324b621a269",
"signature_version": "v1",
"id": "CVE-2025-40026-76d171a7"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/kvm_emulate.h"
},
"digest": {
"line_hashes": [
"106647186785608495934955204283528374125",
"96608136855087726489417445730016745358",
"285219933891797317479196142047039205518",
"190209277626260062727227427803278968083",
"310660297965626043032953353348001265664",
"151261066091741694079701560520543710906",
"335661457114553608741715220031040711012",
"154940195251981227150106295786868341261"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a062a5c55adc5507600b9ae6d911e247e2f1d6e",
"signature_version": "v1",
"id": "CVE-2025-40026-7f7af403"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/emulate.c"
},
"digest": {
"line_hashes": [
"153790226326597659162592430631941178453",
"295476608182980693261176038876853694740",
"85230926739753430855283595659994990402",
"126649358950504260520514071022541856080",
"11813721545133892487314489003016012280",
"20153633350851441948100096111524692940",
"86435522997446190556965254250825167823",
"191584763573660635290078340320910375534",
"289928914652809792287881191187655624776",
"71220849615741216828689647389922728419",
"59962654482365587223478216180116567913",
"46625515339525920361289181710896294868",
"242350480934469420081760314102366576889",
"296461698424423615030619686705442591943",
"322922311455303510822430547916785002271",
"301357440184319167928673937256632747578",
"71908656005807065227572258862473856237",
"31338316841096749415055666054787630841",
"155382160774322705084935745016407525121",
"134248831652767635168540656452487721749",
"223685389389863087687727366723175868266"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a062a5c55adc5507600b9ae6d911e247e2f1d6e",
"signature_version": "v1",
"id": "CVE-2025-40026-808d7fb3"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/emulate.c",
"function": "x86_emulate_insn"
},
"digest": {
"length": 8059.0,
"function_hash": "20469332788118851505075582979475805342"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e750f85391286a4c8100275516973324b621a269",
"signature_version": "v1",
"id": "CVE-2025-40026-8ccfaa4b"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/x86.c",
"function": "x86_emulate_instruction"
},
"digest": {
"length": 3458.0,
"function_hash": "187249654667400201148141721817957850736"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0ce3ed1048a47986d15aef1a98ebda25560d257",
"signature_version": "v1",
"id": "CVE-2025-40026-8d688862"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/kvm_emulate.h"
},
"digest": {
"line_hashes": [
"106647186785608495934955204283528374125",
"96608136855087726489417445730016745358",
"285219933891797317479196142047039205518",
"190209277626260062727227427803278968083",
"310660297965626043032953353348001265664",
"151261066091741694079701560520543710906",
"335661457114553608741715220031040711012",
"154940195251981227150106295786868341261"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e750f85391286a4c8100275516973324b621a269",
"signature_version": "v1",
"id": "CVE-2025-40026-b756464e"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/kvm_emulate.h"
},
"digest": {
"line_hashes": [
"310660297965626043032953353348001265664",
"151261066091741694079701560520543710906",
"335661457114553608741715220031040711012",
"154940195251981227150106295786868341261"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0ce3ed1048a47986d15aef1a98ebda25560d257",
"signature_version": "v1",
"id": "CVE-2025-40026-b7dc99d6"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/x86.c",
"function": "x86_emulate_instruction"
},
"digest": {
"length": 4049.0,
"function_hash": "328931216155610168362904602690091386030"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e750f85391286a4c8100275516973324b621a269",
"signature_version": "v1",
"id": "CVE-2025-40026-cdfa9bae"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/x86.c",
"function": "x86_emulate_instruction"
},
"digest": {
"length": 3907.0,
"function_hash": "177229099679957821771194983097772272515"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e7177c7e32cb806f348387b7f4faafd4a5b32054",
"signature_version": "v1",
"id": "CVE-2025-40026-d6904415"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/x86.c",
"function": "x86_emulate_instruction"
},
"digest": {
"length": 4049.0,
"function_hash": "328931216155610168362904602690091386030"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3a062a5c55adc5507600b9ae6d911e247e2f1d6e",
"signature_version": "v1",
"id": "CVE-2025-40026-ef5c7bdb"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/x86/kvm/emulate.c",
"function": "x86_emulate_insn"
},
"digest": {
"length": 8059.0,
"function_hash": "20469332788118851505075582979475805342"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e7177c7e32cb806f348387b7f4faafd4a5b32054",
"signature_version": "v1",
"id": "CVE-2025-40026-fdcc7307"
}
]