{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-99696",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-09-25T10:25:14.429Z",
        "datePublished": "2026-11-20T05:50:39.610Z",
        "dateUpdated": "2026-11-23T08:06:11.862Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-23T08:06:11.862Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: find the xattr entry again after defragmenting a bucket\n\nocfs2_xattr_set_entry_bucket() hands loc.xl_entry to ocfs2_xa_set() twice:\nonce for the bucket as it stands, and, if that reports -ENOSPC, once more\nafter ocfs2_defrag_xattr_bucket() has packed the name/value pairs down.\n\nDefragmenting ends by sorting the entry array on xe_name_hash.  Buckets\nare kept sorted, so the sort only permutes entries that share a hash, but\nlib/sort.c is an unstable heapsort and it does permute them.  loc.xl_entry\nis an address inside xh_entries[], so afterwards it denotes whichever\nentry landed in that slot rather than the one the search found.\n\nThe second ocfs2_xa_set() then works on the wrong entry.  Nothing on that\npath compares the entry's name with xi->xi_name, so what happens depends\non how the two entries compare in size: ocfs2_xa_reuse_entry() trips its\nBUG_ON() when the padded name sizes differ, and otherwise the new value is\nwritten into the neighbouring attribute's value slot while the attribute\nbeing set is left untouched.  setxattr() reports success either way.\n\nRemember the entry's hash before defragmenting and look the entry up\nagain afterwards, the way ocfs2_xattr_bucket_find() does.  An entry that\ncannot be found again means the bucket no longer holds what the search\nfound, so fail with -EFSCORRUPTED rather than writing through the stale\npointer."
                }
            ],
            "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": "012255961c9ecfe22b7a1df47ac26ab37818cb1e",
                            "lessThan": "f8e08be071ccc88fdf6b72f48d8f0455b7a340f0",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "012255961c9ecfe22b7a1df47ac26ab37818cb1e",
                            "lessThan": "cd5b1b2c797ba1672d126c238314de0effcee9a9",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "012255961c9ecfe22b7a1df47ac26ab37818cb1e",
                            "lessThan": "145f999a6c585ee68a6f573f727377c98caebe1d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "012255961c9ecfe22b7a1df47ac26ab37818cb1e",
                            "lessThan": "10976cdcd61075eb51799a56ac99de1acda8b84c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "012255961c9ecfe22b7a1df47ac26ab37818cb1e",
                            "lessThan": "b839d9913b56f0d769dced34cdfbe02a009b3bf1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "012255961c9ecfe22b7a1df47ac26ab37818cb1e",
                            "lessThan": "89ef9cb4da160b5572e0e5b9cf930335117d561b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "012255961c9ecfe22b7a1df47ac26ab37818cb1e",
                            "lessThan": "8c107f10fe63fdec081c2ae471fc90b4d3376db6",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "012255961c9ecfe22b7a1df47ac26ab37818cb1e",
                            "lessThan": "9a40c050f58344615a0604701b5d299519833163",
                            "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": "2.6.28",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.28",
                            "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.118",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.64",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.5",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc2",
                            "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": "2.6.28",
                                    "versionEndExcluding": "5.10.275"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.28",
                                    "versionEndExcluding": "5.15.226"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.28",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.28",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.28",
                                    "versionEndExcluding": "6.12.118"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.28",
                                    "versionEndExcluding": "6.18.64"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.28",
                                    "versionEndExcluding": "7.3.5"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.28",
                                    "versionEndExcluding": "7.4-rc2"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/f8e08be071ccc88fdf6b72f48d8f0455b7a340f0"
                },
                {
                    "url": "https://git.kernel.org/stable/c/cd5b1b2c797ba1672d126c238314de0effcee9a9"
                },
                {
                    "url": "https://git.kernel.org/stable/c/145f999a6c585ee68a6f573f727377c98caebe1d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/10976cdcd61075eb51799a56ac99de1acda8b84c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b839d9913b56f0d769dced34cdfbe02a009b3bf1"
                },
                {
                    "url": "https://git.kernel.org/stable/c/89ef9cb4da160b5572e0e5b9cf930335117d561b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8c107f10fe63fdec081c2ae471fc90b4d3376db6"
                },
                {
                    "url": "https://git.kernel.org/stable/c/9a40c050f58344615a0604701b5d299519833163"
                }
            ],
            "title": "ocfs2: find the xattr entry again after defragmenting a bucket",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}