CVE-2026-31597: ocfs2: fix use-after-free in ocfs2_fault() when VM_FAULT_RETRY

Published Apr 24, 2026
·
Updated

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

ocfs2: fix use-after-free in ocfs2fault() when VMFAULTRETRY

filemapfault() may drop the mmaplock before returning VMFAULTRETRY, as documented in mm/filemap.c:

"If our return value has VMFAULTRETRY set, it's because the mmaplock may be dropped before doing I/O or by lockfoliomaybedropmmap()."

When this happens, a concurrent munmap() can call removevma() and free the vmareastruct via RCU. The saved 'vma' pointer in ocfs2fault() then becomes a dangling pointer, and the subsequent traceocfs2fault() call dereferences it -- a use-after-free.

Fix this by saving ipblkno as a plain integer before calling filemapfault(), and removing vma from the trace event. Since ipblkno is copied by value before the lock can be dropped, it remains valid regardless of what happens to the vma or inode afterward.

Affected Software

7 affected componentsFixes available
Linux Linux kernel (ocfs2)
Linux Linux kernel>=2.6.39<6.6.136
Linux Linux kernel>=6.7<6.12.83
Linux Linux kernel>=6.13<6.18.24
Linux Linux kernel>=6.19<6.19.14
Linux Linux kernel>=7.0<7.0.1
Microsoft azl3 kernel 6.6.134.1-2

Event History

Apr 24, 2026
CVE Published
via MITRE·02:42 PM
Data Sourced
via MITRE·02:42 PM
DescriptionSeverity
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 26, 2026
Data Sourced
via Microsoft·08:09 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:09 AM
DescriptionSeverity
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-31597?

CVE-2026-31597 has been classified as having a critical severity due to the potential for data corruption and system crashes.

2

How do I fix CVE-2026-31597?

To remediate CVE-2026-31597, update the Linux kernel to the latest version that includes the patch for this vulnerability.

3

Which versions of the Linux kernel are affected by CVE-2026-31597?

CVE-2026-31597 affects specific versions of the Linux kernel that utilize the ocfs2 file system.

4

What vulnerabilities are associated with CVE-2026-31597?

CVE-2026-31597 is associated with a use-after-free vulnerability in the ocfs2_fault function that can lead to system instability.

5

Who is impacted by CVE-2026-31597?

Users of Linux systems that employ the ocfs2 file system may be impacted by CVE-2026-31597.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203