Use After Free Affecting linux-aws-6.18 package, versions <6.18.31-r0


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.46% (42nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-CHAINGUARDLATEST-LINUXAWS618-17919635
  • published10 Jul 2026
  • disclosed24 Apr 2026

Introduced: 24 Apr 2026

CVE-2026-31589  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade Chainguard linux-aws-6.18 to version 6.18.31-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream linux-aws-6.18 package and not the linux-aws-6.18 package as distributed by Chainguard. See How to fix? for Chainguard relevant fixed versions and status.

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 Base Scores

version 3.1