CVE-2026-74591 (GCVE-0-2026-74591)

Vulnerability from cvelistv5 – Published: 2026-08-22 15:31 – Updated: 2026-08-25 05:40
VLAI
Title
mm/filemap: __filemap_add_folio() restore index before retrying
Summary
In the Linux kernel, the following vulnerability has been resolved: mm/filemap: __filemap_add_folio() restore index before retrying In __filemap_add_folio()'s split-a-conflict loop, xas_set_order() is applied repeatedly: each application modifies xas.xa_index, rounding it down according to the split_order attempted at that stage: and if all goes as intended, it eventually (or immediately) converges on an xas_try_split() to the required folio_order, with xas.xa_index now the same as index: then xas_store() puts the new folio into the xarray there. But if a new node was needed, and GFP_NOWAIT allocation did not get one, the lock is dropped, xas_nomem() used to allocate, and sequence retried. If (that part of) the xarray is unchanged when the lock is reacquired, no problem. But what if the conflict was meanwhile resolved by another thread (perhaps even doing the same thing, inserting a folio at that same index)? Isn't there a danger of now putting our folio into the xarray at an intermediate rounded-down index? With !folio_contains() bug to follow, when CONFIG_DEBUG_VM=y is checking for that. Fix this with an xas_set_order() to restore the original xas.xa_index at the bottom of the loop, so the retry does a full re-evaluation after reacquiring the lock, and cannot reach xas_store() with the wrong index. Production was suffering from rare SIGILLs and SIGSEGVs, executable text found a page away from where it belonged, !folio_contains() bug hit when debug enabled: symptoms not seen since this patch went in.
Assigner
Linux CNA under the mitre root
CNA scorecard D 53/100 over 6666 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 200a89c159a7a416115e6e309183c82183bf98aa , < 4917e3ebcab50f0265e8ca01c8567de4c4a47511 (git)
Affected: 200a89c159a7a416115e6e309183c82183bf98aa , < 267ecd2eb7759c26f1a026eb0a5b231071534c9c (git)
Affected: 200a89c159a7a416115e6e309183c82183bf98aa , < 86da3f7e1e609e1e8bfbab198af68467c5a015a5 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.15
Unaffected: 0 , < 6.15 (semver)
Unaffected: 6.18.45 , ≤ 6.18.* (semver)
Unaffected: 7.1.9 , ≤ 7.1.* (semver)
Unaffected: 7.2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "mm/filemap.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "4917e3ebcab50f0265e8ca01c8567de4c4a47511",
              "status": "affected",
              "version": "200a89c159a7a416115e6e309183c82183bf98aa",
              "versionType": "git"
            },
            {
              "lessThan": "267ecd2eb7759c26f1a026eb0a5b231071534c9c",
              "status": "affected",
              "version": "200a89c159a7a416115e6e309183c82183bf98aa",
              "versionType": "git"
            },
            {
              "lessThan": "86da3f7e1e609e1e8bfbab198af68467c5a015a5",
              "status": "affected",
              "version": "200a89c159a7a416115e6e309183c82183bf98aa",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "mm/filemap.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.15"
            },
            {
              "lessThan": "6.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.45",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.1.*",
              "status": "unaffected",
              "version": "7.1.9",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.45",
                  "versionStartIncluding": "6.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.1.9",
                  "versionStartIncluding": "6.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2",
                  "versionStartIncluding": "6.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/filemap: __filemap_add_folio() restore index before retrying\n\nIn __filemap_add_folio()\u0027s split-a-conflict loop, xas_set_order() is\napplied repeatedly: each application modifies xas.xa_index, rounding it\ndown according to the split_order attempted at that stage: and if all goes\nas intended, it eventually (or immediately) converges on an\nxas_try_split() to the required folio_order, with xas.xa_index now the\nsame as index: then xas_store() puts the new folio into the xarray there.\n\nBut if a new node was needed, and GFP_NOWAIT allocation did not get one,\nthe lock is dropped, xas_nomem() used to allocate, and sequence retried. \nIf (that part of) the xarray is unchanged when the lock is reacquired, no\nproblem.  But what if the conflict was meanwhile resolved by another\nthread (perhaps even doing the same thing, inserting a folio at that same\nindex)?  Isn\u0027t there a danger of now putting our folio into the xarray at\nan intermediate rounded-down index?  With !folio_contains() bug to follow,\nwhen CONFIG_DEBUG_VM=y is checking for that.\n\nFix this with an xas_set_order() to restore the original xas.xa_index at\nthe bottom of the loop, so the retry does a full re-evaluation after\nreacquiring the lock, and cannot reach xas_store() with the wrong index.\n\nProduction was suffering from rare SIGILLs and SIGSEGVs, executable text\nfound a page away from where it belonged, !folio_contains() bug hit when\ndebug enabled: symptoms not seen since this patch went in."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 9.8,
            "baseSeverity": "CRITICAL",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - __filemap_add_folio() is reached from every page-cache insert path including nfsd vfs_iocb_iter_read() and ksmbd kernel_read() on internet-facing file servers, as well as local buffered reads, writes, and mmap faults via filemap_get_folio().\nAC:L - An attacker controls both sides of the race by issuing concurrent reads/writes or NFS/SMB requests to the same file offsets while applying memory pressure to force xas_nomem() xa_node allocation retries after lock drops.\nPR:N - Exploitation requires only the ability to trigger concurrent page-cache population on accessible files via network NFS/SMB reads or local syscalls; no real root, CAP_SYS_ADMIN, or init-namespace privileges are needed.\nUI:N - The corrupt insert is triggered entirely by attacker-driven concurrent I/O and memory pressure; no victim click, mount, or other interactive action beyond normal automated file access is required.\nS:U - Corruption is confined to the kernel page cache and process address spaces on the same host; it does not cross a VM, container runtime, or IOMMU security boundary to a separate authority.\nC:H - Storing a folio at a rounded-down xarray index maps the wrong physical page to a file offset, enabling cross-page disclosure of file or kernel data; production saw executable text one page away from its correct location.\nI:H - Wrong-index folio insertion corrupts page-cache mappings and served executable content, providing a memory-corruption primitive that can alter code and data seen by userspace mappings and enable further exploitation.\nA:H - Production systems experienced rare SIGILL and SIGSEGV crashes from corrupted mappings, and CONFIG_DEBUG_VM builds hit !folio_contains() BUG checks, demonstrating reliable kernel and process termination."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-25T05:40:18.794Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/4917e3ebcab50f0265e8ca01c8567de4c4a47511"
        },
        {
          "url": "https://git.kernel.org/stable/c/267ecd2eb7759c26f1a026eb0a5b231071534c9c"
        },
        {
          "url": "https://git.kernel.org/stable/c/86da3f7e1e609e1e8bfbab198af68467c5a015a5"
        }
      ],
      "title": "mm/filemap: __filemap_add_folio() restore index before retrying",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-74591",
    "datePublished": "2026-08-22T15:31:42.661Z",
    "dateReserved": "2026-08-15T05:44:03.918Z",
    "dateUpdated": "2026-08-25T05:40:18.794Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-74591",
      "date": "2026-10-16",
      "epss": "0.00649",
      "percentile": "0.50067"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "mm/filemap.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "4917e3ebcab50f0265e8ca01c8567de4c4a47511",
                    "status": "affected",
                    "version": "200a89c159a7a416115e6e309183c82183bf98aa",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "267ecd2eb7759c26f1a026eb0a5b231071534c9c",
                    "status": "affected",
                    "version": "200a89c159a7a416115e6e309183c82183bf98aa",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "86da3f7e1e609e1e8bfbab198af68467c5a015a5",
                    "status": "affected",
                    "version": "200a89c159a7a416115e6e309183c82183bf98aa",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "mm/filemap.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.15"
                  },
                  {
                    "lessThan": "6.15",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.18.*",
                    "status": "unaffected",
                    "version": "6.18.45",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "7.1.*",
                    "status": "unaffected",
                    "version": "7.1.9",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "7.2",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/filemap: __filemap_add_folio() restore index before retrying\n\nIn __filemap_add_folio()\u0027s split-a-conflict loop, xas_set_order() is\napplied repeatedly: each application modifies xas.xa_index, rounding it\ndown according to the split_order attempted at that stage: and if all goes\nas intended, it eventually (or immediately) converges on an\nxas_try_split() to the required folio_order, with xas.xa_index now the\nsame as index: then xas_store() puts the new folio into the xarray there.\n\nBut if a new node was needed, and GFP_NOWAIT allocation did not get one,\nthe lock is dropped, xas_nomem() used to allocate, and sequence retried. \nIf (that part of) the xarray is unchanged when the lock is reacquired, no\nproblem.  But what if the conflict was meanwhile resolved by another\nthread (perhaps even doing the same thing, inserting a folio at that same\nindex)?  Isn\u0027t there a danger of now putting our folio into the xarray at\nan intermediate rounded-down index?  With !folio_contains() bug to follow,\nwhen CONFIG_DEBUG_VM=y is checking for that.\n\nFix this with an xas_set_order() to restore the original xas.xa_index at\nthe bottom of the loop, so the retry does a full re-evaluation after\nreacquiring the lock, and cannot reach xas_store() with the wrong index.\n\nProduction was suffering from rare SIGILLs and SIGSEGVs, executable text\nfound a page away from where it belonged, !folio_contains() bug hit when\ndebug enabled: symptoms not seen since this patch went in."
          },
          {
            "lang": "es",
            "value": "En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nmm/filemap: __filemap_add_folio() restaurar \u00edndice antes de reintentar\n\nEn el bucle de divisi\u00f3n de conflicto de __filemap_add_folio(), xas_set_order() se aplica repetidamente: cada aplicaci\u00f3n modifica xas.xa_index, redonde\u00e1ndolo hacia abajo seg\u00fan el split_order intentado en esa etapa; y si todo va seg\u00fan lo previsto, finalmente (o inmediatamente) converge en un xas_try_split() al folio_order requerido, con xas.xa_index ahora igual que index; entonces xas_store() coloca el nuevo folio en el xarray all\u00ed.\n\nPero si se necesitaba un nuevo nodo, y la asignaci\u00f3n GFP_NOWAIT no obtuvo uno, el bloqueo se libera, xas_nomem() se usa para asignar, y la secuencia se reintenta. Si (esa parte de) el xarray no cambia cuando se vuelve a adquirir el bloqueo, no hay problema. Pero \u00bfqu\u00e9 pasa si el conflicto fue resuelto mientras tanto por otro hilo (quiz\u00e1s incluso haciendo lo mismo, insertando un folio en ese mismo \u00edndice)? \u00bfNo hay peligro de ahora poner nuestro folio en el xarray en un \u00edndice intermedio redondeado hacia abajo? Con el error !folio_contains() a continuaci\u00f3n, cuando CONFIG_DEBUG_VM=y est\u00e1 comprobando eso.\n\nSolucione esto con un xas_set_order() para restaurar el xas.xa_index original al final del bucle, para que el reintento realice una reevaluaci\u00f3n completa despu\u00e9s de volver a adquirir el bloqueo, y no pueda alcanzar xas_store() con el \u00edndice incorrecto.\n\nLa producci\u00f3n estaba sufriendo de SIGILLs y SIGSEGVs raros, texto ejecutable encontrado a una p\u00e1gina de donde deb\u00eda estar, error !folio_contains() activado cuando la depuraci\u00f3n estaba habilitada: s\u00edntomas no vistos desde que este parche entr\u00f3."
          }
        ],
        "id": "CVE-2026-74591",
        "lastModified": "2026-10-14T13:10:00.187",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "NETWORK",
                "availabilityImpact": "HIGH",
                "baseScore": 9.8,
                "baseSeverity": "CRITICAL",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 3.9,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2026-08-22T16:16:31.353",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/267ecd2eb7759c26f1a026eb0a5b231071534c9c"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/4917e3ebcab50f0265e8ca01c8567de4c4a47511"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/86da3f7e1e609e1e8bfbab198af68467c5a015a5"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Received"
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-25T08:49:44+00:00",
      "cve": "CVE-2026-74591",
      "id": "CVE-2026-74591",
      "initial_release_date": "2026-08-22T00:00:00+00:00",
      "product_status:known_affected": "90",
      "product_status:known_not_affected": "184",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: mm/filemap: __filemap_add_folio() restore index before retrying",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-74591.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.