mm/page_table_check: skip special zero mappings
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ df4e817b710809425d899340dbfa8504a3ca4ba5 · < 8db4bab826ccc9ec10fa41736a48031cd338d392| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mm/page_table_check: skip special zero mappings
page_table_check_set() and page_table_check_clear() account mappings based on PageAnon(). Shared zero-page PTEs and huge zero PMDs are special mappings, but page_table_check can still account them as file-backed pages.
An unprivileged process can populate enough zero mappings to overflow file_map_count and hit the existing BUG_ON(). The PTE path can do this with the shared zero page, and the PMD path can do the same with huge zero mappings.
Skip special zero mappings in the user page-table accounting paths. Keep the PTE-side pte_special() check, and identify huge zero PMDs from the mapped folio instead of pmd_special(). That covers architectures where pmd_special() is a no-op without adding huge_zero_pfn checks to the generic counter helpers.
From the CVE record · Linux
Linux kernel page_table_check can incorrectly count shared zero-page and huge zero mappings as file-backed pages. A local unprivileged process can create enough zero mappings to overflow file_map_count and trigger a BUG_ON(), crashing the kernel.
Operators running Linux kernels with page_table_check should check their kernel's exposure; affected versions are not specified.