CVE-2026-98918 (GCVE-0-2026-98918)

Vulnerability from cvelistv5 – Published: 2026-10-23 12:01 – Updated: 2026-10-23 12:05
VLAI
Title
mm/damon/ops-common: use a page-aligned address in damon_ptep_mkold()
Summary
In the Linux kernel, the following vulnerability has been resolved: mm/damon/ops-common: use a page-aligned address in damon_ptep_mkold() __damon_va_prepare_access_check() picks a random byte address within the region and stores it in r->sampling_addr. damon_va_mkold() passes it into a page table walk, which hands it to damon_ptep_mkold() as the address of the page to sample: damon_va_mkold(mm, r->sampling_addr) damon_va_walk_page_range(mm, addr, addr + 1) damon_mkold_pmd_entry() damon_ptep_mkold(pte, vma, addr) ptep_test_and_clear_young(vma, addr, pte) mmu_notifier_clear_young(mm, addr, addr + PAGE_SIZE) For arm64, before commit 6f0e1142173a ("arm64: mm: support batch clearing of the young flag for large folios"), the contpte helper walked exactly CONT_PTES entries from the aligned-down page table pointer and used @addr only to pass down to each entry, so an unaligned value was harmless: ptep = contpte_align_down(ptep); addr = ALIGN_DOWN(addr, CONT_PTE_SIZE); for (i = 0; i < CONT_PTES; i++, ptep++, addr += PAGE_SIZE) Now the range to walk is derived from @addr instead: end = addr + nr * PAGE_SIZE, rounded up to CONT_PTE_SIZE. For a sample in the last page of a contpte block, the sub-page offset puts end just past the block boundary, so the round-up lands a whole block further and the walk clears PTE_AF in CONT_PTES entries beyond the sampled block. For the last block in a page table page, those entries are past the end of that page, so the walk writes into the page that follows. Triggered by the full 7.1/7.2 kernel selftest suite on arm64 (EC2 c/m6g.4xlarge). The kernel sometimes crashes at or shortly after the DAMON test. What the overrun does depends on the page that happens to follow the page table, so there is no single signature. If that page is read-only, the write faults in the sampling path itself: Unable to handle kernel write to read-only memory at virtual address ffff0003c5d2d000 FSC = 0x0f: level 3 permission fault CM = 0, WnR = 1, TnD = 0, TagAccess = 0 CPU: 10 UID: 0 PID: 3487 Comm: kdamond.2 pc : contpte_test_and_clear_young_ptes+0x70/0xc0 lr : damon_ptep_mkold+0x1e8/0x1f8 Call trace: contpte_test_and_clear_young_ptes+0x70/0xc0 (P) damon_mkold_pmd_entry+0x150/0x170 walk_pmd_range+0x110/0x2b0 walk_pud_range+0x10c/0x208 walk_pgd_range+0x134/0x258 __walk_page_range+0x98/0x1b0 walk_page_range_vma_unsafe+0x90/0x148 walk_page_range_vma+0x28/0x40 damon_va_walk_page_range+0x114/0x2b8 damon_va_prepare_access_checks+0xec/0x1a8 kdamond_fn+0x534/0x770 kthread+0x128/0x138 ret_from_fork+0x10/0x20 Otherwise the page is writable, the PTE_AF clearing succeeds silently and the damage only surfaces later, in whatever happened to own the page, so the backtrace is unrelated to DAMON and differs between runs. Pass a page-aligned address to the ptep_test_and_clear_young() call in damon_ptep_mkold(), which is the only place DAMON can reach contpte_test_and_clear_young_ptes() from. Nothing else sees the aligned address, and r->sampling_addr itself is left as is, so the sampling and region bookkeeping semantics are unchanged.
Severity
No CVSS data available.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 7061 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 6f0e1142173a54b8a18c59fc3cbae3b31ee423d9 , < d5208de0799c506d3315b6f96d034c38e4509dbb (git)
Affected: 6f0e1142173a54b8a18c59fc3cbae3b31ee423d9 , < f166586f74dd5d9cbadaabf86ef81c8ddf6cafa7 (git)
guessed Create a notification for this product.
Linux Linux Affected: 7.0
Unaffected: 0 , < 7.0 (semver)
Unaffected: 7.2.9 , ≤ 7.2.* (semver)
Unaffected: 7.3 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "mm/damon/ops-common.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "d5208de0799c506d3315b6f96d034c38e4509dbb",
              "status": "affected",
              "version": "6f0e1142173a54b8a18c59fc3cbae3b31ee423d9",
              "versionType": "git"
            },
            {
              "lessThan": "f166586f74dd5d9cbadaabf86ef81c8ddf6cafa7",
              "status": "affected",
              "version": "6f0e1142173a54b8a18c59fc3cbae3b31ee423d9",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "mm/damon/ops-common.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "7.0"
            },
            {
              "lessThan": "7.0",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.9",
                  "versionStartIncluding": "7.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3",
                  "versionStartIncluding": "7.0",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/damon/ops-common: use a page-aligned address in damon_ptep_mkold()\n\n__damon_va_prepare_access_check() picks a random byte address within the\nregion and stores it in r-\u003esampling_addr.  damon_va_mkold() passes it into\na page table walk, which hands it to damon_ptep_mkold() as the address of\nthe page to sample:\n\n  damon_va_mkold(mm, r-\u003esampling_addr)\n    damon_va_walk_page_range(mm, addr, addr + 1)\n      damon_mkold_pmd_entry()\n        damon_ptep_mkold(pte, vma, addr)\n          ptep_test_and_clear_young(vma, addr, pte)\n          mmu_notifier_clear_young(mm, addr, addr + PAGE_SIZE)\n\nFor arm64, before commit 6f0e1142173a (\"arm64: mm: support batch clearing\nof the young flag for large folios\"), the contpte helper walked exactly\nCONT_PTES entries from the aligned-down page table pointer and used @addr\nonly to pass down to each entry, so an unaligned value was harmless:\n\n        ptep = contpte_align_down(ptep);\n        addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);\n        for (i = 0; i \u003c CONT_PTES; i++, ptep++, addr += PAGE_SIZE)\n\nNow the range to walk is derived from @addr instead: end = addr + nr *\nPAGE_SIZE, rounded up to CONT_PTE_SIZE.  For a sample in the last page of\na contpte block, the sub-page offset puts end just past the block\nboundary, so the round-up lands a whole block further and the walk clears\nPTE_AF in CONT_PTES entries beyond the sampled block.  For the last block\nin a page table page, those entries are past the end of that page, so the\nwalk writes into the page that follows.\n\nTriggered by the full 7.1/7.2 kernel selftest suite on arm64 (EC2\nc/m6g.4xlarge).  The kernel sometimes crashes at or shortly after the\nDAMON test.\n\nWhat the overrun does depends on the page that happens to follow the page\ntable, so there is no single signature.  If that page is read-only, the\nwrite faults in the sampling path itself:\n\n  Unable to handle kernel write to read-only memory at virtual address ffff0003c5d2d000\n    FSC = 0x0f: level 3 permission fault\n    CM = 0, WnR = 1, TnD = 0, TagAccess = 0\n  CPU: 10 UID: 0 PID: 3487 Comm: kdamond.2\n  pc : contpte_test_and_clear_young_ptes+0x70/0xc0\n  lr : damon_ptep_mkold+0x1e8/0x1f8\n  Call trace:\n   contpte_test_and_clear_young_ptes+0x70/0xc0 (P)\n   damon_mkold_pmd_entry+0x150/0x170\n   walk_pmd_range+0x110/0x2b0\n   walk_pud_range+0x10c/0x208\n   walk_pgd_range+0x134/0x258\n   __walk_page_range+0x98/0x1b0\n   walk_page_range_vma_unsafe+0x90/0x148\n   walk_page_range_vma+0x28/0x40\n   damon_va_walk_page_range+0x114/0x2b8\n   damon_va_prepare_access_checks+0xec/0x1a8\n   kdamond_fn+0x534/0x770\n   kthread+0x128/0x138\n   ret_from_fork+0x10/0x20\n\nOtherwise the page is writable, the PTE_AF clearing succeeds silently and\nthe damage only surfaces later, in whatever happened to own the page, so\nthe backtrace is unrelated to DAMON and differs between runs.\n\nPass a page-aligned address to the ptep_test_and_clear_young() call in\ndamon_ptep_mkold(), which is the only place DAMON can reach\ncontpte_test_and_clear_young_ptes() from.  Nothing else sees the aligned\naddress, and r-\u003esampling_addr itself is left as is, so the sampling and\nregion bookkeeping semantics are unchanged."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-23T12:05:05.149Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/d5208de0799c506d3315b6f96d034c38e4509dbb"
        },
        {
          "url": "https://git.kernel.org/stable/c/f166586f74dd5d9cbadaabf86ef81c8ddf6cafa7"
        }
      ],
      "title": "mm/damon/ops-common: use a page-aligned address in damon_ptep_mkold()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-98918",
    "datePublished": "2026-10-23T12:01:50.803Z",
    "dateReserved": "2026-09-25T10:25:14.380Z",
    "dateUpdated": "2026-10-23T12:05:05.149Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "mm/damon/ops-common.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "d5208de0799c506d3315b6f96d034c38e4509dbb",
                    "status": "affected",
                    "version": "6f0e1142173a54b8a18c59fc3cbae3b31ee423d9",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "f166586f74dd5d9cbadaabf86ef81c8ddf6cafa7",
                    "status": "affected",
                    "version": "6f0e1142173a54b8a18c59fc3cbae3b31ee423d9",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "mm/damon/ops-common.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "7.0"
                  },
                  {
                    "lessThan": "7.0",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "7.2.*",
                    "status": "unaffected",
                    "version": "7.2.9",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "7.3",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/damon/ops-common: use a page-aligned address in damon_ptep_mkold()\n\n__damon_va_prepare_access_check() picks a random byte address within the\nregion and stores it in r-\u003esampling_addr.  damon_va_mkold() passes it into\na page table walk, which hands it to damon_ptep_mkold() as the address of\nthe page to sample:\n\n  damon_va_mkold(mm, r-\u003esampling_addr)\n    damon_va_walk_page_range(mm, addr, addr + 1)\n      damon_mkold_pmd_entry()\n        damon_ptep_mkold(pte, vma, addr)\n          ptep_test_and_clear_young(vma, addr, pte)\n          mmu_notifier_clear_young(mm, addr, addr + PAGE_SIZE)\n\nFor arm64, before commit 6f0e1142173a (\"arm64: mm: support batch clearing\nof the young flag for large folios\"), the contpte helper walked exactly\nCONT_PTES entries from the aligned-down page table pointer and used @addr\nonly to pass down to each entry, so an unaligned value was harmless:\n\n        ptep = contpte_align_down(ptep);\n        addr = ALIGN_DOWN(addr, CONT_PTE_SIZE);\n        for (i = 0; i \u003c CONT_PTES; i++, ptep++, addr += PAGE_SIZE)\n\nNow the range to walk is derived from @addr instead: end = addr + nr *\nPAGE_SIZE, rounded up to CONT_PTE_SIZE.  For a sample in the last page of\na contpte block, the sub-page offset puts end just past the block\nboundary, so the round-up lands a whole block further and the walk clears\nPTE_AF in CONT_PTES entries beyond the sampled block.  For the last block\nin a page table page, those entries are past the end of that page, so the\nwalk writes into the page that follows.\n\nTriggered by the full 7.1/7.2 kernel selftest suite on arm64 (EC2\nc/m6g.4xlarge).  The kernel sometimes crashes at or shortly after the\nDAMON test.\n\nWhat the overrun does depends on the page that happens to follow the page\ntable, so there is no single signature.  If that page is read-only, the\nwrite faults in the sampling path itself:\n\n  Unable to handle kernel write to read-only memory at virtual address ffff0003c5d2d000\n    FSC = 0x0f: level 3 permission fault\n    CM = 0, WnR = 1, TnD = 0, TagAccess = 0\n  CPU: 10 UID: 0 PID: 3487 Comm: kdamond.2\n  pc : contpte_test_and_clear_young_ptes+0x70/0xc0\n  lr : damon_ptep_mkold+0x1e8/0x1f8\n  Call trace:\n   contpte_test_and_clear_young_ptes+0x70/0xc0 (P)\n   damon_mkold_pmd_entry+0x150/0x170\n   walk_pmd_range+0x110/0x2b0\n   walk_pud_range+0x10c/0x208\n   walk_pgd_range+0x134/0x258\n   __walk_page_range+0x98/0x1b0\n   walk_page_range_vma_unsafe+0x90/0x148\n   walk_page_range_vma+0x28/0x40\n   damon_va_walk_page_range+0x114/0x2b8\n   damon_va_prepare_access_checks+0xec/0x1a8\n   kdamond_fn+0x534/0x770\n   kthread+0x128/0x138\n   ret_from_fork+0x10/0x20\n\nOtherwise the page is writable, the PTE_AF clearing succeeds silently and\nthe damage only surfaces later, in whatever happened to own the page, so\nthe backtrace is unrelated to DAMON and differs between runs.\n\nPass a page-aligned address to the ptep_test_and_clear_young() call in\ndamon_ptep_mkold(), which is the only place DAMON can reach\ncontpte_test_and_clear_young_ptes() from.  Nothing else sees the aligned\naddress, and r-\u003esampling_addr itself is left as is, so the sampling and\nregion bookkeeping semantics are unchanged."
          }
        ],
        "id": "CVE-2026-98918",
        "lastModified": "2026-10-23T13:17:12.360",
        "metrics": {},
        "published": "2026-10-23T13:17:12.360",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/d5208de0799c506d3315b6f96d034c38e4509dbb"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/f166586f74dd5d9cbadaabf86ef81c8ddf6cafa7"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Received"
      }
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.