GHSA-6PJJ-938M-5CCX

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32
VLAI
Details

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

fs/ntfs3: fix integer overflow in find_log_rec() causing OOB read

find_log_rec() validates the on-disk LFS_RECORD_HDR.client_data_len field (len, a raw u32 read straight from a mounted $LogFile page) against the log's total available space:

len = le32_to_cpu(rh->client_data_len);
rec_len = len + log->record_header_len;
if (rec_len >= log->total_avail)
        return -EINVAL;

The addition is unchecked. For len in [0xffffffd0, 0xffffffff] (i.e. log->record_header_len away from UINT_MAX), rec_len wraps to a small u32 value that trivially clears the rec_len >= log->total_avail guard, so a record whose declared length is actually ~4 GiB is reported as valid and in-page.

Because find_log_rec() wrongly accepts the record, its caller read_log_rec_lcb() hands it back to log_replay() as good. On the transaction-table replay leg, log_replay() re-derives the record length directly from the same raw, still-unclamped client_data_len field and uses it to size the restart-table blob:

rec_len = le32_to_cpu(frh->client_data_len);   /* ~0xffffffff */
...
t16 = le16_to_cpu(lrh->redo_off);
rt  = Add2Ptr(lrh, t16);
t32 = rec_len - t16;                            /* still ~4 GiB */
if (!check_rstbl(rt, t32))
        return -EINVAL;

check_rstbl()'s own bytes < ts bounds guard is defeated because the caller-supplied bytes (t32) is itself the poisoned ~4 GiB value, so the guard can never trigger. The subsequent entry-validation loop then walks rt->used (also attacker-controlled) entries of sizeof(struct RESTART_TABLE) == 0x18 bytes each straight past the end of the kmalloc(log->page_size) log-page buffer allocated in read_log_page(), producing an out-of-bounds read that is reachable simply by mounting a crafted $LogFile (no genuine dirty-page / crash-recovery state is required). Confirmed via KASAN as a slab-out-of-bounds read in check_rstbl(), called from log_replay() -> ntfs_loadlog_and_replay() -> ntfs_fill_super() -> mount(2).

Fix the root cause instead of hardening every downstream consumer of the poisoned length: make the addition in find_log_rec() overflow-safe with check_add_overflow(), mirroring the pattern fs/ntfs3/run.c already uses to validate other attacker-controlled on-disk length/offset arithmetic decoded from MAPPING_PAIRS runs, e.g.:

if (check_add_overflow(vcn64, len, &next_vcn))
        return -EINVAL;
...
if (check_add_overflow(lcn, len, &lcn_end))
        return -EINVAL;

(fs/ntfs3/run.c, run_unpack()).

With the overflow rejected instead of silently wrapped, rec_len is only ever a true, non-wrapped sum, so the existing rec_len >= log->total_avail check now correctly rejects any oversized record up front. log_replay()'s transaction-table leg then never gets a chance to re-read the poisoned client_data_len, and check_rstbl() is never invoked with an attacker-inflated bytes for this path.

Verified on a v6.19 KASAN build: mounting a crafted $LogFile whose client_data_len overflows trips a KASAN slab-out-of-bounds-read report in check_rstbl() before this fix; with check_add_overflow() applied, the same image is cleanly rejected during log replay and no KASAN report fires.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-138947"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:17:55Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nfs/ntfs3: fix integer overflow in find_log_rec() causing OOB read\n\nfind_log_rec() validates the on-disk LFS_RECORD_HDR.client_data_len\nfield (`len`, a raw u32 read straight from a mounted $LogFile page)\nagainst the log\u0027s total available space:\n\n    len = le32_to_cpu(rh-\u003eclient_data_len);\n    rec_len = len + log-\u003erecord_header_len;\n    if (rec_len \u003e= log-\u003etotal_avail)\n            return -EINVAL;\n\nThe addition is unchecked. For len in [0xffffffd0, 0xffffffff] (i.e.\nlog-\u003erecord_header_len away from UINT_MAX), `rec_len` wraps to a small\nu32 value that trivially clears the `rec_len \u003e= log-\u003etotal_avail`\nguard, so a record whose declared length is actually ~4 GiB is\nreported as valid and in-page.\n\nBecause find_log_rec() wrongly accepts the record, its caller\nread_log_rec_lcb() hands it back to log_replay() as good. On the\ntransaction-table replay leg, log_replay() re-derives the record\nlength directly from the same raw, still-unclamped client_data_len\nfield and uses it to size the restart-table blob:\n\n    rec_len = le32_to_cpu(frh-\u003eclient_data_len);   /* ~0xffffffff */\n    ...\n    t16 = le16_to_cpu(lrh-\u003eredo_off);\n    rt  = Add2Ptr(lrh, t16);\n    t32 = rec_len - t16;                            /* still ~4 GiB */\n    if (!check_rstbl(rt, t32))\n            return -EINVAL;\n\ncheck_rstbl()\u0027s own `bytes \u003c ts` bounds guard is defeated because the\ncaller-supplied `bytes` (t32) is itself the poisoned ~4 GiB value, so\nthe guard can never trigger. The subsequent entry-validation loop then\nwalks `rt-\u003eused` (also attacker-controlled) entries of\nsizeof(struct RESTART_TABLE) == 0x18 bytes each straight past the end\nof the kmalloc(log-\u003epage_size) log-page buffer allocated in\nread_log_page(), producing an out-of-bounds read that is reachable\nsimply by mounting a crafted $LogFile (no genuine dirty-page /\ncrash-recovery state is required). Confirmed via KASAN as a\nslab-out-of-bounds read in check_rstbl(), called from log_replay() -\u003e\nntfs_loadlog_and_replay() -\u003e ntfs_fill_super() -\u003e mount(2).\n\nFix the root cause instead of hardening every downstream consumer of\nthe poisoned length: make the addition in find_log_rec() overflow-safe\nwith check_add_overflow(), mirroring the pattern fs/ntfs3/run.c\nalready uses to validate other attacker-controlled on-disk\nlength/offset arithmetic decoded from MAPPING_PAIRS runs, e.g.:\n\n    if (check_add_overflow(vcn64, len, \u0026next_vcn))\n            return -EINVAL;\n    ...\n    if (check_add_overflow(lcn, len, \u0026lcn_end))\n            return -EINVAL;\n\n(fs/ntfs3/run.c, run_unpack()).\n\nWith the overflow rejected instead of silently wrapped, `rec_len` is\nonly ever a true, non-wrapped sum, so the existing\n`rec_len \u003e= log-\u003etotal_avail` check now correctly rejects any\noversized record up front. log_replay()\u0027s transaction-table leg then\nnever gets a chance to re-read the poisoned client_data_len, and\ncheck_rstbl() is never invoked with an attacker-inflated `bytes` for\nthis path.\n\nVerified on a v6.19 KASAN build: mounting a crafted $LogFile whose\nclient_data_len overflows trips a KASAN slab-out-of-bounds-read\nreport in check_rstbl() before this fix; with check_add_overflow()\napplied, the same image is cleanly rejected during log replay and no\nKASAN report fires.",
  "id": "GHSA-6pjj-938m-5ccx",
  "modified": "2026-11-30T15:32:10Z",
  "published": "2026-11-30T15:32:10Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138947"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/03f222fbeb55b5b3b95dd70dd1cdcb02895a7d86"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1921d296d3e79e188bed46592e0c84df6461cb99"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/3d5dbe7706a9d58b8356731aaafefb8053711b27"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/5352e7447219bf7777aa0cffe0752f655d9a0060"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/89579415a00b776698334586e6ecf01efd00049c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e2fcb0040b0b4097b2e97f3fbe77d3b66df9e816"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/fb9dd65b3bd11c3e26920e2e9ec1fd8fe63d3ba3"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



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
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

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.