CVE-2024-42234: mm: fix crashes from deferred split racing folio migration

Published Aug 7, 2024
·
Updated

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

mm: fix crashes from deferred split racing folio migration

Even on 6.10-rc6, I've been seeing elusive "Bad page state"s (often on flags when freeing, yet the flags shown are not bad: PGlocked had been set and cleared??), and VMBUGONPAGE(pagerefcount(page) == 0)s from deferredsplitscan()'s folioput(), and a variety of other BUG and WARN symptoms implying double free by deferred split and large folio migration.

6.7 commit 9bcef5973e31 ("mm: memcg: fix split queue list crash when large folio migration") was right to fix the memcg-dependent locking broken in 85ce2c517ade ("memcontrol: only transfer the memcg data for migration"), but missed a subtlety of deferredsplitscan(): it moves folios to its own local list to work on them without splitqueuelock, during which time folio->deferredlist is not empty, but even the "right" lock does nothing to secure the folio and the list it is on.

Fortunately, deferredsplitscan() is careful to use foliotryget(): so foliomigratemapping() can avoid the race by folioundolargermappable() while the old folio's reference count is temporarily frozen to 0 - adding such a freeze in the !mapping case too (originally, folio lock and unmapping and no swap cache left an anon folio unreachable, so no freezing was needed there: but the deferred split queue offers a way to reach it).

Affected Software

2 affected componentsFixes available
Linux Linux kernel>=6.7<6.9.10
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.22-16.12.25-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1
  2. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Patch mm: fix crashes from deferred split racing folio migration

Event History

Aug 7, 2024
CVE Published
via MITRE·03:14 PM
Data Sourced
via MITRE·03:14 PM
DescriptionSeverity
Data Sourced
via NVD·04:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Dec 15, 2024
Data Sourced
via Ubuntu·12:32 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-42234?

CVE-2024-42234 has a severity level that could result in system crashes due to issues with deferred split racing folio migration in the Linux kernel.

2

How do I fix CVE-2024-42234?

To resolve CVE-2024-42234, update your Linux kernel to a version that includes the fix, such as 5.10.223-1, 5.10.226-1, 6.1.119-1, or later.

3

Which versions of the Linux kernel are affected by CVE-2024-42234?

CVE-2024-42234 affects Linux kernel versions from 6.7 to 6.9.10.

4

What systems are impacted by CVE-2024-42234?

Systems running vulnerable Linux kernel versions, particularly Debian and other distributions using these kernels, are impacted by CVE-2024-42234.

5

Is CVE-2024-42234 fixed in the latest Linux kernel release?

Yes, CVE-2024-42234 has been resolved in the Linux kernel updates following the affected versions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203