# CVE-2025-71104: KVM: x86: Fix VM hard lockup after prolonged inactivity with periodic HV timer

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.16% (percentile 2, 2026-11-26)
- **CWE:** CWE-667, CWE-400
- **Published:** 2026-01-14T15:05:53.802Z
- **Modified:** 2026-11-10T13:18:05.793Z

## Who should check

- Anyone running Linux \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 786ed625c125c5cd180d6aaa37e653e3e4ffb8d9; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< d2da0df7bbc4fb4fd7d0a1da704f81a09c72fe73; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 807dbe8f3862fa7c164155857550ce94b36a11b9; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 7b54ccef865e0aa62e4871d4ada2ba4b9dcb8bed; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< e746e51947053a02af2ea964593dc4887108d379; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< e23f46f1a971c73dad2fd63e1408696114ddebe2; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 18ab3fc8e880791aa9f7c000261320fc812b5465; 421e1fadb0b0a648cc75afd5b3c826fa7daeaffc; 5a69b7b69beae9bb86e7e1b095685087976cba47; \>= 4.14.45, \< 4.15; …
- Anyone running Linux 4.17

## Description

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

KVM: x86: Fix VM hard lockup after prolonged inactivity with periodic HV timer

When advancing the target expiration for the guest's APIC timer in periodic
mode, set the expiration to "now" if the target expiration is in the past
(similar to what is done in update\_target\_expiration()).  Blindly adding
the period to the previous target expiration can result in KVM generating
a practically unbounded number of hrtimer IRQs due to programming an
expired timer over and over.  In extreme scenarios, e.g. if userspace
pauses/suspends a VM for an extended duration, this can even cause hard
lockups in the host.

Currently, the bug only affects Intel CPUs when using the hypervisor timer
(HV timer), a.k.a. the VMX preemption timer.  Unlike the software timer,
a.k.a. hrtimer, which KVM keeps running even on exits to userspace, the
HV timer only runs while the guest is active.  As a result, if the vCPU
does not run for an extended duration, there will be a huge gap between
the target expiration and the current time the vCPU resumes running.
Because the target expiration is incremented by only one period on each
timer expiration, this leads to a series of timer expirations occurring
rapidly after the vCPU/VM resumes.

More critically, when the vCPU first triggers a periodic HV timer
expiration after resuming, advancing the expiration by only one period
will result in a target expiration in the past.  As a result, the delta
may be calculated as a negative value.  When the delta is converted into
an absolute value (tscdeadline is an unsigned u64), the resulting value
can overflow what the HV timer is capable of programming.  I.e. the large
value will exceed the VMX Preemption Timer's maximum bit width of
cpu\_preemption\_timer\_multi + 32, and thus cause KVM to switch from the
HV timer to the software timer (hrtimers).

After switching to the software timer, periodic timer expiration callbacks
may be executed consecutively within a single clock interrupt handler,
because hrtimers honors KVM's request for an expiration in the past and
immediately re-invokes KVM's callback after reprogramming.  And because
the interrupt handler runs with IRQs disabled, restarting KVM's hrtimer
over and over until the target expiration is advanced to "now" can result
in a hard lockup.

E.g. the following hard lockup was triggered in the host when running a
Windows VM (only relevant because it used the APIC timer in periodic mode)
after resuming the VM from a long suspend (in the host).

  NMI watchdog: Watchdog detected hard LOCKUP on cpu 45
  ...
  RIP: 0010:advance\_periodic\_target\_expiration+0x4d/0x80 \[kvm\]
  ...
  RSP: 0018:ff4f88f5d98d8ef0 EFLAGS: 00000046
  RAX: fff0103f91be678e RBX: fff0103f91be678e RCX: 00843a7d9e127bcc
  RDX: 0000000000000002 RSI: 0052ca4003697505 RDI: ff440d5bfbdbd500
  RBP: ff440d5956f99200 R08: ff2ff2a42deb6a84 R09: 000000000002a6c0
  R10: 0122d794016332b3 R11: 0000000000000000 R12: ff440db1af39cfc0
  R13: ff440db1af39cfc0 R14: ffffffffc0d4a560 R15: ff440db1af39d0f8
  FS:  00007f04a6ffd700(0000) GS:ff440db1af380000(0000) knlGS:000000e38a3b8000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 000000d5651feff8 CR3: 000000684e038002 CR4: 0000000000773ee0
  PKRU: 55555554
  Call Trace:
   \<IRQ\>
   apic\_timer\_fn+0x31/0x50 \[kvm\]
   \_\_hrtimer\_run\_queues+0x100/0x280
   hrtimer\_interrupt+0x100/0x210
   ? ttwu\_do\_wakeup+0x19/0x160
   smp\_apic\_timer\_interrupt+0x6a/0x130
   apic\_timer\_interrupt+0xf/0x20
   \</IRQ\>

Moreover, if the suspend duration of the virtual machine is not long enough
to trigger a hard lockup in this scenario, since commit 98c25ead5eda
("KVM: VMX: Move preemption timer \<=\> hrtimer dance to common x86"), KVM
will continue using the software timer until the guest reprograms the APIC
timer in some way.  Since the periodic timer does not require frequent APIC
timer register programming, the guest may continue to use the software
timer in 
---truncated---

## Affected and fixed versions

- Linux: \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 786ed625c125c5cd180d6aaa37e653e3e4ffb8d9; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< d2da0df7bbc4fb4fd7d0a1da704f81a09c72fe73; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 807dbe8f3862fa7c164155857550ce94b36a11b9; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 7b54ccef865e0aa62e4871d4ada2ba4b9dcb8bed; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< e746e51947053a02af2ea964593dc4887108d379; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< e23f46f1a971c73dad2fd63e1408696114ddebe2; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 18ab3fc8e880791aa9f7c000261320fc812b5465; 421e1fadb0b0a648cc75afd5b3c826fa7daeaffc; 5a69b7b69beae9bb86e7e1b095685087976cba47; \>= 4.14.45, \< 4.15; … (cvelist)
- Linux: 4.17 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-71104. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-71104.md
Affected: Linux >= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, < 786ed625c125c5cd180d6aaa37e653e3e4ffb8d9; >= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, < d2da0df7bbc4fb4fd7d0a1da704f81a09c72fe73; >= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, < 807dbe8f3862fa7c164155857550ce94b36a11b9; >= d8f2f498d9ed0c5010bc1bb…
Fixed in: Linux 786ed625c125c5cd180d6aaa37e653e3e4ffb8d9, Linux 807dbe8f3862fa7c164155857550ce94b36a11b9, Linux 7b54ccef865e0aa62e4871d4ada2ba4b9dcb8bed, Linux 18ab3fc8e880791aa9f7c000261320fc812b5465, Linux 4.15

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-71104 being exploited?

There is no confirmed exploitation: CVE-2025-71104 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.16% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-71104?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 786ed625c125c5cd180d6aaa37e653e3e4ffb8d9; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< d2da0df7bbc4fb4fd7d0a1da704f81a09c72fe73; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 807dbe8f3862fa7c164155857550ce94b36a11b9; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 7b54ccef865e0aa62e4871d4ada2ba4b9dcb8bed; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< e746e51947053a02af2ea964593dc4887108d379; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< e23f46f1a971c73dad2fd63e1408696114ddebe2; \>= d8f2f498d9ed0c5010bc1bbc1146f94c8bf9f8cc, \< 18ab3fc8e880791aa9f7c000261320fc812b5465; 421e1fadb0b0a648cc75afd5b3c826fa7daeaffc; 5a69b7b69beae9bb86e7e1b095685087976cba47; \>= 4.14.45, \< 4.15; …; Linux 4.17.

### Is there a fix for CVE-2025-71104?

Yes. Fixed in Linux 786ed625c125c5cd180d6aaa37e653e3e4ffb8d9, Linux 807dbe8f3862fa7c164155857550ce94b36a11b9, Linux 7b54ccef865e0aa62e4871d4ada2ba4b9dcb8bed, Linux 18ab3fc8e880791aa9f7c000261320fc812b5465, Linux 4.15. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-71104?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/786ed625c125c5cd180d6aaa37e653e3e4ffb8d9>
- patch: <https://git.kernel.org/stable/c/d2da0df7bbc4fb4fd7d0a1da704f81a09c72fe73>
- patch: <https://git.kernel.org/stable/c/807dbe8f3862fa7c164155857550ce94b36a11b9>
- patch: <https://git.kernel.org/stable/c/7b54ccef865e0aa62e4871d4ada2ba4b9dcb8bed>
- patch: <https://git.kernel.org/stable/c/e746e51947053a02af2ea964593dc4887108d379>
- patch: <https://git.kernel.org/stable/c/e23f46f1a971c73dad2fd63e1408696114ddebe2>
- patch: <https://git.kernel.org/stable/c/18ab3fc8e880791aa9f7c000261320fc812b5465>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-71104>

HTML: <https://flawdb.com/CVE-2025-71104> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-71104>
