CVE-2026-23177 (GCVE-0-2026-23177)

Vulnerability from cvelistv5 – Published: 2026-02-14 16:27 – Updated: 2026-02-14 16:27
VLAI?
Title
mm, shmem: prevent infinite loop on truncate race
Summary
In the Linux kernel, the following vulnerability has been resolved: mm, shmem: prevent infinite loop on truncate race When truncating a large swap entry, shmem_free_swap() returns 0 when the entry's index doesn't match the given index due to lookup alignment. The failure fallback path checks if the entry crosses the end border and aborts when it happens, so truncate won't erase an unexpected entry or range. But one scenario was ignored. When `index` points to the middle of a large swap entry, and the large swap entry doesn't go across the end border, find_get_entries() will return that large swap entry as the first item in the batch with `indices[0]` equal to `index`. The entry's base index will be smaller than `indices[0]`, so shmem_free_swap() will fail and return 0 due to the "base < index" check. The code will then call shmem_confirm_swap(), get the order, check if it crosses the END boundary (which it doesn't), and retry with the same index. The next iteration will find the same entry again at the same index with same indices, leading to an infinite loop. Fix this by retrying with a round-down index, and abort if the index is smaller than the truncate range.
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 809bc86517cc408b5b8cb8e08e69096639432bc8 , < dfc3ab6bd64860f8022d69903be299d09be86e11 (git)
Affected: 809bc86517cc408b5b8cb8e08e69096639432bc8 , < 7b6a0f121d50234aab3e7ab9a62ebe826d40a32a (git)
Affected: 809bc86517cc408b5b8cb8e08e69096639432bc8 , < 2030dddf95451b4e7a389f052091e7c4b7b274c6 (git)
Create a notification for this product.
    Linux Linux Affected: 6.12
Unaffected: 0 , < 6.12 (semver)
Unaffected: 6.12.70 , ≤ 6.12.* (semver)
Unaffected: 6.18.10 , ≤ 6.18.* (semver)
Unaffected: 6.19 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "mm/shmem.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "dfc3ab6bd64860f8022d69903be299d09be86e11",
              "status": "affected",
              "version": "809bc86517cc408b5b8cb8e08e69096639432bc8",
              "versionType": "git"
            },
            {
              "lessThan": "7b6a0f121d50234aab3e7ab9a62ebe826d40a32a",
              "status": "affected",
              "version": "809bc86517cc408b5b8cb8e08e69096639432bc8",
              "versionType": "git"
            },
            {
              "lessThan": "2030dddf95451b4e7a389f052091e7c4b7b274c6",
              "status": "affected",
              "version": "809bc86517cc408b5b8cb8e08e69096639432bc8",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "mm/shmem.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.12"
            },
            {
              "lessThan": "6.12",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.70",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.19",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.70",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.10",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.19",
                  "versionStartIncluding": "6.12",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm, shmem: prevent infinite loop on truncate race\n\nWhen truncating a large swap entry, shmem_free_swap() returns 0 when the\nentry\u0027s index doesn\u0027t match the given index due to lookup alignment.  The\nfailure fallback path checks if the entry crosses the end border and\naborts when it happens, so truncate won\u0027t erase an unexpected entry or\nrange.  But one scenario was ignored.\n\nWhen `index` points to the middle of a large swap entry, and the large\nswap entry doesn\u0027t go across the end border, find_get_entries() will\nreturn that large swap entry as the first item in the batch with\n`indices[0]` equal to `index`.  The entry\u0027s base index will be smaller\nthan `indices[0]`, so shmem_free_swap() will fail and return 0 due to the\n\"base \u003c index\" check.  The code will then call shmem_confirm_swap(), get\nthe order, check if it crosses the END boundary (which it doesn\u0027t), and\nretry with the same index.\n\nThe next iteration will find the same entry again at the same index with\nsame indices, leading to an infinite loop.\n\nFix this by retrying with a round-down index, and abort if the index is\nsmaller than the truncate range."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-02-14T16:27:09.429Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/dfc3ab6bd64860f8022d69903be299d09be86e11"
        },
        {
          "url": "https://git.kernel.org/stable/c/7b6a0f121d50234aab3e7ab9a62ebe826d40a32a"
        },
        {
          "url": "https://git.kernel.org/stable/c/2030dddf95451b4e7a389f052091e7c4b7b274c6"
        }
      ],
      "title": "mm, shmem: prevent infinite loop on truncate race",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-23177",
    "datePublished": "2026-02-14T16:27:09.429Z",
    "dateReserved": "2026-01-13T15:37:45.983Z",
    "dateUpdated": "2026-02-14T16:27:09.429Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-23177\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-02-14T17:15:55.430\",\"lastModified\":\"2026-02-18T17:52:22.253\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nmm, shmem: prevent infinite loop on truncate race\\n\\nWhen truncating a large swap entry, shmem_free_swap() returns 0 when the\\nentry\u0027s index doesn\u0027t match the given index due to lookup alignment.  The\\nfailure fallback path checks if the entry crosses the end border and\\naborts when it happens, so truncate won\u0027t erase an unexpected entry or\\nrange.  But one scenario was ignored.\\n\\nWhen `index` points to the middle of a large swap entry, and the large\\nswap entry doesn\u0027t go across the end border, find_get_entries() will\\nreturn that large swap entry as the first item in the batch with\\n`indices[0]` equal to `index`.  The entry\u0027s base index will be smaller\\nthan `indices[0]`, so shmem_free_swap() will fail and return 0 due to the\\n\\\"base \u003c index\\\" check.  The code will then call shmem_confirm_swap(), get\\nthe order, check if it crosses the END boundary (which it doesn\u0027t), and\\nretry with the same index.\\n\\nThe next iteration will find the same entry again at the same index with\\nsame indices, leading to an infinite loop.\\n\\nFix this by retrying with a round-down index, and abort if the index is\\nsmaller than the truncate range.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\\n\\nmm, shmem: evitar bucle infinito en una condici\u00f3n de carrera de truncamiento\\n\\nAl truncar una entrada de intercambio grande, shmem_free_swap() devuelve 0 cuando el \u00edndice de la entrada no coincide con el \u00edndice dado debido a la alineaci\u00f3n de b\u00fasqueda. La ruta de retroceso en caso de fallo comprueba si la entrada cruza el borde final y aborta cuando esto ocurre, por lo que el truncamiento no borrar\u00e1 una entrada o rango inesperado. Pero un escenario fue ignorado.\\n\\nCuando \u0027index\u0027 apunta al medio de una entrada de intercambio grande, y la entrada de intercambio grande no cruza el borde final, find_get_entries() devolver\u00e1 esa entrada de intercambio grande como el primer elemento en el lote con \u0027indices[0]\u0027 igual a \u0027index\u0027. El \u00edndice base de la entrada ser\u00e1 menor que \u0027indices[0]\u0027, por lo que shmem_free_swap() fallar\u00e1 y devolver\u00e1 0 debido a la comprobaci\u00f3n \\\"base \u0026lt; index\\\". El c\u00f3digo entonces llamar\u00e1 a shmem_confirm_swap(), obtendr\u00e1 el orden, comprobar\u00e1 si cruza el l\u00edmite END (lo cual no hace), y reintentar\u00e1 con el mismo \u00edndice.\\n\\nLa siguiente iteraci\u00f3n encontrar\u00e1 la misma entrada de nuevo en el mismo \u00edndice con los mismos \u00edndices, lo que lleva a un bucle infinito.\\n\\nSolucione esto reintentando con un \u00edndice redondeado a la baja, y abortar si el \u00edndice es menor que el rango de truncamiento.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2030dddf95451b4e7a389f052091e7c4b7b274c6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/7b6a0f121d50234aab3e7ab9a62ebe826d40a32a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/dfc3ab6bd64860f8022d69903be299d09be86e11\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


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 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.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…