{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-99966",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-09-25T10:25:14.449Z",
        "datePublished": "2026-11-30T13:18:42.981Z",
        "dateUpdated": "2026-11-30T13:18:42.981Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:18:42.981Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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's 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's 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->xi_value_len > OCFS2_XATTR_INLINE_SIZE) {\n                        struct ocfs2_extent_list *el = &def_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."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ocfs2/xattr.c"
                    ],
                    "versions": [
                        {
                            "version": "3ed2be719eb9770139da791342b190b20a7a9270",
                            "lessThan": "90ddf54d556b274d336356144947e1cd8f61db00",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3ed2be719eb9770139da791342b190b20a7a9270",
                            "lessThan": "bbb1e1d86906734ed94af449ec811775991dab63",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3ed2be719eb9770139da791342b190b20a7a9270",
                            "lessThan": "328e653052589b62a86f495e70d68934ebd0e188",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3ed2be719eb9770139da791342b190b20a7a9270",
                            "lessThan": "c877e33cc65777f13d78a0132d425bfa5b498d5a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3ed2be719eb9770139da791342b190b20a7a9270",
                            "lessThan": "cdba7a2e76c4a5742b831601d7cfa511ac418426",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3ed2be719eb9770139da791342b190b20a7a9270",
                            "lessThan": "16452d2c14525e6da15960afb8feea69a9060f19",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3ed2be719eb9770139da791342b190b20a7a9270",
                            "lessThan": "a12657044a3181fa5801ac1f7a55d053594cd0a7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "3ed2be719eb9770139da791342b190b20a7a9270",
                            "lessThan": "8ad5fa0c11246d260d7b12c9672e604b1f431b2e",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ocfs2/xattr.c"
                    ],
                    "versions": [
                        {
                            "version": "3.15",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.15",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.275",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.226",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.193",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.163",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.117",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.63",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.4",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.15",
                                    "versionEndExcluding": "5.10.275"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.15",
                                    "versionEndExcluding": "5.15.226"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.15",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.15",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.15",
                                    "versionEndExcluding": "6.12.117"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.15",
                                    "versionEndExcluding": "6.18.63"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.15",
                                    "versionEndExcluding": "7.3.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.15",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/90ddf54d556b274d336356144947e1cd8f61db00"
                },
                {
                    "url": "https://git.kernel.org/stable/c/bbb1e1d86906734ed94af449ec811775991dab63"
                },
                {
                    "url": "https://git.kernel.org/stable/c/328e653052589b62a86f495e70d68934ebd0e188"
                },
                {
                    "url": "https://git.kernel.org/stable/c/c877e33cc65777f13d78a0132d425bfa5b498d5a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/cdba7a2e76c4a5742b831601d7cfa511ac418426"
                },
                {
                    "url": "https://git.kernel.org/stable/c/16452d2c14525e6da15960afb8feea69a9060f19"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a12657044a3181fa5801ac1f7a55d053594cd0a7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8ad5fa0c11246d260d7b12c9672e604b1f431b2e"
                }
            ],
            "title": "ocfs2: reserve metadata for a new xattr block and its value tree",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}