mm/memory: constrain generic_access_phys() to page boundary

State
Published
Severity
Not Scored
Published
Nov 30, 2026
Updated
Nov 30, 2026
Reserved
Nov 30, 2026

Read the record on cve.org

Description

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

mm/memory: constrain generic_access_phys() to page boundary

This patch addresses an issue in generic_access_phys() where accessing memory across page boundaries in PFNMAP VMAs assumes physical pages are contiguous, which can lead to accessing unintended physical memory or exceeding VMA boundaries.

generic_access_phys() improperly validates the memory access range: it only validates the start address using follow_pfnmap_start() and passes PAGE_ALIGN(len + offset) to ioremap_prot().

This poses two problems: 1. In PFNMAP VMAs, consecutive virtual pages are not guaranteed to be physically contiguous, and individual PTEs may have different access permissions or writability. 2. The mapping may cross VMA boundaries if len extends beyond vma->vm_end.

Constrain the access in generic_access_phys() to at most the current page boundary (PAGE_SIZE - offset) and map only a single PAGE_SIZE via ioremap_prot(). Since the caller __access_remote_vm() already loops over the requested length and handles partial transfers, it will naturally iterate over the remaining pages.

Also add a missing (resource_size_t) cast during PFN re-validation to avoid truncation on 32-bit PAE systems.

ProductVersions
Linux Linux9cb12d7b4ccaa976f97ce0c5fd0f1b6a83bc2a75 to before eb4334c7cebb4812126bc5dbb8e91c4d63b3d784 Affected9cb12d7b4ccaa976f97ce0c5fd0f1b6a83bc2a75 to before 14375f7daba0afb67c10d56e5f4af694ad18d928 Affected9cb12d7b4ccaa976f97ce0c5fd0f1b6a83bc2a75 to before defac975e1fbd1cae022bf26657299f87105fd9e Affected9cb12d7b4ccaa976f97ce0c5fd0f1b6a83bc2a75 to before f52d13f04994b2cbeba4a1d27cf16d6aaa89e3ba Affected9cb12d7b4ccaa976f97ce0c5fd0f1b6a83bc2a75 to before 61b405ef3e35b5890365090ab6a377855e9a9b71 Affected9cb12d7b4ccaa976f97ce0c5fd0f1b6a83bc2a75 to before 94a138ce5baed8233c0d541fd14ac6d58bf1da8c Affected9cb12d7b4ccaa976f97ce0c5fd0f1b6a83bc2a75 to before ae0298a5fbeff32951c0d31398ccec97ec6aa0ea Affectedc8d452410c798d28ac96c3716b011d3d6b5d3ade Affected601391cbb6334533d6fde4e81f40b53b5f85d73b Affected9113c468b621ddb74f2395564720862faa3a083d Affected970970dcb4fca4fdcbb1b9bf4d7cd686796dc9d6 Affected9db79db105f2316229803a85eec7db665f7d276c Affected463fb5a2cc7013f50763ee2322fa724553150842 Affected6f5468a717c8f18e721dc9bc7f8d7ce41f22eb1a Affected3.2.69 to before 3.3 Affected3.4.108 to before 3.5 Affected3.10.72 to before 3.11 Affected3.12.39 to before 3.13 Affected3.14.36 to before 3.15 Affected3.18.10 to before 3.19 Affected3.19.2 to before 3.20 Affected
Linux Linux4.0 Affectedbefore 4.0 Not Affected5.15.226 through 5.15.* Not Affected6.1.193 through 6.1.* Not Affected6.6.163 through 6.6.* Not Affected6.12.118 through 6.12.* Not Affected6.18.63 through 6.18.* Not Affected7.3.4 through 7.3.* Not Affected7.4-rc1 and later Not Affected

Weaknesses

The record names no weakness.

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.