Skip to content
Fencer Vulns
high 8.8

CVE-2024-35804 json

KVM: x86: Mark target gfn of emulated atomic instruction as dirty

published 2024-05-17 2 y ago modified 2026-08-05 3 mo ago also EUVD-2024-35796

cvss
8.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 14%
public exploits
0
none known

Summary

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

KVM: x86: Mark target gfn of emulated atomic instruction as dirty

When emulating an atomic access on behalf of the guest, mark the target gfn dirty if the CMPXCHG by KVM is attempted and doesn't fault. This fixes a bug where KVM effectively corrupts guest memory during live migration by writing to guest memory without informing userspace that the page is dirty.

Marking the page dirty got unintentionally dropped when KVM's emulated CMPXCHG was converted to do a user access. Before that, KVM explicitly mapped the guest page into kernel memory, and marked the page dirty during the unmap phase.

Mark the page dirty even if the CMPXCHG fails, as the old data is written back on failure, i.e. the page is still written. The value written is guaranteed to be the same because the operation is atomic, but KVM's ABI is that all writes are dirty logged regardless of the value written. And more importantly, that's what KVM did before the buggy commit.

Huge kudos to the folks on the Cc list (and many others), who did all the actual work of triaging and debugging.

base-commit: 6769ea8da8a93ed4630f1ce64df6aafcaabfce64

Patch / fix

  • Linux Linux 5.15.154, 5.18, 5.19, 6.1.84, 6.6.24, 6.7.12, 6.8
  • linux Debian 12 6.1.85-1
  • linux Debian 14, Debian 13 6.7.12-1

debian advisories DEBIAN-CVE-2024-35804

  • linux Ubuntu 22.04 LTS 5.15.0-116.126
  • linux-aws Ubuntu 22.04 LTS 5.15.0-1065.71
  • linux-gcp Ubuntu 22.04 LTS 5.15.0-1064.72
  • linux-gke Ubuntu 22.04 LTS 5.15.0-1062.68
  • linux-ibm Ubuntu 22.04 LTS 5.15.0-1058.61
  • linux-kvm Ubuntu 22.04 LTS 5.15.0-1062.67
  • linux-azure Ubuntu 22.04 LTS 5.15.0-1068.77
  • linux-gkeop Ubuntu 22.04 LTS 5.15.0-1048.55

ubuntu advisories UBUNTU-CVE-2024-35804

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • kernel-rt Linux Micro 6.0 6.4.0-9.1
  • kernel-source-rt Linux Micro 6.0 6.4.0-9.1
  • kernel-source Linux Micro 6.0 6.4.0-18.1
  • kernel-default Linux Micro 6.0 6.4.0-18.1
  • kernel-kvmsmall Linux Micro 6.0 6.4.0-18.1
  • kernel-default-base Linux Micro 6.0 6.4.0-17.1.1.51
  • kernel-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.5.1
  • kernel-syms-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.5.1

suse advisories SUSE-SU-2025:20028-1SUSE-SU-2025:20008-1SUSE-SU-2024:2973-1SUSE-SU-2024:2203-1SUSE-SU-2024:2190-1SUSE-SU-2024:2135-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-35804 updated cvss 5.5

kernel: KVM: x86: Mark target gfn of emulated atomic instruction as dirty

  • Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

0.24% chance of exploitation in the next 30 days, higher than 14% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 8.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
NVD 3.1 5.5 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected products

  • Linux Linux

Classification

Weakness
  • CWE-401 Missing Release of Memory after Effective Lifetime
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.