GHSA-3CJH-MHWW-RVM8

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-12-01 06:31
VLAI
Details

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

jbd2: don't advance j_fc_off before the buffer is recorded

jbd2_fc_get_buf() increments journal->j_fc_off before jbd2_journal_bmap() and __getblk() have had a chance to fail. When either does, the slot j_fc_wbuf[fc_off] is never assigned, but j_fc_off already counts it.

ext4 then fails the fast commit and falls back, and the fallback path reaches jbd2_fc_release_bufs() via ext4_fc_commit -> jbd2_fc_end_commit_fallback -> __jbd2_fc_end_commit -> ext4_fc_cleanup. That walks down from j_fc_off - 1 and put_bh()es every slot until it sees NULL, so it also touches the slot that was never written. j_fc_wbuf comes from a plain kmalloc() and is never zeroed, so a slot used for the first time holds uninitialised heap data.

Advance j_fc_off only after the buffer head has been stored. That restores the invariant that j_fc_off covers exactly the filled slots, which is what jbd2_fc_release_bufs() relies on: the live buffers of the current fast commit sit above the NULLs the previous one released, so stopping at the first NULL is correct.

Reproduced on a KASAN kernel with an ext4 fast_commit filesystem on a loop device, truncating the backing file under the live mount so that only the journal's fast-commit region falls past the end of the device. __getblk() then fails for the first fast-commit block while the rest of the journal is still addressable, so the journal is not aborted and the fast commit reaches the fallback path. j_fc_wbuf was poisoned to make the read of the never-written slot visible:

BUG: KASAN: wild-memory-access in jbd2_fc_release_bufs+0x6b/0xd0 Write of size 4 at addr 5a5a5a5a5a5a5ab2 by task sync/961 jbd2_fc_release_bufs+0x6b/0xd0 ext4_fc_cleanup+0x97/0x830 __jbd2_fc_end_commit+0x37/0xc0 ext4_fc_commit+0x524/0x560 ext4_sync_file+0x3c4/0x4b0 __x64_sys_fsync+0x20/0x30

With this patch the same run leaves j_fc_off at 0 across repeated __getblk() failures and completes cleanly.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-138875"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:17:44Z",
    "severity": "HIGH"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\njbd2: don\u0027t advance j_fc_off before the buffer is recorded\n\njbd2_fc_get_buf() increments journal-\u003ej_fc_off before jbd2_journal_bmap()\nand __getblk() have had a chance to fail.  When either does, the slot\nj_fc_wbuf[fc_off] is never assigned, but j_fc_off already counts it.\n\next4 then fails the fast commit and falls back, and the fallback path\nreaches jbd2_fc_release_bufs() via ext4_fc_commit -\u003e\njbd2_fc_end_commit_fallback -\u003e __jbd2_fc_end_commit -\u003e ext4_fc_cleanup.\nThat walks down from j_fc_off - 1 and put_bh()es every slot until it\nsees NULL, so it also touches the slot that was never written.\nj_fc_wbuf comes from a plain kmalloc() and is never zeroed, so a slot\nused for the first time holds uninitialised heap data.\n\nAdvance j_fc_off only after the buffer head has been stored.  That\nrestores the invariant that j_fc_off covers exactly the filled slots,\nwhich is what jbd2_fc_release_bufs() relies on: the live buffers of the\ncurrent fast commit sit above the NULLs the previous one released, so\nstopping at the first NULL is correct.\n\nReproduced on a KASAN kernel with an ext4 fast_commit filesystem on a\nloop device, truncating the backing file under the live mount so that\nonly the journal\u0027s fast-commit region falls past the end of the device.\n__getblk() then fails for the first fast-commit block while the rest of\nthe journal is still addressable, so the journal is not aborted and the\nfast commit reaches the fallback path.  j_fc_wbuf was poisoned to make\nthe read of the never-written slot visible:\n\n  BUG: KASAN: wild-memory-access in jbd2_fc_release_bufs+0x6b/0xd0\n  Write of size 4 at addr 5a5a5a5a5a5a5ab2 by task sync/961\n   jbd2_fc_release_bufs+0x6b/0xd0\n   ext4_fc_cleanup+0x97/0x830\n   __jbd2_fc_end_commit+0x37/0xc0\n   ext4_fc_commit+0x524/0x560\n   ext4_sync_file+0x3c4/0x4b0\n   __x64_sys_fsync+0x20/0x30\n\nWith this patch the same run leaves j_fc_off at 0 across repeated\n__getblk() failures and completes cleanly.",
  "id": "GHSA-3cjh-mhww-rvm8",
  "modified": "2026-12-01T06:31:14Z",
  "published": "2026-11-30T15:32:07Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-138875"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1ce33de62647f30bdef832e0fbe49de0c6b1bb12"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/65185848035e2c6b8561c8afeb8ef0098fb18c21"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/8b960600223b27487ab9f134e53ab71ecb1a1476"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/8c2401753d2ccad29807d249946f4b4482196f9b"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9f359c031885bb50add7d23c7a5a0e9755b134c9"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a24113bd984afc0b34a8fd2eb396791cfe511305"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ab41325c105db07cebc9cd7ba2716a93b6946426"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b55a8a037bed09b574771bc3c177131e21914c71"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ]
}



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.