{"id":"CVE-2026-31589","aliases":["CVE-2026-31589"],"related":[],"kind":"vulnerability","state":"published","title":"mm: call ->free_folio() directly in folio_unmap_invalidate()","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nmm: llamar a   ->  free_folio() directamente en folio_unmap_invalidate()\n\nSolo podemos llamar a filemap_free_folio() si tenemos una referencia a (o mantenemos un bloqueo sobre) el mapeo. De lo contrario, ya hemos eliminado el folio del mapeo, por lo que ya no fija el mapeo y el mapeo puede ser eliminado, causando un uso después de liberación al acceder a mapping  ->  a_ops.\n\nSiga el mismo patrón que __remove_mapping() y cargue el puntero de función free_folio antes de liberar el bloqueo sobre el mapeo. Eso nos permite hacer filemap_free_folio() estática, ya que este era el único llamador fuera de filemap.c.","source":"nvd"}],"published":"2026-04-24T14:42:16.955Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"fb7d3bc4149395c1ae99029c852eab6c28fc3c88","fixed":"efc52947247a21bbf79059539bbbd40f4ea76f00","status":"affected"},{"type":"git","introduced":"fb7d3bc4149395c1ae99029c852eab6c28fc3c88","fixed":"b667df39d98a7a24be7c2a40ff0863dac1ad2cd7","status":"affected"},{"type":"git","introduced":"fb7d3bc4149395c1ae99029c852eab6c28fc3c88","fixed":"c330e65ea59c4805d6ab6757c4ddfe8c63acef31","status":"affected"},{"type":"git","introduced":"fb7d3bc4149395c1ae99029c852eab6c28fc3c88","fixed":"615d9bb2ccad42f9e21d837431e401db2e471195","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.14","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.14","status":"unaffected"},{"type":"semver","introduced":"6.18.27","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"6.19.14","lastAffected":"6.19.*","status":"unaffected"},{"type":"semver","introduced":"7.0.1","lastAffected":"7.0.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.14","fixed":"6.19.14"},{"status":"affected","introduced":"7.0","fixed":"7.0.1"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/efc52947247a21bbf79059539bbbd40f4ea76f00","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b667df39d98a7a24be7c2a40ff0863dac1ad2cd7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c330e65ea59c4805d6ab6757c4ddfe8c63acef31","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/615d9bb2ccad42f9e21d837431e401db2e471195","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-31589","url":"https://www.cve.org/CVERecord?id=CVE-2026-31589","licence":"CVE Terms of Use","modified":"2026-08-05T12:23:40.286Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-31589","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31589","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.500Z","epss":{"score":0.00462,"percentile":0.41699,"date":"2026-12-01T12:00:22.000Z"}}