# CVE-2024-35939: dma-direct: Leak pages on dma_set_decrypted() failure

- Severity: Critical 9.3 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-01)
- Published: 2024-05-19T10:10:44.931Z
- Modified: 2026-08-05T11:31:06.443Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 56fccf21d1961a06e2a0c96ce446ebf036651062 before 4e0cfb25d49da2e6261ad582f58ffa5b5dd8c8e9; from 56fccf21d1961a06e2a0c96ce446ebf036651062 before 4031b72ca747a1e6e9ae4fa729e765b43363d66a; from 56fccf21d1961a06e2a0c96ce446ebf036651062 before b57326c96b7bc7638aa8c44e12afa2defe0c934c; from 56fccf21d1961a06e2a0c96ce446ebf036651062 before b9fa16949d18e06bdf728a560f5c8af56d2bdcaf; 91c7b0407ca6a62c095d265f76926b67bf66c026; from 5.7.7 before 5.8; 5.8 (not affected: before 5.8; from 6.1.86 up to 6.1.*; from 6.6.27 up to 6.6.*; from 6.8.6 up to 6.8.*; from 6.9 up to *)
- linux linux_kernel: before 6.1.86; from 6.2 before 6.6.27; from 6.7 before 6.8.6

## Every score

- Linux: CVSS:3.1 9.3 Critical `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.1 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/4e0cfb25d49da2e6261ad582f58ffa5b5dd8c8e9> (patch)
- <https://git.kernel.org/stable/c/4031b72ca747a1e6e9ae4fa729e765b43363d66a> (patch)
- <https://git.kernel.org/stable/c/b57326c96b7bc7638aa8c44e12afa2defe0c934c> (patch)
- <https://git.kernel.org/stable/c/b9fa16949d18e06bdf728a560f5c8af56d2bdcaf> (patch)

## Sources

- CVE List: [CVE-2024-35939](https://www.cve.org/CVERecord?id=CVE-2024-35939), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-35939](https://nvd.nist.gov/vuln/detail/CVE-2024-35939), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-35939 · Whole record: https://cve.day/CVE-2024-35939.json · Rebuilt by cve.day 2026-11-25T22:58:40.613Z
