{"id":"CVE-2025-40102","state":"PUBLISHED","title":"KVM: arm64: Prevent access to vCPU events before init","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: arm64: Prevent access to vCPU events before init\n\nAnother day, another syzkaller bug. KVM erroneously allows userspace to\npend vCPU events for a vCPU that hasn't been initialized yet, leading to\nKVM interpreting a bunch of uninitialized garbage for routing /\ninjecting the exception.\n\nIn one case the injection code and the hyp disagree on whether the vCPU\nhas a 32bit EL1 and put the vCPU into an illegal mode for AArch64,\ntripping the BUG() in exception_target_el() during the next injection:\n\n  kernel BUG at arch/arm64/kvm/inject_fault.c:40!\n  Internal error: Oops - BUG: 00000000f2000800 [#1]  SMP\n  CPU: 3 UID: 0 PID: 318 Comm: repro Not tainted 6.17.0-rc4-00104-g10fd0285305d #6 PREEMPT\n  Hardware name: linux,dummy-virt (DT)\n  pstate: 21402009 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)\n  pc : exception_target_el+0x88/0x8c\n  lr : pend_serror_exception+0x18/0x13c\n  sp : ffff800082f03a10\n  x29: ffff800082f03a10 x28: ffff0000cb132280 x27: 0000000000000000\n  x26: 0000000000000000 x25: ffff0000c2a99c20 x24: 0000000000000000\n  x23: 0000000000008000 x22: 0000000000000002 x21: 0000000000000004\n  x20: 0000000000008000 x19: ffff0000c2a99c20 x18: 0000000000000000\n  x17: 0000000000000000 x16: 0000000000000000 x15: 00000000200000c0\n  x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000\n  x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000\n  x8 : ffff800082f03af8 x7 : 0000000000000000 x6 : 0000000000000000\n  x5 : ffff800080f621f0 x4 : 0000000000000000 x3 : 0000000000000000\n  x2 : 000000000040009b x1 : 0000000000000003 x0 : ffff0000c2a99c20\n  Call trace:\n   exception_target_el+0x88/0x8c (P)\n   kvm_inject_serror_esr+0x40/0x3b4\n   __kvm_arm_vcpu_set_events+0xf0/0x100\n   kvm_arch_vcpu_ioctl+0x180/0x9d4\n   kvm_vcpu_ioctl+0x60c/0x9f4\n   __arm64_sys_ioctl+0xac/0x104\n   invoke_syscall+0x48/0x110\n   el0_svc_common.constprop.0+0x40/0xe0\n   do_el0_svc+0x1c/0x28\n   el0_svc+0x34/0xf0\n   el0t_64_sync_handler+0xa0/0xe4\n   el0t_64_sync+0x198/0x19c\n  Code: f946bc01 b4fffe61 9101e020 17fffff2 (d4210000)\n\nReject the ioctls outright as no sane VMM would call these before\nKVM_ARM_VCPU_INIT anyway. Even if it did the exception would've been\nthrown away by the eventual reset of the vCPU's state.","publishedAt":"2025-10-30T09:48:07.790Z","updatedAt":"2026-09-02T12:49:25.880Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"b0ab34a9e4cd5b88b522cc156e792cefe3085334","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"d64461d38972302f0243498ff409b0d54e14e106","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"b498f0da45a388b40195f7198455c62fe366a372","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"7b854e68365a84dfa984ee81268e10b9311ac9d2","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"c0fcd72e7eb50205dc20731033b0b1c67ecbe4dc","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"64a04e6320fc5affbadc59dc7024d79f909bfe84","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"0aa1b76fe1429629215a7c79820e4b96233ac4a3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kvm/arm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.19","versionType":"semver"},{"version":"5.10.269","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.220","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.187","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.156","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.108","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.5","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kvm/arm.c"]}],"references":["https://git.kernel.org/stable/c/b0ab34a9e4cd5b88b522cc156e792cefe3085334","https://git.kernel.org/stable/c/d64461d38972302f0243498ff409b0d54e14e106","https://git.kernel.org/stable/c/b498f0da45a388b40195f7198455c62fe366a372","https://git.kernel.org/stable/c/7b854e68365a84dfa984ee81268e10b9311ac9d2","https://git.kernel.org/stable/c/c0fcd72e7eb50205dc20731033b0b1c67ecbe4dc","https://git.kernel.org/stable/c/64a04e6320fc5affbadc59dc7024d79f909bfe84","https://git.kernel.org/stable/c/0aa1b76fe1429629215a7c79820e4b96233ac4a3"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40102.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40102","state":"PUBLISHED","datePublished":"2025-10-30T09:48:07.790Z","dateUpdated":"2026-09-02T12:49:25.880Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.164Z"},"containers":{"cna":{"title":"KVM: arm64: Prevent access to vCPU events before init","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nKVM: arm64: Prevent access to vCPU events before init\n\nAnother day, another syzkaller bug. KVM erroneously allows userspace to\npend vCPU events for a vCPU that hasn't been initialized yet, leading to\nKVM interpreting a bunch of uninitialized garbage for routing /\ninjecting the exception.\n\nIn one case the injection code and the hyp disagree on whether the vCPU\nhas a 32bit EL1 and put the vCPU into an illegal mode for AArch64,\ntripping the BUG() in exception_target_el() during the next injection:\n\n  kernel BUG at arch/arm64/kvm/inject_fault.c:40!\n  Internal error: Oops - BUG: 00000000f2000800 [#1]  SMP\n  CPU: 3 UID: 0 PID: 318 Comm: repro Not tainted 6.17.0-rc4-00104-g10fd0285305d #6 PREEMPT\n  Hardware name: linux,dummy-virt (DT)\n  pstate: 21402009 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)\n  pc : exception_target_el+0x88/0x8c\n  lr : pend_serror_exception+0x18/0x13c\n  sp : ffff800082f03a10\n  x29: ffff800082f03a10 x28: ffff0000cb132280 x27: 0000000000000000\n  x26: 0000000000000000 x25: ffff0000c2a99c20 x24: 0000000000000000\n  x23: 0000000000008000 x22: 0000000000000002 x21: 0000000000000004\n  x20: 0000000000008000 x19: ffff0000c2a99c20 x18: 0000000000000000\n  x17: 0000000000000000 x16: 0000000000000000 x15: 00000000200000c0\n  x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000\n  x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000\n  x8 : ffff800082f03af8 x7 : 0000000000000000 x6 : 0000000000000000\n  x5 : ffff800080f621f0 x4 : 0000000000000000 x3 : 0000000000000000\n  x2 : 000000000040009b x1 : 0000000000000003 x0 : ffff0000c2a99c20\n  Call trace:\n   exception_target_el+0x88/0x8c (P)\n   kvm_inject_serror_esr+0x40/0x3b4\n   __kvm_arm_vcpu_set_events+0xf0/0x100\n   kvm_arch_vcpu_ioctl+0x180/0x9d4\n   kvm_vcpu_ioctl+0x60c/0x9f4\n   __arm64_sys_ioctl+0xac/0x104\n   invoke_syscall+0x48/0x110\n   el0_svc_common.constprop.0+0x40/0xe0\n   do_el0_svc+0x1c/0x28\n   el0_svc+0x34/0xf0\n   el0t_64_sync_handler+0xa0/0xe4\n   el0t_64_sync+0x198/0x19c\n  Code: f946bc01 b4fffe61 9101e020 17fffff2 (d4210000)\n\nReject the ioctls outright as no sane VMM would call these before\nKVM_ARM_VCPU_INIT anyway. Even if it did the exception would've been\nthrown away by the eventual reset of the vCPU's state."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"b0ab34a9e4cd5b88b522cc156e792cefe3085334","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"d64461d38972302f0243498ff409b0d54e14e106","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"b498f0da45a388b40195f7198455c62fe366a372","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"7b854e68365a84dfa984ee81268e10b9311ac9d2","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"c0fcd72e7eb50205dc20731033b0b1c67ecbe4dc","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"64a04e6320fc5affbadc59dc7024d79f909bfe84","versionType":"git"},{"version":"b7b27facc7b50a5fce0afaa3df56157136ce181a","status":"affected","lessThan":"0aa1b76fe1429629215a7c79820e4b96233ac4a3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kvm/arm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.19","versionType":"semver"},{"version":"5.10.269","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.220","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.187","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.156","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.108","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.5","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/arm64/kvm/arm.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b0ab34a9e4cd5b88b522cc156e792cefe3085334"},{"url":"https://git.kernel.org/stable/c/d64461d38972302f0243498ff409b0d54e14e106"},{"url":"https://git.kernel.org/stable/c/b498f0da45a388b40195f7198455c62fe366a372"},{"url":"https://git.kernel.org/stable/c/7b854e68365a84dfa984ee81268e10b9311ac9d2"},{"url":"https://git.kernel.org/stable/c/c0fcd72e7eb50205dc20731033b0b1c67ecbe4dc"},{"url":"https://git.kernel.org/stable/c/64a04e6320fc5affbadc59dc7024d79f909bfe84"},{"url":"https://git.kernel.org/stable/c/0aa1b76fe1429629215a7c79820e4b96233ac4a3"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-09-02T12:49:25.880Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"5.10.269"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"5.15.220"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.1.187"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.6.156"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.12.108"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.17.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}