CVE-2026-31597: ocfs2: fix use-after-free in ocfs2_fault() when VM_FAULT_RETRY
Vulnerability summary
CVE-2026-31597 is a high (CVSS 7.8) Use After Free vulnerability in linux. EPSS estimates a 0.13% chance of exploitation in the next 30 days, higher than 2.4% of scored vulnerabilities.
Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 33 · Related 34Timeline
- 24-04-2026PublishedVulnerability first disclosed.
- 05-08-2026Last modifiedVulnerability information updated.
Description
In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix use-after-free in ocfs2_fault() when VM_FAULT_RETRY filemap_fault() may drop the mmap_lock before returning VM_FAULT_RETRY, as documented in mm/filemap.c: "If our return value has VM_FAULT_RETRY set, it's because the mmap_lock may be dropped before doing I/O or by lock_folio_maybe_drop_mmap()." When this happens, a concurrent munmap() can call remove_vma() and free the vm_area_struct via RCU. The saved 'vma' pointer in ocfs2_fault() then becomes a dangling pointer, and the subsequent trace_ocfs2_fault() call dereferences it -- a use-after-free. Fix this by saving ip_blkno as a plain integer before calling filemap_fault(), and removing vma from the trace event. Since ip_blkno is copied by value before the lock can be dropped, it remains valid regardless of what happens to the vma or inode afterward.
CVSS metrics
6 scores · 5 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · ChainguardEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.13%
Chance of exploitation in the next 30 days
Percentile
2%
Versus all other CVEs
30-day change
Decrease -0.05 pp
From 0.17% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ubuntu158 products
- linuxAll versions (No fix recorded) | < 5.15.0-186.196 | < 6.8.0-136.136 | < 7.0.0-27.27
- linux-allwinner-5.19All versions (No fix recorded)
- linux-awsAll versions (No fix recorded) | < 5.15.0-1112.119 | < 6.8.0-1061.64 | < 7.0.0-1008.8
- linux-aws-5.0All versions (No fix recorded)
- linux-aws-5.11All versions (No fix recorded)
Chainguard9 products
- linux-aws-6.12< 6.12.85-r0
- linux-aws-6.18< 6.18.31-r0
- linux-azure-6.18< 6.18.31-r0
- linux-gcp-6.18< 6.18.31-r0
- linux-qemu-6.12< 6.12.85-r0
Linux2 products
- linux≥ 614a9e849ca6ea24843795251cb30af525d5336b, < 36539c4d536f851a3b346a6ebb27b51bc3d77a94 | ≥ 614a9e849ca6ea24843795251cb30af525d5336b, < 35c2c05261d6f6d84aaa1355afa201d507943e76 | ≥ 614a9e849ca6ea24843795251cb30af525d5336b, < 3f5e74b5db9353b01ed50f4de84e75b755f8fbc2 | ≥ 614a9e849ca6ea24843795251cb30af525d5336b, < 6f072daefcab1d84ce37c073645615f63be91006 | ≥ 614a9e849ca6ea24843795251cb30af525d5336b, < 4cf2768a0291a0cdd0dae801ea0eafa3878a349d | ≥ 614a9e849ca6ea24843795251cb30af525d5336b, < d45ff441b416d4aa1af72b1db23d959601c04da2 | ≥ 614a9e849ca6ea24843795251cb30af525d5336b, < 76a602fdbb78dd05b2da06f74a988cebc97e82d0 | ≥ 614a9e849ca6ea24843795251cb30af525d5336b, < 925bf22c1b823e231b1baea761fe8a1512e442f2 | ≥ 614a9e849ca6ea24843795251cb30af525d5336b, < 7de554cabf160e331e4442e2a9ad874ca9875921 | 2.6.39
- linux_kernel≥ 2.6.39, < 6.6.136 | ≥ 6.7, < 6.12.83 | ≥ 6.13, < 6.18.24 | ≥ 6.19, < 6.19.14 | ≥ 7.0, < 7.0.1
Debian1 product
- linux< 6.1.176-1 | < 6.12.85-1 | < 6.19.14-1
4 vendors · 170 products