{"id":"CVE-2026-138867","summary":"mm/memory: constrain generic_access_phys() to page boundary","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/memory: constrain generic_access_phys() to page boundary\n\nThis patch addresses an issue in generic_access_phys() where accessing\nmemory across page boundaries in PFNMAP VMAs assumes physical pages are\ncontiguous, which can lead to accessing unintended physical memory or\nexceeding VMA boundaries.\n\ngeneric_access_phys() improperly validates the memory access range: it\nonly validates the start address using follow_pfnmap_start() and passes\nPAGE_ALIGN(len + offset) to ioremap_prot().\n\nThis poses two problems:\n1. In PFNMAP VMAs, consecutive virtual pages are not guaranteed to be\n   physically contiguous, and individual PTEs may have different access\n   permissions or writability.\n2. The mapping may cross VMA boundaries if len extends beyond vma-\u003evm_end.\n\nConstrain the access in generic_access_phys() to at most the current page\nboundary (PAGE_SIZE - offset) and map only a single PAGE_SIZE via\nioremap_prot().  Since the caller __access_remote_vm() already loops over\nthe requested length and handles partial transfers, it will naturally\niterate over the remaining pages.\n\nAlso add a missing (resource_size_t) cast during PFN re-validation to\navoid truncation on 32-bit PAE systems.","modified":"2026-11-30T15:01:16.287736042Z","published":"2026-11-30T13:25:43.709Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138867.json","cna_assigner":"Linux"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/14375f7daba0afb67c10d56e5f4af694ad18d928"},{"type":"WEB","url":"https://git.kernel.org/stable/c/61b405ef3e35b5890365090ab6a377855e9a9b71"},{"type":"WEB","url":"https://git.kernel.org/stable/c/94a138ce5baed8233c0d541fd14ac6d58bf1da8c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ae0298a5fbeff32951c0d31398ccec97ec6aa0ea"},{"type":"WEB","url":"https://git.kernel.org/stable/c/defac975e1fbd1cae022bf26657299f87105fd9e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/eb4334c7cebb4812126bc5dbb8e91c4d63b3d784"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f52d13f04994b2cbeba4a1d27cf16d6aaa89e3ba"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/138xxx/CVE-2026-138867.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-138867"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"9cb12d7b4ccaa976f97ce0c5fd0f1b6a83bc2a75"},{"fixed":"eb4334c7cebb4812126bc5dbb8e91c4d63b3d784"},{"fixed":"14375f7daba0afb67c10d56e5f4af694ad18d928"},{"fixed":"defac975e1fbd1cae022bf26657299f87105fd9e"},{"fixed":"f52d13f04994b2cbeba4a1d27cf16d6aaa89e3ba"},{"fixed":"61b405ef3e35b5890365090ab6a377855e9a9b71"},{"fixed":"94a138ce5baed8233c0d541fd14ac6d58bf1da8c"},{"fixed":"ae0298a5fbeff32951c0d31398ccec97ec6aa0ea"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"c8d452410c798d28ac96c3716b011d3d6b5d3ade"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"601391cbb6334533d6fde4e81f40b53b5f85d73b"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"9113c468b621ddb74f2395564720862faa3a083d"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"970970dcb4fca4fdcbb1b9bf4d7cd686796dc9d6"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"9db79db105f2316229803a85eec7db665f7d276c"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"463fb5a2cc7013f50763ee2322fa724553150842"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"6f5468a717c8f18e721dc9bc7f8d7ce41f22eb1a"}]}],"versions":["v3.2.102","v3.2.101","v3.2.100","v3.2.99","v3.2.98","v3.2.97","v3.2.96","v3.2.95","v3.2.94","v3.2.93","v3.2.92","v3.2.91","v3.2.90","v3.2.89","v3.2.88","v3.2.87","v3.2.86","v3.2.85","v3.2.84","v3.2.83","v3.2.82","v3.2.81","v3.2.80","v3.2.79","v3.2.78","v3.2.77","v3.2.76","v3.2.75","v3.2.74","v3.2.73","v3.2.72","v3.2.71","v3.2.70","v3.2.69","v3.4.113","v3.4.112","v3.4.111","v3.4.110","v3.4.109","v3.4.108","v3.10.108","v3.10.107","v3.10.106","v3.10.105","v3.10.104","v3.10.103","v3.10.102","v3.10.101","v3.10.100","v3.10.99","v3.10.98","v3.10.97","v3.10.96","v3.10.95","v3.10.94","v3.10.93","v3.10.92","v3.10.91","v3.10.90","v3.10.89","v3.10.88","v3.10.87","v3.10.86","v3.10.85","v3.10.84","v3.10.83","v3.10.82","v3.10.81","v3.10.80","v3.10.79","v3.10.78","v3.10.77","v3.10.76","v3.10.75","v3.10.74","v3.10.73","v3.10.72","v3.12.74","v3.12.73","v3.12.72","v3.12.71","v3.12.70","v3.12.69","v3.12.68","v3.12.67","v3.12.66","v3.12.65","v3.12.64","v3.12.63","v3.12.62","v3.12.61","v3.12.60","v3.12.59","v3.12.58","v3.12.57","v3.12.56","v3.12.55","v3.12.54","v3.12.53","v3.12.52","v3.12.51","v3.12.50","v3.12.49","v3.12.48","v3.12.47","v3.12.46","v3.12.45","v3.12.44","v3.12.43","v3.12.42","v3.12.41","v3.12.40","v3.12.39","v3.14.79","v3.14.78","v3.14.77","v3.14.76","v3.14.75","v3.14.74","v3.14.73","v3.14.72","v3.14.71","v3.14.70","v3.14.69","v3.14.68","v3.14.67","v3.14.66","v3.14.65","v3.14.64","v3.14.63","v3.14.62","v3.14.61","v3.14.60","v3.14.59","v3.14.58","v3.14.57","v3.14.56","v3.14.55","v3.14.54","v3.14.53","v3.14.52","v3.14.51","v3.14.50","v3.14.49","v3.14.48","v3.14.47","v3.14.46","v3.14.45","v3.14.44","v3.14.43","v3.14.42","v3.14.41","v3.14.40","v3.14.39","v3.14.38","v3.14.37","v3.14.36","v3.18.140","v3.18.139","v3.18.138","v3.18.137","v3.18.136","v3.18.135","v3.18.134","v3.18.133","v3.18.132","v3.18.131","v3.18.130","v3.18.129","v3.18.128","v3.18.127","v3.18.126","v3.18.125","v3.18.124","v3.18.123","v3.18.122","v3.18.121","v3.18.120","v3.18.119","v3.18.118","v3.18.117","v3.18.116","v3.18.115","v3.18.114","v3.18.113","v3.18.112","v3.18.111","v3.18.110","v3.18.109","v3.18.108","v3.18.107","v3.18.106","v3.18.105","v3.18.104","v3.18.103","v3.18.102","v3.18.101","v3.18.100","v3.18.99","v3.18.98","v3.18.97","v3.18.96","v3.18.95","v3.18.94","v3.18.93","v3.18.92","v3.18.91","v3.18.90","v3.18.89","v3.18.88","v3.18.87","v3.18.86","v3.18.85","v3.18.84","v3.18.83","v3.18.82","v3.18.81","v3.18.80","v3.18.79","v3.18.78","v3.18.77","v3.18.76","v3.18.75","v3.18.74","v3.18.73","v3.18.72","v3.18.71","v3.18.70","v3.18.69","v3.18.68","v3.18.67","v3.18.66","v3.18.65","v3.18.64","v3.18.63","v3.18.62","v3.18.61","v3.18.60","v3.18.59","v3.18.58","v3.18.57","v3.18.56","v3.18.55","v3.18.54","v3.18.53","v3.18.52","v3.18.51","v3.18.50","v3.18.49","v3.18.48","v3.18.47","v3.18.46","v3.18.45","v3.18.44","v3.18.43","v3.18.42","v3.18.41","v3.18.40","v3.18.39","v3.18.38","v3.18.37","v3.18.36","v3.18.35","v3.18.34","v3.18.33","v3.18.32","v3.18.31","v3.18.30","v3.18.29","v3.18.28","v3.18.27","v3.18.26","v3.18.25","v3.18.24","v3.18.23","v3.18.22","v3.18.21","v3.18.20","v3.18.19","v3.18.18","v3.18.17","v3.18.16","v3.18.15","v3.18.14","v3.18.13","v3.18.12","v3.18.11","v3.18.10","v3.19.8","v3.19.7","v3.19.6","v3.19.5","v3.19.4","v3.19.3","v3.19.2"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138867.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.69"},{"fixed":"3.3"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.4.108"},{"fixed":"3.5"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.10.72"},{"fixed":"3.11"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.12.39"},{"fixed":"3.13"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.14.36"},{"fixed":"3.15"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.18.10"},{"fixed":"3.19"}]},{"type":"ECOSYSTEM","events":[{"introduced":"3.19.2"},{"fixed":"3.20"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"fixed":"5.15.226"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.118"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-138867.json"}}],"schema_version":"1.9.2"}