# CVE-2026-99696: ocfs2: find the xattr entry again after defragmenting a bucket

Status: published. Published: 2026-11-20. Updated: 2026-11-23.

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

ocfs2: find the xattr entry again after defragmenting a bucket

ocfs2_xattr_set_entry_bucket() hands loc.xl_entry to ocfs2_xa_set() twice:
once for the bucket as it stands, and, if that reports -ENOSPC, once more
after ocfs2_defrag_xattr_bucket() has packed the name/value pairs down.

Defragmenting ends by sorting the entry array on xe_name_hash.  Buckets
are kept sorted, so the sort only permutes entries that share a hash, but
lib/sort.c is an unstable heapsort and it does permute them.  loc.xl_entry
is an address inside xh_entries[], so afterwards it denotes whichever
entry landed in that slot rather than the one the search found.

The second ocfs2_xa_set() then works on the wrong entry.  Nothing on that
path compares the entry's name with xi->xi_name, so what happens depends
on how the two entries compare in size: ocfs2_xa_reuse_entry() trips its
BUG_ON() when the padded name sizes differ, and otherwise the new value is
written into the neighbouring attribute's value slot while the attribute
being set is left untouched.  setxattr() reports success either way.

Remember the entry's hash before defragmenting and look the entry up
again afterwards, the way ocfs2_xattr_bucket_find() does.  An entry that
cannot be found again means the bucket no longer holds what the search
found, so fail with -EFSCORRUPTED rather than writing through the stale
pointer.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Linux / Linux: ≥ 012255961c9ecfe22b7a1df47ac26ab37818cb1e; < f8e08be071ccc88fdf6b72f48d8f0455b7a340f0 (affected, git); ≥ 012255961c9ecfe22b7a1df47ac26ab37818cb1e; < cd5b1b2c797ba1672d126c238314de0effcee9a9 (affected, git); ≥ 012255961c9ecfe22b7a1df47ac26ab37818cb1e; < 145f999a6c585ee68a6f573f727377c98caebe1d (affected, git); ≥ 012255961c9ecfe22b7a1df47ac26ab37818cb1e; < 10976cdcd61075eb51799a56ac99de1acda8b84c (affected, git); ≥ 012255961c9ecfe22b7a1df47ac26ab37818cb1e; < b839d9913b56f0d769dced34cdfbe02a009b3bf1 (affected, git); ≥ 012255961c9ecfe22b7a1df47ac26ab37818cb1e; < 89ef9cb4da160b5572e0e5b9cf930335117d561b (affected, git); ≥ 012255961c9ecfe22b7a1df47ac26ab37818cb1e; < 8c107f10fe63fdec081c2ae471fc90b4d3376db6 (affected, git); ≥ 012255961c9ecfe22b7a1df47ac26ab37818cb1e; < 9a40c050f58344615a0604701b5d299519833163 (affected, git). Source: CNA: Linux
- Linux / Linux: 2.6.28 (affected); ≥ 0; < 2.6.28 (unaffected, semver); ≥ 5.10.275; ≤ 5.10.* (unaffected, semver); ≥ 5.15.226; ≤ 5.15.* (unaffected, semver); ≥ 6.1.193; ≤ 6.1.* (unaffected, semver); ≥ 6.6.163; ≤ 6.6.* (unaffected, semver); ≥ 6.12.118; ≤ 6.12.* (unaffected, semver); ≥ 6.18.64; ≤ 6.18.* (unaffected, semver); ≥ 7.3.5; ≤ 7.3.* (unaffected, semver); ≥ 7.4-rc2; ≤ * (unaffected, original_commit_for_fix). Source: CNA: Linux

## Severity and prioritization

- CISA KEV: No listing in collected sources

- EPSS: 0.17% as of 2026-11-22; percentile 6.18%

- SSVC: Not available

- Weaknesses: Not reported

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://git.kernel.org/stable/c/f8e08be071ccc88fdf6b72f48d8f0455b7a340f0 (CNA: Linux)

- https://git.kernel.org/stable/c/cd5b1b2c797ba1672d126c238314de0effcee9a9 (CNA: Linux)

- https://git.kernel.org/stable/c/145f999a6c585ee68a6f573f727377c98caebe1d (CNA: Linux)

- https://git.kernel.org/stable/c/10976cdcd61075eb51799a56ac99de1acda8b84c (CNA: Linux)

- https://git.kernel.org/stable/c/b839d9913b56f0d769dced34cdfbe02a009b3bf1 (CNA: Linux)

- https://git.kernel.org/stable/c/89ef9cb4da160b5572e0e5b9cf930335117d561b (CNA: Linux)

- https://git.kernel.org/stable/c/8c107f10fe63fdec081c2ae471fc90b4d3376db6 (CNA: Linux)

- https://git.kernel.org/stable/c/9a40c050f58344615a0604701b5d299519833163 (CNA: Linux)

- https://git.kernel.org/stable/c/89ef9cb4da160b5572e0e5b9cf930335117d561b (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

- https://git.kernel.org/stable/c/8c107f10fe63fdec081c2ae471fc90b4d3376db6 (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

- https://git.kernel.org/stable/c/9a40c050f58344615a0604701b5d299519833163 (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

- https://git.kernel.org/stable/c/b839d9913b56f0d769dced34cdfbe02a009b3bf1 (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

## Provenance

- CNA: Linux: https://www.cve.org/CVERecord?id=CVE-2026-99696; retrieved 2026-11-23; source updated 2026-11-23

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-99696; retrieved 2026-11-20; source updated 2026-11-20

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-99696; retrieved 2026-11-23; source updated Not reported

Revision: 09e25120334404a32c09dffe73593b5abb3ed3c4a6e5344891061b54b1733f8a

Canonical: https://y2.dev/cve/CVE-2026-99696

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.