CVE-2024-35939·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: dma-direct: Leak pages on dma_set_decrypted() failure On TDX it is possible for the untrusted host to cause set_memory_encrypted() or set_memory_decrypted() to fail such that an error is returned and the resulting memory is shared. Callers need to take care to handle these errors to avoid returning decrypted (shared) memory to the page allocator, which could lead to functional or security issues. DMA could free decrypted/shared pages if dma_set_decrypted() fails. This should be a rare case. Just leak the pages in this case instead of freeing them.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.8.6
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at <0.1% — higher than 4% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2024-35939 scores 7.1 on CVSS, so a successful attack would be serious — but at <0.1%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 6.7
Until: 6.8.6
Fixed in: 6.8.6
How to fix this CVE
Update your Linux kernel to version 6.8.6 or later to fix this DMA memory management vulnerability. This patch prevents the kernel from returning decrypted shared memory pages to the allocator when encryption state changes fail, avoiding potential security and stability issues. Apply the update immediately using your distribution's package manager.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your kernel version with `uname -r` and compare against 6.8.6. If version is 6.7.x through 6.8.5, your system is vulnerable.
- Step 2: Verify if DMA operations are active on your system by checking `/proc/iomem` and `/proc/ioports` for device mappings; TDX-enabled systems are at higher risk.
- Step 3: Monitor kernel logs with `sudo journalctl -k -p err` for messages containing 'set_memory_decrypted' or 'dma_direct' failures, which indicate exploitation attempts.
- Step 4: After patching, confirm the new kernel version with `uname -r` and verify it shows 6.8.6 or later, then reboot if necessary.
FAQ
What is CVE-2024-35939?
This vulnerability affects the Linux kernel's DMA direct memory access handling, where a failure in decrypting shared memory could leave pages in an unsafe state and return them to the allocator, potentially causing security or functionality issues in systems using TDX (Trusted Domain Extensions).
Is CVE-2024-35939 being actively exploited?
No, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities catalog and no public exploits are currently available, though it remains a high-severity issue requiring prompt patching.
What versions of Kernel are affected by CVE-2024-35939?
Linux kernel versions 6.7 through 6.8.5 are vulnerable. The vulnerability was patched in version 6.8.6 and later stable releases.
How do I check if my server is vulnerable to CVE-2024-35939?
Run `uname -r` to check your kernel version. If it displays a version between 6.7 and 6.8.5, your system is vulnerable. Additionally, check if TDX is enabled with `grep -i tdx /proc/cpuinfo` or `dmesg | grep -i tdx`.
Does Defensia detect CVE-2024-35939?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-35939 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/4031b72ca747a1e6e9ae4fa729e765b43363d66a
- https://git.kernel.org/stable/c/4e0cfb25d49da2e6261ad582f58ffa5b5dd8c8e9
- https://git.kernel.org/stable/c/b57326c96b7bc7638aa8c44e12afa2defe0c934c
- https://git.kernel.org/stable/c/b9fa16949d18e06bdf728a560f5c8af56d2bdcaf
- https://git.kernel.org/stable/c/4031b72ca747a1e6e9ae4fa729e765b43363d66a
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-35939. Free for 1 server.
Get started free