9.8critical
mm: call ->free_folio() directly in folio_unmap_invalidate()
- Severity
- 9.8critical CVSS:3.1 by Linux
- Exploit likelihood
- 0.46% (higher than 41% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from fb7d3bc4149395c1ae99029c852eab6c28fc3c88 before efc52947247a21bbf79059539bbbd40f4ea76f00, from fb7d3bc4149395c1ae99029c852eab6c28fc3c88 before b667df39d98a7a24be7c2a40ff0863dac1ad2cd7, from fb7d3bc4149395c1ae99029c852eab6c28fc3c88 before c330e65ea59c4805d6ab6757c4ddfe8c63acef31, from fb7d3bc4149395c1ae99029c852eab6c28fc3c88 before 615d9bb2ccad42f9e21d837431e401db2e471195, 6.14 Not affected: before 6.14, from 6.18.27 up to 6.18.*, from 6.19.14 up to 6.19.*, from 7.0.1 up to 7.0.*, from 7.1 up to * | CVE List |
| linux linux_kernel | from 6.14 before 6.19.14, from 7.0 before 7.0.1 | NVD |
Classification
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: mm: llamar a -> free_folio() directamente en folio_unmap_invalidate() Solo 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. Siga 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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-31589 changed 2026-08-05 | CVE Terms of Use |
| NVD | CVE-2026-31589 changed 2026-11-11 | Public domain |