CVE-2026-64130

Source
https://cve.org/CVERecord?id=CVE-2026-64130
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64130.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-64130
Downstream
Published
2026-07-19T15:40:26.108Z
Modified
2026-07-21T03:47:53.347613749Z
Summary
mm/page_alloc: fix initialization of tags of the huge zero folio with init_on_free
Details

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

mm/pagealloc: fix initialization of tags of the huge zero folio with initon_free

__GFP_ZEROTAGS semantics are currently a bit weird, but effectively this flag is only ever set alongside __GFP_ZERO and __GFPSKIPKASAN.

If we run with initonfree, we will zero out pages during __freepagesprepare(), to skip zeroing on the allocation path.

However, when allocating with _GFPZEROTAG set, postallochook() will consequently not only skip clearing page content, but also skip clearing tag memory.

Not clearing tags through _GFPZEROTAGS is irrelevant for most pages that will get mapped to user space through setpteat() later: setpteat() and friends will detect that the tags have not been initialized yet (PGmtetagged not set), and initialize them.

However, for the huge zero folio, which will be mapped through a PMD marked as special, this initialization will not be performed, ending up exposing whatever tags were still set for the pages.

The docs (Documentation/arch/arm64/memory-tagging-extension.rst) state that allocation tags are set to 0 when a page is first mapped to user space. That no longer holds with the huge zero folio when initonfree is enabled.

Fix it by decoupling __GFP_ZEROTAGS from _GFPZERO, passing to tagclearhighpages() whether we want to also clear page content.

Invert the meaning of the tagclearhighpages() return value to have clearer semantics.

Reproduced with the huge zero folio by modifying the checkbufferfill arm64/mte selftest to use a 2 MiB area, after making sure that pages have a non-0 tag set when freeing (note that, during boot, we will not actually initialize tags, but only set KASANTAGKERNEL in the page flags).

$ ./check_buffer_fill
1..20
...
not ok 17 Check initial tags with private mapping, sync error mode and mmap memory
not ok 18 Check initial tags with private mapping, sync error mode and mmap/mprotect memory
...

This code needs more cleanups; we'll tackle that next, like decoupling __GFP_ZEROTAGS from __GFPSKIPKASAN.

[akpm@linux-foundation.org: s/__GPFZERO/GFPZERO/, per David]

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64130.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
adfb6609c6809e107ded9a1cd46f519c882e64ea
Fixed
738d18f1da3513d17b6f7bf30146cc4ac2480ffd
Fixed
2f2aec5120b93a8f8b52dc50cdc60dbb8aec72f6
Fixed
6a288a4ddb4a994490505ab5f41c445f8e6b6467

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64130.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.18.0
Fixed
6.18.34
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
7.0.11

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-64130.json"