CVE-2026-31589
Vulnerability Summary
Timeline
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.
CVSS Metrics
- v4.0•HIGH•Score: 7.3CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- v3.1•CRITICAL•Score: 9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Trends
Current EPSS score: 0.44%• Percentile: 38%
Techniques & Countermeasures
- CWE-416•Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Affected Systems
- chainguard•linux-aws-6.18
< 6.18.31-r0
- chainguard•linux-azure-6.18
< 0
- chainguard•linux-desktop-6.18
all
- chainguard•linux-desktop-6.18-bootc
all
- chainguard•linux-desktop-6.18-bootc-boot-installed
all
- chainguard•linux-desktop-6.18-headers
all
- chainguard•linux-desktop-6.18-modules
all
- chainguard•linux-firecracker-6.18
all
- chainguard•linux-gcp-6.18
< 6.18.38-r2 | < 0
- chainguard•linux-gcp-6.18-bootc
< 6.18.38-r2
- chainguard•linux-gcp-6.18-bootc-boot-installed
< 0
- chainguard•linux-qemu-6.18
< 0 | < 6.18.38-r2
- chainguard•linux-qemu-6.18-bootc
< 6.18.38-r2
- chainguard•linux-qemu-6.18-bootc-boot-installed
< 0
- chainguard•linux-qemu-melange
< 0
- chainguard•linux-vmware-6.18
< 0
- debian•linux
< 6.19.14-1
- ubuntu•linux
all | < 7.0.0-27.27
- ubuntu•linux-allwinner-5.19
all
- ubuntu•linux-aws
all | < 7.0.0-1008.8
- ubuntu•linux-aws-5.0
all
- ubuntu•linux-aws-5.11
all
- ubuntu•linux-aws-5.13
all
- ubuntu•linux-aws-5.19
all
- ubuntu•linux-aws-5.3
all
- ubuntu•linux-aws-5.8
all
- ubuntu•linux-aws-6.14
all
- ubuntu•linux-aws-6.17
all
- ubuntu•linux-aws-6.2
all
- ubuntu•linux-aws-6.5
all
- ubuntu•linux-azure
all | all | < 7.0.0-1010.10
- ubuntu•linux-azure-5.11
all
- ubuntu•linux-azure-5.13
all
- ubuntu•linux-azure-5.19
all
- ubuntu•linux-azure-5.3
all
- ubuntu•linux-azure-5.8
all
- ubuntu•linux-azure-6.11
all
- ubuntu•linux-azure-6.14
all
- ubuntu•linux-azure-6.17
< 6.17.0-1022.22
- ubuntu•linux-azure-6.2
all
- ubuntu•linux-azure-6.5
all
- ubuntu•linux-azure-edge
all
- ubuntu•linux-azure-fde
all | all | < 7.0.0-1009.9
- ubuntu•linux-azure-fde-5.19
all
- ubuntu•linux-azure-fde-6.14
all
- ubuntu•linux-azure-fde-6.2
all
- ubuntu•linux-azure-nvidia-6.14
all
- ubuntu•linux-bluefield
all
- ubuntu•linux-gcp
all | all | < 7.0.0-1007.7
- ubuntu•linux-gcp-5.11
all
Showing first 50 affected entries in server-rendered view.
References (19)
- https://git.kernel.org/stable/c/b667df39d98a7a24be7c2a40ff0863dac1ad2cd7
- https://git.kernel.org/stable/c/c330e65ea59c4805d6ab6757c4ddfe8c63acef31
- https://git.kernel.org/stable/c/615d9bb2ccad42f9e21d837431e401db2e471195
- https://git.kernel.org/stable/c/efc52947247a21bbf79059539bbbd40f4ea76f00
- https://ubuntu.com/security/CVE-2026-31589
- https://www.cve.org/CVERecord?id=CVE-2026-31589
- https://git.kernel.org/linus/615d9bb2ccad42f9e21d837431e401db2e471195
- https://ubuntu.com/security/notices/USN-8488-1
- https://ubuntu.com/security/notices/USN-8488-2
- https://ubuntu.com/security/notices/USN-8507-1
- https://ubuntu.com/security/notices/USN-8569-1
- https://ubuntu.com/security/notices/USN-8603-1
- https://ubuntu.com/security/notices/USN-8636-1
- https://security-tracker.debian.org/tracker/CVE-2026-31589
- https://ubuntu.com/security/notices/USN-8636-2
- https://ubuntu.com/security/notices/USN-8669-1
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31589.json
- https://nvd.nist.gov/vuln/detail/CVE-2026-31589
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git