CVE-2026-99477 (GCVE-0-2026-99477)

Vulnerability from cvelistv5 – Published: 2026-11-19 14:43 – Updated: 2026-11-22 11:08
VLAI
Title
fs/proc/task_mmu: pin mm_users in do_pagemap_scan()
Summary
In the Linux kernel, the following vulnerability has been resolved: fs/proc/task_mmu: pin mm_users in do_pagemap_scan() The PAGEMAP_SCAN ioctl takes mmap_read_lock() on an mm obtained from /proc/<pid>/pagemap without holding a reference to mm_users. proc_mem_open() deliberately grabs only mm_count, so a consumer that touches the address space has to call mmget_not_zero() first. Every other consumer in this file does -- m_start(), do_procmap_query(), show_smaps_rollup() and pagemap_read() -- but do_pagemap_scan() does not. Without that reference the target can reach exit_mmap() concurrently, and exit_mmap() calls unmap_vmas() while holding mmap_lock only for reading, which does not exclude the scanner. For ordinary VMAs this is harmless, as free_pgtables() and remove_vma() run afterwards under mmap_write_lock. A shared hugetlb VMA is different: __hugetlb_zap_end() frees the VMA's hugetlb_vma_lock inside the read-locked phase. walk_hugetlb_range() can therefore load vma->vm_private_data, have the lock freed underneath it, and then down_read() a freed rw_semaphore. The load happens before the freeing side clears the pointer, so this is a use-after-free and not a NULL dereference. Any unprivileged user can reach it with no huge pages configured, as hugetlb_reserve_pages() allocates the lock before the VM_NORESERVE early return. Pin mm_users across the scan, the way the other consumers do. mmput() from the exiting task can then no longer reach exit_mmap() while a walk is in progress. [akpm@linux-foundation.org: remove unneeded & undesirable test for !mm]
Impacted products
Vendor Product Version
Linux Linux Affected: 52526ca7fdb905a768a93f8faa418e9b988fc34b , < 6e2299a9356de3364e193d6eaf123b90d7698c1d (git)
Affected: 52526ca7fdb905a768a93f8faa418e9b988fc34b , < abc9c0f4f850d23e55f4230cd0f54938a64267bf (git)
Affected: 52526ca7fdb905a768a93f8faa418e9b988fc34b , < 14a853bf3e6f0dd62ff479a36613411237dec24c (git)
Affected: 52526ca7fdb905a768a93f8faa418e9b988fc34b , < 4fb975471717c953f912776bb60301add1ffae11 (git)
Create a notification for this product.
Linux Linux Affected: 6.7
Unaffected: 0 , < 6.7 (semver)
Unaffected: 6.12.117 , ≤ 6.12.* (semver)
Unaffected: 6.18.61 , ≤ 6.18.* (semver)
Unaffected: 7.3.2 , ≤ 7.3.* (semver)
Unaffected: 7.4-rc1 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "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": "6e2299a9356de3364e193d6eaf123b90d7698c1d",
              "status": "affected",
              "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
              "versionType": "git"
            },
            {
              "lessThan": "abc9c0f4f850d23e55f4230cd0f54938a64267bf",
              "status": "affected",
              "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
              "versionType": "git"
            },
            {
              "lessThan": "14a853bf3e6f0dd62ff479a36613411237dec24c",
              "status": "affected",
              "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
              "versionType": "git"
            },
            {
              "lessThan": "4fb975471717c953f912776bb60301add1ffae11",
              "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.12.*",
              "status": "unaffected",
              "version": "6.12.117",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.61",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.117",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.61",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3.2",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.4-rc1",
                  "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: pin mm_users in do_pagemap_scan()\n\nThe PAGEMAP_SCAN ioctl takes mmap_read_lock() on an mm obtained from\n/proc/\u003cpid\u003e/pagemap without holding a reference to mm_users.\n\nproc_mem_open() deliberately grabs only mm_count, so a consumer that\ntouches the address space has to call mmget_not_zero() first.  Every other\nconsumer in this file does -- m_start(), do_procmap_query(),\nshow_smaps_rollup() and pagemap_read() -- but do_pagemap_scan() does not.\n\nWithout that reference the target can reach exit_mmap() concurrently, and\nexit_mmap() calls unmap_vmas() while holding mmap_lock only for reading,\nwhich does not exclude the scanner.  For ordinary VMAs this is harmless,\nas free_pgtables() and remove_vma() run afterwards under mmap_write_lock. \nA shared hugetlb VMA is different: __hugetlb_zap_end() frees the VMA\u0027s\nhugetlb_vma_lock inside the read-locked phase.\n\nwalk_hugetlb_range() can therefore load vma-\u003evm_private_data, have the\nlock freed underneath it, and then down_read() a freed rw_semaphore.  The\nload happens before the freeing side clears the pointer, so this is a\nuse-after-free and not a NULL dereference.  Any unprivileged user can\nreach it with no huge pages configured, as hugetlb_reserve_pages()\nallocates the lock before the VM_NORESERVE early return.\n\nPin mm_users across the scan, the way the other consumers do.  mmput()\nfrom the exiting task can then no longer reach exit_mmap() while a walk is\nin progress.\n\n[akpm@linux-foundation.org: remove unneeded \u0026 undesirable test for !mm]"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - PAGEMAP_SCAN is issued through do_pagemap_cmd() on a /proc/\u003cpid\u003e/pagemap fd opened by pagemap_open(). do_pagemap_scan() walks that mm without mmget_not_zero(), so the triggering action is a local ioctl racing the target task\u0027s exit_mmap().\nAC:L - The attacker mmap()s MAP_SHARED|MAP_HUGETLB|MAP_NORESERVE, so hugetlb_reserve_pages() calls hugetlb_vma_lock_alloc() and returns on VMA_NORESERVE with no hugepage pool, then overlaps walk_hugetlb_range() with that task\u0027s exit_mmap(). Both tasks are the attacker\u0027s.\nPR:L - /proc/\u003cpid\u003e/pagemap is mode S_IRUSR. pagemap_open() reaches proc_mem_open() with PTRACE_MODE_READ, which __ptrace_may_access() grants to the same uid, and Yama applies its ptrace_scope check only to PTRACE_MODE_ATTACH. do_pagemap_cmd() has no capability check.\nUI:N - The attacker creates the shared hugetlb VMA, opens that task\u0027s pagemap, issues PAGEMAP_SCAN, and exits the task. Exploitation is entirely the attacker\u0027s own syscalls.\nS:U - The use-after-free frees the scanned task\u0027s hugetlb_vma_lock in the kernel that runs do_pagemap_scan(). The corruption remains inside that kernel security authority.\nC:H - hugetlb_vma_lock_read() holds the vma-\u003evm_private_data pointer and down_read()s it after __hugetlb_vma_unlock_write_put() has kref_put() that hugetlb_vma_lock into kfree() in hugetlb_vma_lock_release(). rwsem_down_read_slowpath() then loads sem-\u003efirst_waiter from the reclaimed object and list_add_tail() reads through it.\nI:H - rwsem_read_trylock() atomic_long_add_return_acquire()s RWSEM_READER_BIAS into the freed rw_semaphore count, and rwsem_down_read_slowpath() list_add_tail()s a waiter through sem-\u003efirst_waiter. Reclaiming the hugetlb_vma_lock turns those stores into a kernel write.\nA:H - down_read() on the kfree\u0027d hugetlb_vma_lock rw_semaphore dereferences a poisoned or reused slab object, and the slow path can sleep uninterruptibly in rwsem_down_read_slowpath(). That oopses or hangs the kernel, and the attacker can retry against a new task."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-11-22T11:08:33.584Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/6e2299a9356de3364e193d6eaf123b90d7698c1d"
        },
        {
          "url": "https://git.kernel.org/stable/c/abc9c0f4f850d23e55f4230cd0f54938a64267bf"
        },
        {
          "url": "https://git.kernel.org/stable/c/14a853bf3e6f0dd62ff479a36613411237dec24c"
        },
        {
          "url": "https://git.kernel.org/stable/c/4fb975471717c953f912776bb60301add1ffae11"
        }
      ],
      "title": "fs/proc/task_mmu: pin mm_users in do_pagemap_scan()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-99477",
    "datePublished": "2026-11-19T14:43:11.195Z",
    "dateReserved": "2026-09-25T10:25:14.417Z",
    "dateUpdated": "2026-11-22T11:08:33.584Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-99477",
      "date": "2026-11-22",
      "epss": "0.00168",
      "percentile": "0.06224"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "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": "6e2299a9356de3364e193d6eaf123b90d7698c1d",
                    "status": "affected",
                    "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "abc9c0f4f850d23e55f4230cd0f54938a64267bf",
                    "status": "affected",
                    "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "14a853bf3e6f0dd62ff479a36613411237dec24c",
                    "status": "affected",
                    "version": "52526ca7fdb905a768a93f8faa418e9b988fc34b",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "4fb975471717c953f912776bb60301add1ffae11",
                    "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.12.*",
                    "status": "unaffected",
                    "version": "6.12.117",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.18.*",
                    "status": "unaffected",
                    "version": "6.18.61",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "7.3.*",
                    "status": "unaffected",
                    "version": "7.3.2",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "7.4-rc1",
                    "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\nfs/proc/task_mmu: pin mm_users in do_pagemap_scan()\n\nThe PAGEMAP_SCAN ioctl takes mmap_read_lock() on an mm obtained from\n/proc/\u003cpid\u003e/pagemap without holding a reference to mm_users.\n\nproc_mem_open() deliberately grabs only mm_count, so a consumer that\ntouches the address space has to call mmget_not_zero() first.  Every other\nconsumer in this file does -- m_start(), do_procmap_query(),\nshow_smaps_rollup() and pagemap_read() -- but do_pagemap_scan() does not.\n\nWithout that reference the target can reach exit_mmap() concurrently, and\nexit_mmap() calls unmap_vmas() while holding mmap_lock only for reading,\nwhich does not exclude the scanner.  For ordinary VMAs this is harmless,\nas free_pgtables() and remove_vma() run afterwards under mmap_write_lock. \nA shared hugetlb VMA is different: __hugetlb_zap_end() frees the VMA\u0027s\nhugetlb_vma_lock inside the read-locked phase.\n\nwalk_hugetlb_range() can therefore load vma-\u003evm_private_data, have the\nlock freed underneath it, and then down_read() a freed rw_semaphore.  The\nload happens before the freeing side clears the pointer, so this is a\nuse-after-free and not a NULL dereference.  Any unprivileged user can\nreach it with no huge pages configured, as hugetlb_reserve_pages()\nallocates the lock before the VM_NORESERVE early return.\n\nPin mm_users across the scan, the way the other consumers do.  mmput()\nfrom the exiting task can then no longer reach exit_mmap() while a walk is\nin progress.\n\n[akpm@linux-foundation.org: remove unneeded \u0026 undesirable test for !mm]"
          }
        ],
        "id": "CVE-2026-99477",
        "lastModified": "2026-11-22T11:16:53.720",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2026-11-19T15:18:02.257",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/14a853bf3e6f0dd62ff479a36613411237dec24c"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/4fb975471717c953f912776bb60301add1ffae11"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/6e2299a9356de3364e193d6eaf123b90d7698c1d"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/abc9c0f4f850d23e55f4230cd0f54938a64267bf"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Received"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Important",
      "current_release_date": "2026-11-22T11:31:15+00:00",
      "cve": "CVE-2026-99477",
      "id": "CVE-2026-99477",
      "initial_release_date": "2026-11-19T14:43:11.195000+00:00",
      "product_status:known_affected": "16",
      "product_status:known_not_affected": "188",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: kernel: privilege escalation via use-after-free in pagemap scan",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-99477.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

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.

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.


Loading…