{"id":"CVE-2024-42233","summary":"filemap: replace pte_offset_map() with pte_offset_map_nolock()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nfilemap: replace pte_offset_map() with pte_offset_map_nolock()\n\nThe vmf-\u003eptl in filemap_fault_recheck_pte_none() is still set from\nhandle_pte_fault().  But at the same time, we did a pte_unmap(vmf-\u003epte). \nAfter a pte_unmap(vmf-\u003epte) unmap and rcu_read_unlock(), the page table\nmay be racily changed and vmf-\u003eptl maybe fails to protect the actual page\ntable.  Fix this by replacing pte_offset_map() with\npte_offset_map_nolock().\n\nAs David said, the PTL pointer might be stale so if we continue to use\nit infilemap_fault_recheck_pte_none(), it might trigger UAF.  Also, if\nthe PTL fails, the issue fixed by commit 58f327f2ce80 (\"filemap: avoid\nunnecessary major faults in filemap_fault()\") might reappear.","modified":"2026-04-02T12:17:52.782153Z","published":"2024-08-07T15:14:23.858Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42233.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/24be02a42181f0707be0498045c4c4b13273b16d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6a6c2aec1a89506595801b4cf7e8eef035f33748"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42233.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42233"},{"type":"PACKAGE","url":"https://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":"58f327f2ce80f9c7b4a70e9cf017ae8810d44a20"},{"fixed":"6a6c2aec1a89506595801b4cf7e8eef035f33748"},{"fixed":"24be02a42181f0707be0498045c4c4b13273b16d"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42233.json"}}],"schema_version":"1.7.5"}