Description
In the Linux kernel, the following vulnerability has been resolved:

mm: fix __vm_normal_page() to handle missing support for pmd_special()/pud_special()

On x86 32-bit with THP enabled, zap_huge_pmd() is seen to generate a
"WARNING: mm/memory.c:735 at __vm_normal_page+0x6a/0x7d", from the
VM_WARN_ON_ONCE(is_zero_pfn(pfn) || is_huge_zero_pfn(pfn)); followed by
"BUG: Bad rss-counter state"s, then later "BUG: Bad page state"s when
reclaim gets to call shrink_huge_zero_folio_scan().

It's as if the _PAGE_SPECIAL bit never got set in the huge_zero pmd: and
indeed, whereas pte_special() and pte_mkspecial() are subject to a
dedicated CONFIG_ARCH_HAS_PTE_SPECIAL, pmd_special() and pmd_mkspecial()
are subject to CONFIG_ARCH_SUPPORTS_PMD_PFNMAP, which is never enabled on
any 32-bit architecture.

While the problem was exposed through commit d80a9cb1a64a
("mm/huge_memory: add and use normal_or_softleaf_folio_pmd()"), it was an
oversight in commit af38538801c6 ("mm/memory: factor out common code from
vm_normal_page_*()") and would result in other problems:
* huge zero folio accounted in smaps, pagemap (PAGE_IS_FILE) and
numamaps as file-backed THP
* folio_walk_start() returning the folio even without FW_ZEROPAGE set.
Callers seem to tolerate that, though.

... and triggering the VM_WARN_ON_ONE(), although never reported so far.

To fix it, teach vm_normal_page_pmd()/vm_normal_page_pud() to consider
whether pmd_special/pud_special is actually implemented.
Published: 2026-07-19
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Linux kernel memory manager for 32‑bit x86 systems incorrectly assumes that the functions to test for special pages, pmd_special() and pud_special(), are implemented when Transparent Huge Pages (THP) are enabled. When a huge zero page is reclaimed, the missing check triggers a warning followed by ‘Bad rss‑counter state’ and ‘Bad page state’ bugs. These failures can lead to corruption of page state information, memory accounting errors, and potentially a system crash. The flaw is identified as CWE‑166, inappropriate handling of special page attributes, and manifests as incorrect page state tracking.

Affected Systems

All Linux kernel builds running on 32‑bit x86 architectures with Transparent Huge Pages enabled before the regression fix are affected. No specific kernel releases are listed, so any kernel version operating with THP on a 32‑bit x86 platform prior to the patch is vulnerable. The vulnerability applies broadly to all such kernels regardless of version or configuration other than THP being active.

Risk and Exploitability

The CVSS score of 7.8 classifies this as high severity. The EPSS score of <1% indicates a very low probability that the flaw has been actively exploited. It is not listed in the CISA KEV catalog. The vulnerability is most likely exploitable by local or privileged users who can trigger conditions that lead to a huge zero page reclamation, such as allocating large memory regions or forcing memory pressure. Based on the description, it is inferred that an attacker would need local access and would trigger the bug by exercising memory‑intensive operations that involve THP.

Generated by OpenCVE AI on July 30, 2026 at 20:01 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the fixed __vm_normal_page handling for huge zero pages
  • If an upgrade cannot be applied immediately, disable Transparent Huge Pages by writing "never" or "no" to /sys/kernel/mm/transparent_hugepage/enabled and revert the change on reboot
  • After disabling THP, monitor system logs (e.g., dmesg) to verify that the VM_WARN_ON and BUG messages related to page state no longer appear during memory‑intensive operations

Generated by OpenCVE AI on July 30, 2026 at 20:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Ubuntu USN Ubuntu USN USN-8593-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-8603-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-8618-1 Linux kernel vulnerabilities
History

Tue, 21 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-166
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 20 Jul 2026 14:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Sun, 19 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mm: fix __vm_normal_page() to handle missing support for pmd_special()/pud_special() On x86 32-bit with THP enabled, zap_huge_pmd() is seen to generate a "WARNING: mm/memory.c:735 at __vm_normal_page+0x6a/0x7d", from the VM_WARN_ON_ONCE(is_zero_pfn(pfn) || is_huge_zero_pfn(pfn)); followed by "BUG: Bad rss-counter state"s, then later "BUG: Bad page state"s when reclaim gets to call shrink_huge_zero_folio_scan(). It's as if the _PAGE_SPECIAL bit never got set in the huge_zero pmd: and indeed, whereas pte_special() and pte_mkspecial() are subject to a dedicated CONFIG_ARCH_HAS_PTE_SPECIAL, pmd_special() and pmd_mkspecial() are subject to CONFIG_ARCH_SUPPORTS_PMD_PFNMAP, which is never enabled on any 32-bit architecture. While the problem was exposed through commit d80a9cb1a64a ("mm/huge_memory: add and use normal_or_softleaf_folio_pmd()"), it was an oversight in commit af38538801c6 ("mm/memory: factor out common code from vm_normal_page_*()") and would result in other problems: * huge zero folio accounted in smaps, pagemap (PAGE_IS_FILE) and numamaps as file-backed THP * folio_walk_start() returning the folio even without FW_ZEROPAGE set. Callers seem to tolerate that, though. ... and triggering the VM_WARN_ON_ONE(), although never reported so far. To fix it, teach vm_normal_page_pmd()/vm_normal_page_pud() to consider whether pmd_special/pud_special is actually implemented.
Title mm: fix __vm_normal_page() to handle missing support for pmd_special()/pud_special()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-05T12:39:56.626Z

Reserved: 2026-07-19T07:54:57.039Z

Link: CVE-2026-64181

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-19T00:00:00Z

Links: CVE-2026-64181 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T20:15:05Z

Weaknesses
  • CWE-166

    Improper Handling of Missing Special Element