CVE-2026-31597

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

11 Nov 2026, 23:10

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: ocfs2: corrección de uso después de liberación en ocfs2_fault() cuando VM_FAULT_RETRY filemap_fault() puede liberar el mmap_lock antes de devolver VM_FAULT_RETRY, como se documenta en mm/filemap.c: ’Si nuestro valor de retorno tiene VM_FAULT_RETRY establecido, es porque el mmap_lock puede ser liberado antes de realizar E/S o por lock_folio_maybe_drop_mmap().’ Cuando esto sucede, un munmap() concurrente puede llamar a remove_vma() y liberar el vm_area_struct a través de RCU. El puntero ’vma’ guardado en ocfs2_fault() entonces se convierte en un puntero colgante, y la subsiguiente llamada a trace_ocfs2_fault() lo desreferencia - - un uso después de liberación. Solucione esto al guardar ip_blkno como un entero simple antes de llamar a filemap_fault(), y eliminando vma del evento de traza. Dado que ip_blkno se copia por valor antes de que el bloqueo pueda ser liberado, permanece válido independientemente de lo que suceda con el vma o el inodo después.

01 Jun 2026, 17:16

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/35c2c05261d6f6d84aaa1355afa201d507943e76 -
  • () https://git.kernel.org/stable/c/36539c4d536f851a3b346a6ebb27b51bc3d77a94 -
  • () https://git.kernel.org/stable/c/3f5e74b5db9353b01ed50f4de84e75b755f8fbc2 -

29 Apr 2026, 14:15

Type Values Removed Values Added
First Time Linux linux Kernel
Linux
CWE CWE-416
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
References () https://git.kernel.org/stable/c/4cf2768a0291a0cdd0dae801ea0eafa3878a349d - () https://git.kernel.org/stable/c/4cf2768a0291a0cdd0dae801ea0eafa3878a349d - Patch
References () https://git.kernel.org/stable/c/6f072daefcab1d84ce37c073645615f63be91006 - () https://git.kernel.org/stable/c/6f072daefcab1d84ce37c073645615f63be91006 - Patch
References () https://git.kernel.org/stable/c/76a602fdbb78dd05b2da06f74a988cebc97e82d0 - () https://git.kernel.org/stable/c/76a602fdbb78dd05b2da06f74a988cebc97e82d0 - Patch
References () https://git.kernel.org/stable/c/7de554cabf160e331e4442e2a9ad874ca9875921 - () https://git.kernel.org/stable/c/7de554cabf160e331e4442e2a9ad874ca9875921 - Patch
References () https://git.kernel.org/stable/c/925bf22c1b823e231b1baea761fe8a1512e442f2 - () https://git.kernel.org/stable/c/925bf22c1b823e231b1baea761fe8a1512e442f2 - Patch
References () https://git.kernel.org/stable/c/d45ff441b416d4aa1af72b1db23d959601c04da2 - () https://git.kernel.org/stable/c/d45ff441b416d4aa1af72b1db23d959601c04da2 - Patch

27 Apr 2026, 15:16

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8

27 Apr 2026, 14:16

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/6f072daefcab1d84ce37c073645615f63be91006 -

27 Apr 2026, 12:16

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/7de554cabf160e331e4442e2a9ad874ca9875921 -

24 Apr 2026, 15:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-04-24 15:16

Updated : 2026-11-11 23:10


NVD link : CVE-2026-31597

Mitre link : CVE-2026-31597

CVE.ORG link : CVE-2026-31597


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-416

Use After Free