CVE-2024-36943 (GCVE-0-2024-36943)
Vulnerability from cvelistv5
Published
2024-05-30 15:35
Modified
2026-08-05 11:32
Summary
In the Linux kernel, the following vulnerability has been resolved: fs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan make_uffd_wp_pte() was previously doing: pte = ptep_get(ptep); ptep_modify_prot_start(ptep); pte = pte_mkuffd_wp(pte); ptep_modify_prot_commit(ptep, pte); But if another thread accessed or dirtied the pte between the first 2 calls, this could lead to loss of that information. Since ptep_modify_prot_start() gets and clears atomically, the following is the correct pattern and prevents any possible race. Any access after the first call would see an invalid pte and cause a fault: pte = ptep_modify_prot_start(ptep); pte = pte_mkuffd_wp(pte); ptep_modify_prot_commit(ptep, pte);
Impacted products
Vendor Product Version
Linux Linux Version: 52526ca7fdb905a768a93f8faa418e9b988fc34b
Version: 52526ca7fdb905a768a93f8faa418e9b988fc34b
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-36943",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-06-05T18:15:10.001170Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-05T18:17:48.241Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T03:43:50.375Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/74b3d66f91d9f539f99faad74d796fa9a389a015"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/c70dce4982ce1718bf978a35f8e26160b82081f4"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/proc/task_mmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "74b3d66f91d9f539f99faad74d796fa9a389a015",
              "status": "affected",
              "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
              "versionType": "git"
            },
            {
              "lessThan": "c70dce4982ce1718bf978a35f8e26160b82081f4",
              "status": "affected",
              "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/proc/task_mmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.7"
            },
            {
              "lessThan": "6.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.8.*",
              "status": "unaffected",
              "version": "6.8.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.9",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.8.10",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.9",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nfs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan\n\nmake_uffd_wp_pte() was previously doing:\n\n  pte = ptep_get(ptep);\n  ptep_modify_prot_start(ptep);\n  pte = pte_mkuffd_wp(pte);\n  ptep_modify_prot_commit(ptep, pte);\n\nBut if another thread accessed or dirtied the pte between the first 2\ncalls, this could lead to loss of that information.  Since\nptep_modify_prot_start() gets and clears atomically, the following is the\ncorrect pattern and prevents any possible race.  Any access after the\nfirst call would see an invalid pte and cause a fault:\n\n  pte = ptep_modify_prot_start(ptep);\n  pte = pte_mkuffd_wp(pte);\n  ptep_modify_prot_commit(ptep, pte);"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.3,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerability is reached only through the PAGEMAP_SCAN ioctl on /proc/\u003cpid\u003e/pagemap combined with a userfaultfd WP-async registration, both of which require local execution on the host. There is no network-facing consumer of this path.\nAC:L - The attacker owns both sides of the race \u2014 sibling threads continuously writing to the mapped range set the hardware A/D bits while another thread loops PAGEMAP_SCAN with PM_SCAN_WP_MATCHING over millions of PTEs per iteration, so a hit is effectively guaranteed and can be retried without limit. No condition depends on external state the attacker cannot influence.\nPR:L - Only an ordinary unprivileged local account is needed: pagemap_open() requires just PTRACE_MODE_READ (trivial for /proc/self), the PAGEMAP_SCAN ioctl has no capability check, and userfaultfd_syscall_allowed() unconditionally permits UFFD_USER_MODE_ONLY so even vm.unprivileged_userfaultfd=0 does not block UFFD_FEATURE_WP_ASYNC registration. All required Kconfig options (PROC_PAGE_MONITOR, PTE_MARKER_UFFD_WP) are default-y in distro kernels.\nUI:N - The attacker drives the ioctl and the racing writes entirely from its own threads with no victim action required; when targeting another mm the victim\u0027s pre-existing uffd-wp-async registration is passive state, not an interaction.\nS:U - The lost PTE bits corrupt memory managed by the same kernel that contains the flaw, with no crossing of a hypervisor, IOMMU, or sandbox boundary. This is the standard unchanged-scope case for a kernel memory-management defect.\nC:L - Discarding the dirty bit causes a page\u0027s rewritten contents to be dropped and the stale swap-slot contents to be resurrected, so data a process deliberately overwrote or scrubbed (keys, credentials) persists in memory and on the swap device instead of being erased. This is a bounded exposure of previously-written data rather than an arbitrary kernel read primitive.\nI:H - Loss of the dirty bit makes the kernel silently drop modified pages \u2014 swap-cached anonymous pages revert to stale contents and MADV_FREE pages are discarded to zeros via the try_to_unmap_one discard path \u2014 with no error to the application. The attacker can repeat this across an unbounded number of pages, including in another process\u0027s mm it can ptrace-read (e.g. a CRIU- or VMM-managed workload using uffd-wp-async dirty tracking), amounting to total loss of integrity of that memory.\nA:H - Pages silently reverting to stale swap contents or being zeroed out corrupts live program state and reliably renders the affected process \u2014 including a targeted uffd-wp-async user such as a checkpoint/restore agent or live-migration VMM and its guest \u2014 non-functional or crashed. The condition is repeatable at will by an unprivileged local user."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:32:11.488Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/74b3d66f91d9f539f99faad74d796fa9a389a015"
        },
        {
          "url": "https://git.kernel.org/stable/c/c70dce4982ce1718bf978a35f8e26160b82081f4"
        }
      ],
      "title": "fs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-36943",
    "datePublished": "2024-05-30T15:35:42.119Z",
    "dateReserved": "2024-05-30T15:25:07.073Z",
    "dateUpdated": "2026-08-05T11:32:11.488Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/74b3d66f91d9f539f99faad74d796fa9a389a015\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/c70dce4982ce1718bf978a35f8e26160b82081f4\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T03:43:50.375Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-36943\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-06-05T18:15:10.001170Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-06-05T18:15:18.500Z\"}}], \"cna\": {\"title\": \"fs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 7.3, \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:L - The vulnerability is reached only through the PAGEMAP_SCAN ioctl on /proc/\u003cpid\u003e/pagemap combined with a userfaultfd WP-async registration, both of which require local execution on the host. There is no network-facing consumer of this path.\\nAC:L - The attacker owns both sides of the race \\u2014 sibling threads continuously writing to the mapped range set the hardware A/D bits while another thread loops PAGEMAP_SCAN with PM_SCAN_WP_MATCHING over millions of PTEs per iteration, so a hit is effectively guaranteed and can be retried without limit. No condition depends on external state the attacker cannot influence.\\nPR:L - Only an ordinary unprivileged local account is needed: pagemap_open() requires just PTRACE_MODE_READ (trivial for /proc/self), the PAGEMAP_SCAN ioctl has no capability check, and userfaultfd_syscall_allowed() unconditionally permits UFFD_USER_MODE_ONLY so even vm.unprivileged_userfaultfd=0 does not block UFFD_FEATURE_WP_ASYNC registration. All required Kconfig options (PROC_PAGE_MONITOR, PTE_MARKER_UFFD_WP) are default-y in distro kernels.\\nUI:N - The attacker drives the ioctl and the racing writes entirely from its own threads with no victim action required; when targeting another mm the victim\u0027s pre-existing uffd-wp-async registration is passive state, not an interaction.\\nS:U - The lost PTE bits corrupt memory managed by the same kernel that contains the flaw, with no crossing of a hypervisor, IOMMU, or sandbox boundary. This is the standard unchanged-scope case for a kernel memory-management defect.\\nC:L - Discarding the dirty bit causes a page\u0027s rewritten contents to be dropped and the stale swap-slot contents to be resurrected, so data a process deliberately overwrote or scrubbed (keys, credentials) persists in memory and on the swap device instead of being erased. This is a bounded exposure of previously-written data rather than an arbitrary kernel read primitive.\\nI:H - Loss of the dirty bit makes the kernel silently drop modified pages \\u2014 swap-cached anonymous pages revert to stale contents and MADV_FREE pages are discarded to zeros via the try_to_unmap_one discard path \\u2014 with no error to the application. The attacker can repeat this across an unbounded number of pages, including in another process\u0027s mm it can ptrace-read (e.g. a CRIU- or VMM-managed workload using uffd-wp-async dirty tracking), amounting to total loss of integrity of that memory.\\nA:H - Pages silently reverting to stale swap contents or being zeroed out corrupts live program state and reliably renders the affected process \\u2014 including a targeted uffd-wp-async user such as a checkpoint/restore agent or live-migration VMM and its guest \\u2014 non-functional or crashed. The condition is repeatable at will by an unprivileged local user.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"52526ca7fdb905a768a93f8faa418e9b988fc34b\", \"lessThan\": \"74b3d66f91d9f539f99faad74d796fa9a389a015\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"52526ca7fdb905a768a93f8faa418e9b988fc34b\", \"lessThan\": \"c70dce4982ce1718bf978a35f8e26160b82081f4\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/proc/task_mmu.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.7\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.7\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.8.10\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.8.*\"}, {\"status\": \"unaffected\", \"version\": \"6.9\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/proc/task_mmu.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/74b3d66f91d9f539f99faad74d796fa9a389a015\"}, {\"url\": \"https://git.kernel.org/stable/c/c70dce4982ce1718bf978a35f8e26160b82081f4\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nfs/proc/task_mmu: fix loss of young/dirty bits during pagemap scan\\n\\nmake_uffd_wp_pte() was previously doing:\\n\\n  pte = ptep_get(ptep);\\n  ptep_modify_prot_start(ptep);\\n  pte = pte_mkuffd_wp(pte);\\n  ptep_modify_prot_commit(ptep, pte);\\n\\nBut if another thread accessed or dirtied the pte between the first 2\\ncalls, this could lead to loss of that information.  Since\\nptep_modify_prot_start() gets and clears atomically, the following is the\\ncorrect pattern and prevents any possible race.  Any access after the\\nfirst call would see an invalid pte and cause a fault:\\n\\n  pte = ptep_modify_prot_start(ptep);\\n  pte = pte_mkuffd_wp(pte);\\n  ptep_modify_prot_commit(ptep, pte);\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.8.10\", \"versionStartIncluding\": \"6.7\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.9\", \"versionStartIncluding\": \"6.7\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T11:32:11.488Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-36943\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-05T11:32:11.488Z\", \"dateReserved\": \"2024-05-30T15:25:07.073Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-05-30T15:35:42.119Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…