Skip to content
Heist/ feed
Back to feed
CriticalFix available

dma-direct: Leak pages on dma_set_decrypted() failure

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.86, 6.6.27, 6.8.6
CVEs
CVE-2024-35939
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 00:58 UTC · Revision 1

Source evidence

dma-direct: Leak pages on dma_set_decrypted() failure

core-osv · Original source

Published 19 May 2024, 10:10 UTC

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.

osv:CVE-2024-35939

Kernel

Fixed versions: 6.1.86, 6.6.27, 6.8.6

Complete source record
{
  "id": "614ab4994c48cb7842118c99b261c33055a77a1715550c664ad413307c226771",
  "url": "https://osv.dev/vulnerability/CVE-2024-35939",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "dma-direct: Leak pages on dma_set_decrypted() failure",
    "summary": "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.",
    "evidence": "osv:CVE-2024-35939",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.86",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.27",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.8.6",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "CVE-2024-35939",
      "aliases": [
        "CVE-2024-35939"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "56fccf21d1961a06e2a0c96ce446ebf036651062"
                },
                {
                  "fixed": "4e0cfb25d49da2e6261ad582f58ffa5b5dd8c8e9"
                },
                {
                  "fixed": "4031b72ca747a1e6e9ae4fa729e765b43363d66a"
                },
                {
                  "fixed": "b57326c96b7bc7638aa8c44e12afa2defe0c934c"
                },
                {
                  "fixed": "b9fa16949d18e06bdf728a560f5c8af56d2bdcaf"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.7.7"
                },
                {
                  "fixed": "5.8"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "91c7b0407ca6a62c095d265f76926b67bf66c026"
                }
              ]
            }
          ],
          "versions": [
            "v5.7.19",
            "v5.7.18",
            "v5.7.17",
            "v5.7.16",
            "v5.7.15",
            "v5.7.14",
            "v5.7.13",
            "v5.7.12",
            "v5.7.11",
            "v5.7.10",
            "v5.7.9",
            "v5.7.8",
            "v5.7.7"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35939.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.8.0"
                },
                {
                  "fixed": "6.1.86"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.27"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.8.6"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35939.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:41.318307657Z",
      "provider": "osv",
      "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://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35939.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-35939",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35939.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-35939",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 508812,
  "published_at": "2024-05-19T10:10:44.931+00:00"
}