{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-72043",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-72043"
  ],
  "published": "2026-08-15T06:04:33Z",
  "summary": "LoongArch: Fix missing dirty page tracking in {pte,pmd}_wrprotect()",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nLoongArch: Fix missing dirty page tracking in {pte,pmd}_wrprotect()\n\nWhen hardware page table walker (PTW) is enabled on LoongArch, the CPU\nmay set _PAGE_DIRTY directly in the page table entry during a write TLB\nmiss, without going through the software TLB store handler. The software\nTLB store handler (tlbex.S:254) sets both _PAGE_DIRTY and_PAGE_MODIFIED\ntogether:\n\n    ori t0, t0, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED)\n\nSince hardware PTW only sets _PAGE_DIRTY, the software-only bit, i.e.\n_PAGE_MODIFIED is left unchanged. This creates a window where a PTE has\n_PAGE_DIRTY set (hardware knows the page is dirty) but _PAGE_MODIFIED\nclear (software is unaware).\n\nWhen fork()/clone() triggers copy-on-write, __copy_present_ptes() calls\npte_wrprotect(), which unconditionally clears both the _PAGE_WRITE and\n_PAGE_DIRTY bits:\n\n    pte_val(pte) &= ~(_PAGE_WRITE | _PAGE_DIRTY);\n\nSince _PAGE_MODIFIED was never set, the dirtiness information is lost\ncompletely. Subsequently, when memory pressure triggers page reclaim,\npage_mkclean() / try_to_unmap() sees the page as clean (i.e. pte_dirty()\nreturns false) and the page may be freed without writeback, causing data\ncorruption.\n\nFix this by propagating the _PAGE_DIRTY bit to the _PAGE_MODIFIED bit in\nboth pte_wrprotect() and pmd_wrprotect() before clearing writeable bits:\n\n    if (pte_val(pte) & _PAGE_DIRTY)\n        pte_val(pte) |= _PAGE_MODIFIED;\n\nThe pmd_wrprotect() fix handles the CONFIG_TRANSPARENT_HUGEPAGE case,\nwhere pmd entries need the same treatment.\n\nThis ensures the software dirty tracking bit (checked by pte_dirty() and\npmd_dirty(), which read both the _PAGE_DIRTY and _PAGE_MODIFIED bits) is\npreserved across fork COW write-protection.\n\nThe issue was found by the LTP madvise09 test case, which exercises page\nreclaim after \"madvise(MADV_FREE), write and fork\" operation sequence on\nprivate anonymous mappings.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.178",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-72043"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/76f88650763a35cbf1384c65d66d096fa31cc58d"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e8a916579e427af32f2de8213dfa23c5df6e6664"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/39bb21a4bff0d70058bf752d7b5aa2e2ccc864a9"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/a65f49b6f7ece756394f8f0e85570020e7fd0e35"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/e483da960892c41fa7f0cf0d2fc2410d65a483d6"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/018e9828eb523c638fa3d9bdf0fd4956b74555b2"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-17T05:50:24Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.1,
      "cvss_v3_severity": "High",
      "scenario": "AV:L - The bug is triggered via local syscalls (mmap/madvise/write/fork or clone) through dup_mmap()->copy_page_range()->pte_wrprotect() on LoongArch; it is not reachable from network-facing kernel services.\nAC:L - An unprivileged attacker can reliably reproduce the LTP madvise09 sequence (MADV_FREE, write, fork, then force reclaim) on LoongArch CPUs with hardware PTW; no races or victim-specific state beyond attacker-controlled memory pressure are required.\nPR:L - No special capabilities are needed; any local user can create private anonymous or file-backed COW mappings, write them, fork, and drive page reclaim using standard unprivileged syscalls.\nUI:N - Exploitation requires no action from another user; the attacker controls the full trigger sequence in their own process or in a service worker they operate.\nS:U - Impact is confined to kernel memory-management integrity on the host; it does not constitute a VM escape, sandbox escape, or IOMMU/DMA boundary bypass.\nC:H - Incorrectly treating hardware-dirty pages as clean during reclaim can free page frames without writeback or swap, leaving prior contents in the buddy allocator for reuse by other mappings and enabling cross-process information disclosure.\nI:H - Lost dirty tracking causes silent discard of modified pages during reclaim without writeback, corrupting private anonymous data and file-backed COW mappings when dirty pages are freed or swapped incorrectly.\nA:N - The defect causes silent data corruption rather than kernel oops, panic, or hang; the system remains operational even when pages are incorrectly reclaimed."
    }
  }
}
