CVE-2024-35804: Linux Kernel - Memory Corruption
- Cve: CVE-2024-35804
- Name: Linux Kernel - Memory Corruption
- Description: 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
- Impact: Guest memory corruption during live migration, potentially leading to data loss or system instability.
- Remediation: Update to the latest Linux kernel version containing the fix.
- Vulnerability impact: data_tampering, denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.5
- Cvss vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Epss score: 0.00236
- Epss percentile: 0.14664
- Assignee: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
- Published at: 2024-05-17T14:15:13Z
- Age in days: 921
- Modified at: 2026-08-04T11:17:54Z
- Patch available: yes
- References total: 5
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-35804
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: vulnerability type, requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-401 | Missing Release of Memory after Effective Lifetime |
References
Same in every row:
- Source: nvd
- Tags: Patch
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| linux:linux_kernel | = 6.8 rc7; = 6.8 rc1; = 6.8 rc2; = 6.8 rc3; = 6.8 rc4; = 6.8 rc5; = 6.8 rc6; >= 6.7, < 6.7.12; >= 6.2, < 6.6.24; >= 5.18.2, < 6.1.84; >= 5.17.13, < 5.18; >= 5.15.58, < 5.15.154 | no | nvd | /v1/products/linux/linux_kernel |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| torvalds/linux | cna_commit, commit | yes | /v1/repositories/torvalds/linux |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Authentication required: yes
- Exposed hosts: 10038339
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports