{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "012255961c9ecfe22b7a1df47ac26ab37818cb1e"
            },
            {
              "fixed": "49820bda28134ab0f6748e66cb104c9adcc2e116"
            },
            {
              "fixed": "1ca9787e733a29aea926f8956dffc41bf553c5ca"
            },
            {
              "fixed": "2bd2ca4f70570f08992ba38dbf2570f8def4288e"
            },
            {
              "fixed": "9c191a7a44882487e291e09f095d2ae4d7cca146"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.6.28"
            },
            {
              "fixed": "6.12.118"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.64"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99695.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: find the xattr entry again after converting a block to a bucket\n\nocfs2_xattr_create_index_block() turns a non-indexed xattr block into a\ntree by copying it into a bucket, and the copy sorts the entries: a\nblock holds them in insertion order, a bucket by name hash.\nocfs2_xattr_update_xattr_search() nevertheless relocates the caller's\nsearch by the index the entry had in the block, so unless the two orders\nagreed it points at an unrelated entry, and nothing between there and\nthe write compares that entry's name with the one being set.\n\nSetting an xattr whose new value no longer fits the block arrives here\nwith xs-\u003enot_found clear.  The block gave up because\nocfs2_xa_block_can_reuse() wants an exact namevalue size match, while\nocfs2_xa_bucket_can_reuse() only wants an entry at least as large as the\nnew one, so the bucket accepts a pair the block rejected and the update\nlands on whichever entry the sort left at that index.  Equal padded name\nlengths get that other attribute's value replaced in place and its name\nleft alone, so setxattr returns success while the attribute asked for\nkeeps its old value.  A longer one trips ocfs2_xa_reuse_entry()'s\nBUG_ON, and a shorter one is refused by the bucket as well, so\nocfs2_xa_prepare_entry() wipes the entry and writes the new name over\nit, leaving xe_name_hash describing a name that is no longer there.\n\nFind the entry again by the name being set, matching the type as well.\nThe copy carries every entry and every name over unchanged, and (type,\nname) pairs are unique within a block, so the match is exact.  The type\nmatters because the handlers strip their prefix before calling\nocfs2_xattr_set(), so user.foo and trusted.foo share a stored name, a\nstored length and a hash, and both can sit in the same block.\n\nThe name has to come from xi rather than from xs-\u003ehere: a failed set can\nremove the entry xs-\u003ehere names, and only the \"growing\" caller sets\nctxt-\u003eset_abort, which is what stops the conversion.  Scan every entry\nrather than narrowing on the hash the way ocfs2_find_xe_in_bucket()\ndoes, since an existing entry keeps the hash it was stored under, which\na kernel that sign-extended the name bytes made different from the one\ncomputed now.  An empty result means the entry did not survive the\nfailed set and this has become an insert; leaving xs-\u003ehere alone would\nkeep it pointing into the block, which is rewritten as a tree root\nbefore the caller reads it again.",
  "id": "CVE-2026-99695",
  "modified": "2026-11-20T06:46:05.379367154Z",
  "published": "2026-11-20T05:50:38.843Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/1ca9787e733a29aea926f8956dffc41bf553c5ca"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/2bd2ca4f70570f08992ba38dbf2570f8def4288e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/49820bda28134ab0f6748e66cb104c9adcc2e116"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9c191a7a44882487e291e09f095d2ae4d7cca146"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99695.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99695"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "ocfs2: find the xattr entry again after converting a block to a bucket"
}