GHSA-MGRF-J38J-Q2MG

Vulnerability from github – Published: 2026-09-25 12:31 – Updated: 2026-09-25 12:31
VLAI
Details

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

smb/client: fix stale page cache in insert/collapse range

smb3_insert_range() and smb3_collapse_range() use truncate_pagecache_range() to invalidate the affected page cache. However, if off or old_eof is not page-aligned, the boundary pages are only partially zeroed and remain uptodate. As a result, the client may return stale data after a successful insert/collapse range operation.

For example, with 4K pages:

page 0          page 1          page 2
0------4K       4K------8K      8K------12K
   ^                                ^
off=2K                       old_eof=10K

Page 1 is removed from the page cache, while the boundary pages are only partially zeroed. After COPYCHUNK moves the data on the server, these cached pages may still return stale data.

This can be reproduced on a CIFS mount:

bash -c '
        FILE=/mnt/scratch/repro

        # Use a 6 KiB file so EOF is not page-aligned.
        dd if=/dev/urandom of=/tmp/src bs=1K count=6 status=none

        # Expected: a 4 KiB hole followed by the original data.
        rm -f /tmp/expected
        truncate -s 4K /tmp/expected
        cat /tmp/src >> /tmp/expected

        cp /tmp/src "$FILE"

        # Prime the page cache before moving data on the server.
        cat "$FILE" > /dev/null

        fallocate --insert-range -o 0 -l 4K "$FILE"

        if cmp -s /tmp/expected "$FILE"; then
                echo "readback: OK"
        else
                echo "readback: STALE DATA"
        fi
'

Fix this by writing back dirty data and discarding the page cache from the start of the page containing off to EOF before moving data on the server.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-98125"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-09-25T11:17:43Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb/client: fix stale page cache in insert/collapse range\n\nsmb3_insert_range() and smb3_collapse_range() use\ntruncate_pagecache_range() to invalidate the affected page cache.\nHowever, if off or old_eof is not page-aligned, the boundary pages are\nonly partially zeroed and remain uptodate. As a result, the client may\nreturn stale data after a successful insert/collapse range operation.\n\nFor example, with 4K pages:\n\n    page 0          page 1          page 2\n    0------4K       4K------8K      8K------12K\n       ^                                ^\n    off=2K                       old_eof=10K\n\nPage 1 is removed from the page cache, while the boundary pages are\nonly partially zeroed. After COPYCHUNK moves the data on the server,\nthese cached pages may still return stale data.\n\nThis can be reproduced on a CIFS mount:\n\n    bash -c \u0027\n            FILE=/mnt/scratch/repro\n\n            # Use a 6 KiB file so EOF is not page-aligned.\n            dd if=/dev/urandom of=/tmp/src bs=1K count=6 status=none\n\n            # Expected: a 4 KiB hole followed by the original data.\n            rm -f /tmp/expected\n            truncate -s 4K /tmp/expected\n            cat /tmp/src \u003e\u003e /tmp/expected\n\n            cp /tmp/src \"$FILE\"\n\n            # Prime the page cache before moving data on the server.\n            cat \"$FILE\" \u003e /dev/null\n\n            fallocate --insert-range -o 0 -l 4K \"$FILE\"\n\n            if cmp -s /tmp/expected \"$FILE\"; then\n                    echo \"readback: OK\"\n            else\n                    echo \"readback: STALE DATA\"\n            fi\n    \u0027\n\nFix this by writing back dirty data and discarding the page cache from\nthe start of the page containing off to EOF before moving data on the\nserver.",
  "id": "GHSA-mgrf-j38j-q2mg",
  "modified": "2026-09-25T12:31:37Z",
  "published": "2026-09-25T12:31:37Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-98125"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/01261a6fa48b62f5ead8e88aaca1e27cb9ab9032"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/76222e76d08fbae4092ee9da84ded2b4c24ee598"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



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…