CVE-2024-26832

mm: zswap: fix missing folio cleanup in writeback race path

State
Published
Severity
Not scored
Published
Apr 17, 2024
Updated
May 23, 2026
Reserved
Feb 19, 2024

Read the record on cve.org

Description

In the Linux kernel, the following vulnerability has been resolved:

mm: zswap: fix missing folio cleanup in writeback race path

In zswap_writeback_entry(), after we get a folio from __read_swap_cache_async(), we grab the tree lock again to check that the swap entry was not invalidated and recycled. If it was, we delete the folio we just added to the swap cache and exit.

However, __read_swap_cache_async() returns the folio locked when it is newly allocated, which is always true for this path, and the folio is ref'd. Make sure to unlock and put the folio before returning.

This was discovered by code inspection, probably because this path handles a race condition that should not happen often, and the bug would not crash the system, it will only strand the folio indefinitely.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 2cab13f500a6333bd2b853783ac76be9e4956f8a to before 14f1992430ef9e647b02aa8ca12c5bcb9a1dffeaAffected
  • 04fc7816089c5a32c29a04ec94b998e219dfb946 to before 6156277d1b26cb3fdb6fcbf0686ab78268571644Affected
  • 04fc7816089c5a32c29a04ec94b998e219dfb946 to before e2891c763aa2cff74dd6b5e978411ccf0cf94abeAffected
  • 04fc7816089c5a32c29a04ec94b998e219dfb946 to before e3b63e966cac0bf78aaa1efede1827a252815a1dAffected
  • ba700ea13bf0105a4773c654f7d3bef8adb64ab2Affected
  • 6.1.30 to before 6.1.80Affected
  • 6.3.4 to before 6.4Affected
LinuxLinux
  • 6.4Affected
  • before 6.4Not affected
  • 6.1.80 through 6.1.*Not affected
  • 6.6.19 through 6.6.*Not affected
  • 6.7.7 through 6.7.*Not affected
  • 6.8 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.