CVE-2026-31589

mm: call ->free_folio() directly in folio_unmap_invalidate()

State
Published
Severity
9.8 Critical
Published
Apr 24, 2026
Updated
Aug 5, 2026
Reserved
Mar 9, 2026

Read the record on cve.org

Description

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

mm: call ->free_folio() directly in folio_unmap_invalidate()

We can only call filemap_free_folio() if we have a reference to (or hold a lock on) the mapping. Otherwise, we've already removed the folio from the mapping so it no longer pins the mapping and the mapping can be removed, causing a use-after-free when accessing mapping->a_ops.

Follow the same pattern as __remove_mapping() and load the free_folio function pointer before dropping the lock on the mapping. That lets us make filemap_free_folio() static as this was the only caller outside filemap.c.

Scores

CVSSScoreVectorSource
3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • fb7d3bc4149395c1ae99029c852eab6c28fc3c88 to before efc52947247a21bbf79059539bbbd40f4ea76f00Affected
  • fb7d3bc4149395c1ae99029c852eab6c28fc3c88 to before b667df39d98a7a24be7c2a40ff0863dac1ad2cd7Affected
  • fb7d3bc4149395c1ae99029c852eab6c28fc3c88 to before c330e65ea59c4805d6ab6757c4ddfe8c63acef31Affected
  • fb7d3bc4149395c1ae99029c852eab6c28fc3c88 to before 615d9bb2ccad42f9e21d837431e401db2e471195Affected
LinuxLinux
  • 6.14Affected
  • before 6.14Not affected
  • 6.18.27 through 6.18.*Not affected
  • 6.19.14 through 6.19.*Not affected
  • 7.0.1 through 7.0.*Not affected
  • 7.1 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.