filemap: replace pte_offset_map() with pte_offset_map_nolock()
In the Linux kernel, the following vulnerability has been resolved: filemap: replace pte_offset_map() with pte_offset_map_nolock() The vmf->ptl in filemap_fault_recheck_pte_none() is still set from handle_pte_fault(). But at the same time, we did a pte_unmap(vmf->pte). After a pte_unmap(vmf->pte) unmap and rcu_read_unlock(), the page table may be racily changed and vmf->ptl maybe fails to protect the actual page table. Fix this by replacing pte_offset_map() with pte_offset_map_nolock(). As David said, the PTL pointer might be stale so if we continue to use it infilemap_fault_recheck_pte_none(), it might trigger UAF. Also, if the PTL fails, the issue fixed by commit 58f327f2ce80 ("filemap: avoid unnecessary major faults in filemap_fault()") might reappear.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.9.10
- CVEs
- CVE-2024-42233
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 18:45 UTC · Revision 1
Source evidence
filemap: replace pte_offset_map() with pte_offset_map_nolock()
core-osv · Original sourcePublished 7 Aug 2024, 15:14 UTC
In the Linux kernel, the following vulnerability has been resolved: filemap: replace pte_offset_map() with pte_offset_map_nolock() The vmf->ptl in filemap_fault_recheck_pte_none() is still set from handle_pte_fault(). But at the same time, we did a pte_unmap(vmf->pte). After a pte_unmap(vmf->pte) unmap and rcu_read_unlock(), the page table may be racily changed and vmf->ptl maybe fails to protect the actual page table. Fix this by replacing pte_offset_map() with pte_offset_map_nolock(). As David said, the PTL pointer might be stale so if we continue to use it infilemap_fault_recheck_pte_none(), it might trigger UAF. Also, if the PTL fails, the issue fixed by commit 58f327f2ce80 ("filemap: avoid unnecessary major faults in filemap_fault()") might reappear.
osv:CVE-2024-42233
Kernel
Fixed versions: 6.9.10
Complete source record
{
"id": "2c2d8950c41041198e6def8f569bedb2d54830087606453e97989d128329ce90",
"url": "https://osv.dev/vulnerability/CVE-2024-42233",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "filemap: replace pte_offset_map() with pte_offset_map_nolock()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: filemap: replace pte_offset_map() with pte_offset_map_nolock() The vmf->ptl in filemap_fault_recheck_pte_none() is still set from handle_pte_fault(). But at the same time, we did a pte_unmap(vmf->pte). After a pte_unmap(vmf->pte) unmap and rcu_read_unlock(), the page table may be racily changed and vmf->ptl maybe fails to protect the actual page table. Fix this by replacing pte_offset_map() with pte_offset_map_nolock(). As David said, the PTL pointer might be stale so if we continue to use it infilemap_fault_recheck_pte_none(), it might trigger UAF. Also, if the PTL fails, the issue fixed by commit 58f327f2ce80 (\"filemap: avoid unnecessary major faults in filemap_fault()\") might reappear.",
"evidence": "osv:CVE-2024-42233",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.9.10",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2024-42233",
"aliases": [
"CVE-2024-42233"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "58f327f2ce80f9c7b4a70e9cf017ae8810d44a20"
},
{
"fixed": "6a6c2aec1a89506595801b4cf7e8eef035f33748"
},
{
"fixed": "24be02a42181f0707be0498045c4c4b13273b16d"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42233.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.9.0"
},
{
"fixed": "6.9.10"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42233.json"
}
}
],
"modified": "2026-10-28T02:30:51.705653802Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/24be02a42181f0707be0498045c4c4b13273b16d",
"https://git.kernel.org/stable/c/6a6c2aec1a89506595801b4cf7e8eef035f33748",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42233.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-42233",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42233.json"
}
},
"related_cves": [
{
"value": "CVE-2024-42233",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 520115,
"published_at": "2024-08-07T15:14:23.858+00:00"
}