CVE-2026-99477: Linux kernel PAGEMAP_SCAN takes a freed hugetlb lock when the scanned process exits

ByLinuxtastic

November 30, 2026 #CVE, #Linux Kernel

/proc/<pid>/pagemap lets a process inspect the page tables of a process it is allowed to read, and since kernel 6.7 the PAGEMAP_SCAN ioctl on it walks a range of that address space in one call. Opening the file takes a reference on the target’s memory descriptor but, by design, not on its users count, so “a consumer that touches the address space has to call mmget_not_zero() first”. Every other consumer in fs/proc/task_mmu.c does; do_pagemap_scan() did not. The target can therefore exit while the scan is running, and for a shared hugetlb mapping the exit path frees the VMA’s hugetlb_vma_lock under only a read lock, so the walker loads the lock pointer, has the lock freed beneath it, and “then down_read() a freed rw_semaphore”. The record says “any unprivileged user can reach it with no huge pages configured”. Upgrade to a kernel at or above 6.12.117, 6.18.61 or 7.3.2 and reboot; kernels before 6.7 do not have the ioctl and are not affected.

CVE-2026-99477 at a glance.

ComponentLinux kernel, the PAGEMAP_SCAN ioctl on /proc/<pid>/pagemap: do_pagemap_scan() in fs/proc/task_mmu.c, walking into walk_hugetlb_range(); built into every kernel with CONFIG_PROC_FS and CONFIG_HUGETLBFS, which is all distribution kernels
Affected versionsmainline 6.7 up to 7.4-rc1 (from commit 52526ca7, which added the ioctl); 6.12.x below 6.12.117, 6.18.x below 6.18.61, 7.3.x below 7.3.2. Kernels before 6.7, including every 6.1 and 6.6 distribution kernel, are not affected
Fixed inmainline 7.4-rc1 (commit 4fb97547) and stable 6.12.117, 6.18.61, 7.3.2; the fix pins mm_users across the scan “the way the other consumers do”, so that mmput() from the exiting task can no longer reach exit_mmap() while a walk is in progress
Severitykernel CNA CVSS 3.1 7.8 High (AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H); NVD Received with no score of its own. Red Hat Important, 7.8, CWE-825; Ubuntu High, 7.8; SUSE important, 7.8 and CVSS 4.0 8.5
Exploited in the wildNot on CISA’s Known Exploited Vulnerabilities list as of 30 November 2026 (catalogue 2026.11.27). EPSS 0.0023 (8th percentile) on 30 November 2026
Who is exposedany host on a 6.7 or newer kernel where an untrusted local user or container process can run. The attacker needs a target process it may read the pagemap of, which its own child is, a shared hugetlb mapping in that target, which mmap(MAP_HUGETLB|MAP_SHARED) or a memfd with MFD_HUGETLB gives it without any huge pages being reserved on the system, and the timing to scan while the target exits. Red Hat’s statement names multi-tenant and shared hosts as the concern
PublishedCVE record 19 November 2026 (kernel CNA); this page built 30 November 2026, last updated 30 November 2026

What it is

A process’s memory descriptor, the mm_struct, carries two counts. mm_count keeps the structure itself alive; mm_users keeps the address space alive, and when it reaches zero exit_mmap() tears the mappings down. proc_mem_open(), which backs the /proc/<pid>/ memory files, “deliberately grabs only mm_count“, so anything that then walks the page tables has to take its own mm_users reference with mmget_not_zero(); the record lists the consumers that do, m_start(), do_procmap_query(), show_smaps_rollup() and pagemap_read(), and the one that does not. Without the reference, “the target can reach exit_mmap() concurrently”, and the scanner’s mmap_read_lock() does not exclude it, because the first phase of exit_mmap() runs unmap_vmas() under the same read lock.

For an ordinary mapping that is harmless, since the VMAs themselves are only freed later under the write lock. A shared hugetlb mapping is different: “__hugetlb_zap_end() frees the VMA’s hugetlb_vma_lock inside the read-locked phase”. The walker in walk_hugetlb_range() loads vma->vm_private_data, the exiting side frees the lock it points to, and the walker calls down_read() on a freed semaphore. The record is careful about why that is a use-after-free rather than a null dereference, “the load happens before the freeing side clears the pointer”, and about why no privilege or configuration is needed: hugetlb_reserve_pages() allocates the lock “before the VM_NORESERVE early return”, so a shared hugetlb VMA has one even on a machine with no huge pages reserved.

The fix is the missing line: pin mm_users for the duration of the scan, as the sibling functions do, with a small cleanup from Andrew Morton. Only kernels from 6.7 have the ioctl, which is why Ubuntu’s 24.04 kernel (6.8) is listed as vulnerable while 22.04 (5.15) is not, and why Debian bookworm’s 6.1 kernel and SLE 15’s 6.4 kernel are marked not affected by their trackers.

Who is affected on Linux

Each row is what the distribution’s own security tracker said on 30 November 2026; the link in the row is the tracker page, which will be newer than this one.

DistributionStatusFixed package
AlpineTracker unreachable on 30 November 2026—
Debianbookworm’s 6.1 kernel not affected (“vulnerable code not present”); fixed in trixie, forky, sid and bookworm’s linux-6.12 (DLA-4927-1)trixie 6.12.117-1 (6.12.118-1 in security); bookworm linux-6.12 6.12.117-1~deb12u1; forky 7.3.5-1; sid 7.3.6-1
UbuntuHigh, 7.8; 24.04, 26.04 and 26.10 vulnerable, fix “work in progress” for 26.04 and 26.10; 22.04 and older not affected (last updated 25 November)26.10 7.3.0-12.13 and 26.04 7.0.0-45.45 pending; nothing for 24.04 on 30 November 2026
RHEL, Rocky, Alma, CentOS StreamImportant, 7.8, CWE-825, scores marked preliminary; the per-product table did not render for our reader on 30 November 2026. SUSE’s Liberty Linux 10 row cites RHSA-2026:102253 with kernel 6.12.0-264.20.1.el10_3, which points at RHEL 10 as the affected and fixed line; RHEL 9 and 8 kernels predate the ioctlper SUSE’s cross-reference, RHEL 10 kernel-6.12.0-264.20.1.el10_3 (RHSA-2026:102253); not confirmed on Red Hat’s page
openSUSE/SLEimportant, 7.8 / CVSS 4.0 8.5, Pending (bugs 1291700, 1291701); Affected on SLES 16.0/16.1, SLES for SAP 16.x, SL Micro 6.2 and Leap 16.0/16.1; not affected on SLE 15 SP7 and SL Micro 5.4–6.1; released for SUSE Liberty Linux 10Liberty Linux 10 6.12.0-264.20.1.el10_3; nothing else released on 30 November 2026
Fedora, Arch; self-built kernelsNot consulted; upstream stable versions apply6.12.117 / 6.18.61 / 7.3.2 or later

How to check

Two questions, in order: is the kernel 6.7 or newer, and do untrusted users run on the host. There is no configuration question, because the record says the trigger needs no huge pages configured and no privilege beyond reading one’s own child’s pagemap.

# 1. the running kernel: below 6.7 has no PAGEMAP_SCAN and is not affected; 6.12.117, 6.18.61 and 7.3.2 are the fixed stable versions
uname -r
grep -c PAGEMAP_SCAN /usr/include/linux/fs.h 2>/dev/null      # the ioctl exists in the headers from 6.7 (headers may lag the kernel)

# 2. who can run code here: containers and non-root logins are the attacker in this record
docker ps -q 2>/dev/null | wc -l; podman ps -q 2>/dev/null | wc -l
who; awk -F: '$3 >= 1000 && $7 !~ /nologin|false/ {print $1}' /etc/passwd
# hugetlbfs is mounted by default on systemd systems; a process needs no reservation to create a shared hugetlb VMA
findmnt -t hugetlbfs; cat /proc/sys/vm/nr_hugepages

A kernel below 6.7, or at or above the fixed stable version for its series, is done. An affected kernel with untrusted local users or containers is the exposed case, and nr_hugepages being zero does not change that: the record’s point is that the lock is allocated before the reservation check, so a shared hugetlb mapping with nothing behind it is enough. The attacker’s own child process is a valid target for /proc/<pid>/pagemap under the default ptrace_scope, so kernel.yama.ptrace_scope does not close it either.

How to fix it

Install the fixed kernel and reboot; a kernel bug is not patched in place, and the procfs code stays the old code until the machine boots the new image.

# Debian trixie / sid (and bookworm with the linux-6.12 backport kernel)
apt update && apt install linux-image-amd64 && systemctl reboot
# Ubuntu 24.04 / 26.04 / 26.10, RHEL 10, SUSE 16: when the pending builds land
apt update && apt full-upgrade && systemctl reboot
dnf upgrade kernel && systemctl reboot
zypper patch && systemctl reboot
uname -r

There is no switch that removes PAGEMAP_SCAN from a running kernel, and the ioctl is used by legitimate software (checkpoint/restore, some garbage collectors and emulators) so it is not a feature to wish away. What not to do: mounting /proc with hidepid=2 hides other users’ processes, which does nothing against a child of the attacker’s own; and unmounting hugetlbfs does not prevent MAP_HUGETLB or memfd_create(MFD_HUGETLB), which do not go through the mount.

# interim: no mitigation in the kernel; keep untrusted workloads off this node until it is rebooted
kubectl cordon "$(hostname)"
# the signature of an attempt that crashed instead of succeeding is an oops in the hugetlb walk
journalctl -k -b | grep -iE 'walk_hugetlb_range|do_pagemap_scan|hugetlb_vma_lock|down_read|slab-use-after-free' | tail

Sources

  • CVE-2026-99477 at CVE.org — the kernel CNA record (19 November 2026): the commit message with the mechanism and the “any unprivileged user” statement, the git and version ranges, CVSS 3.1 7.8
  • Fix commits on git.kernel.org: 4fb97547 (mainline, 7.4-rc1) and the stable backports 6e2299a9, abc9c0f4 and 14a853bf; the pages refuse automated readers, so the diff was not read for this page
  • NVD entry — Received; no NVD score, CWE or CPE yet
  • Distribution trackers: Debian (bookworm not affected, DLA-4927-1 for linux-6.12) · Ubuntu (High, 22.04 and older not affected) · Red Hat (Important, the multi-tenant statement) · SUSE (important, 16.x affected, Liberty Linux 10 released) · Alpine (unreachable on 30 November)
  • EPSS score for this CVE, 30 November 2026

Related reading

This advisory page was assembled from the primary sources listed above on 30 November 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.