CVE-2026-89841 (GCVE-0-2026-89841)

Vulnerability from cvelistv5 – Published: 2026-09-16 10:31 – Updated: 2026-09-16 14:39
VLAI
Title
f2fs: only redirty pinned folios in redirty_blocks
Summary
In the Linux kernel, the following vulnerability has been resolved: f2fs: only redirty pinned folios in redirty_blocks redirty_blocks() pins folios with read_cache_folio() and then walks the same range again with filemap_lock_folio() to redirty them and drop the references it took. Commit 5951fee46bef ("f2fs: Use a folio in redirty_blocks()") changed the second pass to a do/while loop. If read_cache_folio() fails before anything is pinned, page_idx does not advance but the cleanup loop still runs once. If readahead has already populated the failed folio in page cache, that extra iteration finds it and folio_put_refs(folio, 2) drops one reference too many. Later drop_caches or reclaim can then report "BUG: Bad page state". Only redirty the range that was pinned successfully.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 5951fee46befbf6176c86482432f4f76e522f16c , < 445e4a1e6025ecd5312e9a95c1b234192c976ca1 (git)
Affected: 5951fee46befbf6176c86482432f4f76e522f16c , < 89c65ec3c18903de763cf567c96ab3ef60e5f3b0 (git)
Affected: 5951fee46befbf6176c86482432f4f76e522f16c , < 85171332742e741ccd6f401c69b6e0d698119e72 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.16
Unaffected: 0 , < 6.16 (semver)
Unaffected: 6.18.51 , ≤ 6.18.* (semver)
Unaffected: 7.2.5 , ≤ 7.2.* (semver)
Unaffected: 7.3-rc1 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/f2fs/file.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "445e4a1e6025ecd5312e9a95c1b234192c976ca1",
              "status": "affected",
              "version": "5951fee46befbf6176c86482432f4f76e522f16c",
              "versionType": "git"
            },
            {
              "lessThan": "89c65ec3c18903de763cf567c96ab3ef60e5f3b0",
              "status": "affected",
              "version": "5951fee46befbf6176c86482432f4f76e522f16c",
              "versionType": "git"
            },
            {
              "lessThan": "85171332742e741ccd6f401c69b6e0d698119e72",
              "status": "affected",
              "version": "5951fee46befbf6176c86482432f4f76e522f16c",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/f2fs/file.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.16"
            },
            {
              "lessThan": "6.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.51",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.51",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.5",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3-rc1",
                  "versionStartIncluding": "6.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: only redirty pinned folios in redirty_blocks\n\nredirty_blocks() pins folios with read_cache_folio() and then walks the\nsame range again with filemap_lock_folio() to redirty them and drop the\nreferences it took.\n\nCommit 5951fee46bef (\"f2fs: Use a folio in redirty_blocks()\") changed\nthe second pass to a do/while loop. If read_cache_folio() fails before\nanything is pinned, page_idx does not advance but the cleanup loop still\nruns once.\n\nIf readahead has already populated the failed folio in page cache, that\nextra iteration finds it and folio_put_refs(folio, 2) drops one\nreference too many. Later drop_caches or reclaim can then report\n\"BUG: Bad page state\".\n\nOnly redirty the range that was pinned successfully."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - redirty_blocks() is reached only via local F2FS_IOC_COMPRESS_FILE/F2FS_IOC_DECOMPRESS_FILE ioctls (f2fs_ioctl \u2192 f2fs_ioc_{compress,decompress}_file) on a mounted f2fs file; these are not network, Bluetooth, or USB protocol handlers.\nAC:L - The attacker drives the ioctl and can force the first read_cache_folio() to fail (memcg/ENOMEM, or a fatal signal during the killable wait after readahead inserted the folio), so the do/while cleanup always runs once; no victim-timed race or layout outside their control is required.\nPR:L - Neither ioctl checks capable()/CAP_SYS_ADMIN; they need only a writable fd (FMODE_WRITE) of a compression-enabled file, and owners can set FS_COMPR_FL via FS_IOC_SETFLAGS/chattr +c on Android/embedded f2fs userdata with compress_mode=user.\nUI:N - On typical f2fs deployments (Android userdata already mounted with compression/compress_mode=user) the attacker creates or opens their own file and issues the ioctl with no victim mount, open, or other action.\nS:U - Page-cache refcount underflow and the resulting kernel oops stay inside the host kernel\u0027s security authority; this is not a VM guest-to-host escape, IOMMU bypass, or sandbox breakout.\nC:H - The extra folio_put_refs(folio, 2) drops the page-cache reference and can free a folio still indexed in mapping-\u003ei_pages; that use-after-free of page-cache memory is a read primitive for arbitrary kernel/user data.\nI:H - The same underflow lets the freed folio be reused while still in the mapping (the stray pass also dirties and unlocks it), yielding a write primitive usable for control-flow hijack.\nA:H - If the folio is absent, filemap_lock_folio() returns ERR_PTR(-ENOENT) and production f2fs_bug_on() WARNs then dereferences it (oops); the extra-put path reports BUG: Bad page state on reclaim/drop_caches and can panic."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-09-16T14:39:12.019Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/445e4a1e6025ecd5312e9a95c1b234192c976ca1"
        },
        {
          "url": "https://git.kernel.org/stable/c/89c65ec3c18903de763cf567c96ab3ef60e5f3b0"
        },
        {
          "url": "https://git.kernel.org/stable/c/85171332742e741ccd6f401c69b6e0d698119e72"
        }
      ],
      "title": "f2fs: only redirty pinned folios in redirty_blocks",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-89841",
    "datePublished": "2026-09-16T10:31:15.578Z",
    "dateReserved": "2026-09-11T19:38:34.770Z",
    "dateUpdated": "2026-09-16T14:39:12.019Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-89841",
      "date": "2026-09-25",
      "epss": "0.00173",
      "percentile": "0.05953"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "fs/f2fs/file.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "445e4a1e6025ecd5312e9a95c1b234192c976ca1",
                    "status": "affected",
                    "version": "5951fee46befbf6176c86482432f4f76e522f16c",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "89c65ec3c18903de763cf567c96ab3ef60e5f3b0",
                    "status": "affected",
                    "version": "5951fee46befbf6176c86482432f4f76e522f16c",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "85171332742e741ccd6f401c69b6e0d698119e72",
                    "status": "affected",
                    "version": "5951fee46befbf6176c86482432f4f76e522f16c",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "fs/f2fs/file.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "6.16"
                  },
                  {
                    "lessThan": "6.16",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.18.*",
                    "status": "unaffected",
                    "version": "6.18.51",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "7.2.*",
                    "status": "unaffected",
                    "version": "7.2.5",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "7.3-rc1",
                    "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\nf2fs: only redirty pinned folios in redirty_blocks\n\nredirty_blocks() pins folios with read_cache_folio() and then walks the\nsame range again with filemap_lock_folio() to redirty them and drop the\nreferences it took.\n\nCommit 5951fee46bef (\"f2fs: Use a folio in redirty_blocks()\") changed\nthe second pass to a do/while loop. If read_cache_folio() fails before\nanything is pinned, page_idx does not advance but the cleanup loop still\nruns once.\n\nIf readahead has already populated the failed folio in page cache, that\nextra iteration finds it and folio_put_refs(folio, 2) drops one\nreference too many. Later drop_caches or reclaim can then report\n\"BUG: Bad page state\".\n\nOnly redirty the range that was pinned successfully."
          }
        ],
        "id": "CVE-2026-89841",
        "lastModified": "2026-09-16T15:18:12.597",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "LOW",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            }
          ]
        },
        "published": "2026-09-16T11:16:50.937",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/445e4a1e6025ecd5312e9a95c1b234192c976ca1"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/85171332742e741ccd6f401c69b6e0d698119e72"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "url": "https://git.kernel.org/stable/c/89c65ec3c18903de763cf567c96ab3ef60e5f3b0"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Received"
      }
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

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.

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.


Loading…