ghsa-rrh5-rfhq-mff2
Vulnerability from github
Published
2024-10-21 18:30
Modified
2024-11-13 15:31
Details

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.

Show details on source website


{
  "affected": [],
  "aliases": [
    "CVE-2024-49872"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-362"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-10-21T18:15:08Z",
    "severity": "MODERATE"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/gup: fix memfd_pin_folios alloc race panic\n\nIf memfd_pin_folios tries to create a hugetlb page, but someone else\nalready did, then folio gets the value -EEXIST here:\n\n        folio = memfd_alloc_folio(memfd, start_idx);\n        if (IS_ERR(folio)) {\n                ret = PTR_ERR(folio);\n                if (ret != -EEXIST)\n                        goto err;\n\nthen on the next trip through the \"while start_idx\" loop we panic here:\n\n        if (folio) {\n                folio_put(folio);\n\nTo fix, set the folio to NULL on error.",
  "id": "GHSA-rrh5-rfhq-mff2",
  "modified": "2024-11-13T15:31:36Z",
  "published": "2024-10-21T18:30:56Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-49872"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ce645b9fdc78ec5d28067286e92871ddae6817d5"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e28f39b359c0cfdcc011603e51187085a5f1e5e3"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.