{"id":"CVE-2026-31589","published":"2026-04-24T14:42:16Z","modified":"2026-08-05T12:23:40Z","title":"mm: call ->free_folio() directly in folio_unmap_invalidate()","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: call ->free_folio() directly in folio_unmap_invalidate()\n\nWe can only call filemap_free_folio() if we have a reference to (or hold a\nlock on) the mapping.  Otherwise, we've already removed the folio from the\nmapping so it no longer pins the mapping and the mapping can be removed,\ncausing a use-after-free when accessing mapping->a_ops.\n\nFollow the same pattern as __remove_mapping() and load the free_folio\nfunction pointer before dropping the lock on the mapping.  That lets us\nmake filemap_free_folio() static as this was the only caller outside\nfilemap.c.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00678,"percentile":0.47447,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/efc52947247a21bbf79059539bbbd40f4ea76f00","tags":[]},{"url":"https://git.kernel.org/stable/c/b667df39d98a7a24be7c2a40ff0863dac1ad2cd7","tags":[]},{"url":"https://git.kernel.org/stable/c/c330e65ea59c4805d6ab6757c4ddfe8c63acef31","tags":[]},{"url":"https://git.kernel.org/stable/c/615d9bb2ccad42f9e21d837431e401db2e471195","tags":[]}],"priority":{"score":16.3,"factors":[{"name":"EPSS percentile","points":9.49},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= fb7d3bc4149395c1ae99029c852eab6c28fc3c88, < efc52947247a21bbf79059539bbbd40f4ea76f00",">= fb7d3bc4149395c1ae99029c852eab6c28fc3c88, < b667df39d98a7a24be7c2a40ff0863dac1ad2cd7",">= fb7d3bc4149395c1ae99029c852eab6c28fc3c88, < c330e65ea59c4805d6ab6757c4ddfe8c63acef31",">= fb7d3bc4149395c1ae99029c852eab6c28fc3c88, < 615d9bb2ccad42f9e21d837431e401db2e471195"]},{"vendor":"Linux","product":"Linux","versions":["6.14"]}],"euvd":{"id":"EUVD-2026-25482","exploited":false,"provenance":"source"}}