GHSA-FXVV-7XQ5-MX27

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:

ocfs2: reserve metadata for a new xattr block and its value tree

Patch series "ocfs2: fix metadata reservation for xattr value trees".

ocfs2_calc_xattr_set_need() reserves too little metadata for a new xattr value's extent tree on three paths. The reservation cannot be topped up once the transaction has started, so ocfs2_add_clusters_in_btree() gives up with RESTART_META when the value root fills and nothing is left. ocfs2_xattr_extend_allocation() turns that into -ENOSPC, after ocfs2_xa_cleanup_value_truncate() has dropped the entry and leaked the clusters already handed out; before commit 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs") it was a BUG_ON() instead. It takes a fragmented cluster allocator to get there, since the first extent always fits in the root.

Patch 1 fixes the create side of meta_guess: commit 3ed2be719eb9 ("ocfs2: allow for more than one data extent when creating xattr") replaced the block reserved for the new xattr block with the two the value tree needs instead of adding them together.

Patch 2 fixes the arm that moves an xattr back into the inode, which charges credits for a value tree but no metadata for one.

Patch 3 drops a second copy of the same reservation on the path that falls through to meta_guess. That one is cleanup rather than a fix and is not for stable, and it must not be backported without patch 1: the duplicate it removes is what currently covers the shortfall patch 1 fixes.

This patch (of 3):

The create side of meta_guess in ocfs2_calc_xattr_set_need() reserves metadata for the new value's extent tree and nothing for the xattr block that will hold it:

    } else {
            credits += OCFS2_XATTR_BLOCK_CREATE_CREDITS;
            if (xi->xi_value_len > OCFS2_XATTR_INLINE_SIZE) {
                    struct ocfs2_extent_list *el = &def_xv.xv.xr_list;
                    meta_add += ocfs2_extend_meta_needed(el);
                    ...

Commit 3ed2be719eb9 ("ocfs2: allow for more than one data extent when creating xattr") meant to add that tree on top of the meta_add += 1 the branch already had, but it moved the 1 into the else arm instead, so the external-value case lost it. The 1 is not optional: it is what ocfs2_create_xattr_block() takes from meta_ac through ocfs2_claim_metadata(), and it is spent before the value tree exists.

ocfs2_extend_meta_needed() on the empty def_xv list returns 2, so the branch reserves 2 where 3 are needed. The xattr block consumes one, and when the cluster allocator is fragmented enough that the value needs more than one extent, ocfs2_add_clusters_in_btree() comes back around with a full value root and ocfs2_alloc_context_bits_left() of 1 against a threshold of 2. It answers RESTART_META, which ocfs2_xattr_extend_allocation() turns into a BUG_ON(). Commit 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs") downgraded that to -ENOSPC, at the cost of leaking the clusters already handed out: ocfs2_xa_cleanup_value_truncate() takes its !orig_clusters arm, drops the entry and leaves the clusters for fsck.ocfs2 to reclaim.

Reserve for the block and the tree separately.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-99966"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:20:35Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: reserve metadata for a new xattr block and its value tree\n\nPatch series \"ocfs2: fix metadata reservation for xattr value trees\".\n\nocfs2_calc_xattr_set_need() reserves too little metadata for a new xattr\nvalue\u0027s extent tree on three paths.  The reservation cannot be topped up\nonce the transaction has started, so ocfs2_add_clusters_in_btree() gives\nup with RESTART_META when the value root fills and nothing is left. \nocfs2_xattr_extend_allocation() turns that into -ENOSPC, after\nocfs2_xa_cleanup_value_truncate() has dropped the entry and leaked the\nclusters already handed out; before commit 0cdc7dde00ec (\"ocfs2: fix\nmissing metadata reservation for large xattrs\") it was a BUG_ON() instead.\nIt takes a fragmented cluster allocator to get there, since the first\nextent always fits in the root.\n\nPatch 1 fixes the create side of meta_guess: commit 3ed2be719eb9 (\"ocfs2:\nallow for more than one data extent when creating xattr\") replaced the\nblock reserved for the new xattr block with the two the value tree needs\ninstead of adding them together.\n\nPatch 2 fixes the arm that moves an xattr back into the inode, which\ncharges credits for a value tree but no metadata for one.\n\nPatch 3 drops a second copy of the same reservation on the path that falls\nthrough to meta_guess.  That one is cleanup rather than a fix and is not\nfor stable, and it must not be backported without patch 1: the duplicate\nit removes is what currently covers the shortfall patch 1 fixes.\n\n\nThis patch (of 3):\n\nThe create side of meta_guess in ocfs2_calc_xattr_set_need() reserves\nmetadata for the new value\u0027s extent tree and nothing for the xattr block\nthat will hold it:\n\n        } else {\n                credits += OCFS2_XATTR_BLOCK_CREATE_CREDITS;\n                if (xi-\u003exi_value_len \u003e OCFS2_XATTR_INLINE_SIZE) {\n                        struct ocfs2_extent_list *el = \u0026def_xv.xv.xr_list;\n                        meta_add += ocfs2_extend_meta_needed(el);\n                        ...\n\nCommit 3ed2be719eb9 (\"ocfs2: allow for more than one data extent when\ncreating xattr\") meant to add that tree on top of the meta_add += 1 the\nbranch already had, but it moved the 1 into the else arm instead, so the\nexternal-value case lost it.  The 1 is not optional: it is what\nocfs2_create_xattr_block() takes from meta_ac through\nocfs2_claim_metadata(), and it is spent before the value tree exists.\n\nocfs2_extend_meta_needed() on the empty def_xv list returns 2, so the\nbranch reserves 2 where 3 are needed.  The xattr block consumes one, and\nwhen the cluster allocator is fragmented enough that the value needs more\nthan one extent, ocfs2_add_clusters_in_btree() comes back around with a\nfull value root and ocfs2_alloc_context_bits_left() of 1 against a\nthreshold of 2.  It answers RESTART_META, which\nocfs2_xattr_extend_allocation() turns into a BUG_ON().  Commit\n0cdc7dde00ec (\"ocfs2: fix missing metadata reservation for large xattrs\")\ndowngraded that to -ENOSPC, at the cost of leaking the clusters already\nhanded out: ocfs2_xa_cleanup_value_truncate() takes its !orig_clusters\narm, drops the entry and leaves the clusters for fsck.ocfs2 to reclaim.\n\nReserve for the block and the tree separately.",
  "id": "GHSA-fxvv-7xq5-mx27",
  "modified": "2026-11-30T15:32:51Z",
  "published": "2026-11-30T15:32:51Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99966"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/16452d2c14525e6da15960afb8feea69a9060f19"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/328e653052589b62a86f495e70d68934ebd0e188"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/8ad5fa0c11246d260d7b12c9672e604b1f431b2e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/90ddf54d556b274d336356144947e1cd8f61db00"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a12657044a3181fa5801ac1f7a55d053594cd0a7"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/bbb1e1d86906734ed94af449ec811775991dab63"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c877e33cc65777f13d78a0132d425bfa5b498d5a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/cdba7a2e76c4a5742b831601d7cfa511ac418426"
    }
  ],
  "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.