CVE-2024-49872

mm/gup: fix memfd_pin_folios alloc race panic

State
Published
Severity
Not scored
Published
Oct 21, 2024
Updated
May 11, 2026
Reserved
Oct 21, 2024

Read the record on cve.org

Description

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

mm/gup: fix memfd_pin_folios alloc race panic

If memfd_pin_folios tries to create a hugetlb page, but someone else already did, then folio gets the value -EEXIST here:

folio = memfd_alloc_folio(memfd, start_idx); if (IS_ERR(folio)) { ret = PTR_ERR(folio); if (ret != -EEXIST) goto err;

then on the next trip through the "while start_idx" loop we panic here:

if (folio) { folio_put(folio);

To fix, set the folio to NULL on error.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 89c1905d9c140372b7f50ef48f42378cf85d9bc5 to before e28f39b359c0cfdcc011603e51187085a5f1e5e3Affected
  • 89c1905d9c140372b7f50ef48f42378cf85d9bc5 to before ce645b9fdc78ec5d28067286e92871ddae6817d5Affected
LinuxLinux
  • 6.11Affected
  • before 6.11Not affected
  • 6.11.3 through 6.11.*Not affected
  • 6.12 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.