{"id":"CVE-2026-99965","aliases":["CVE-2026-99965"],"related":[],"kind":"vulnerability","state":"published","title":"ocfs2: reserve value tree metadata when moving an xattr into the inode","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: reserve value tree metadata when moving an xattr into the inode\n\nocfs2_calc_xattr_set_need() charges no metadata for the case where an\nxattr living in an xattr block or bucket moves back into the inode:\n\n        if (old_in_xb) {\n                if (ocfs2_xattr_can_be_in_inode(inode, xi, xis)) {\n                        clusters_add += new_clusters;\n                        credits += ...;\n                        if (!ocfs2_xattr_is_local(xe))\n                                credits += ocfs2_calc_extend_credits(...);\n                        goto out;\n                }\n        }\n\nThe credits for extending a value tree are there but the matching blocks\nare not, so meta_add stays 0, ocfs2_init_xattr_set_ctxt() skips\nocfs2_reserve_new_metadata_blocks() and ctxt->meta_ac is left NULL.\n\nThis is the shape commit 0cdc7dde00ec (\"ocfs2: fix missing metadata\nreservation for large xattrs\") fixed for the xattr block case, and it is\nreached the same way: namevalue_size() charges a value larger than\nOCFS2_XATTR_INLINE_SIZE as only OCFS2_XATTR_ROOT_SIZE, so\nocfs2_xattr_can_be_in_inode() accepts a new value that will be stored\noutside.  ocfs2_xa_prepare_entry() installs a value root from def_xv and\ngrows it, and once the cluster allocator is fragmented enough to need a\nsecond extent ocfs2_add_clusters_in_btree() finds the root full with no\nmeta_ac at all and answers RESTART_META.  ocfs2_xattr_extend_allocation()\nturns that into -ENOSPC, or into a BUG_ON() without that commit, and\nocfs2_xa_cleanup_value_truncate() takes its !orig_clusters arm, dropping\nthe entry and leaking the clusters already handed out until fsck.ocfs2\nreclaims them.\n\nReserve for the value tree here too.  The entry moves back into the inode\nrather than into a new xattr block, so unlike the create side of\nmeta_guess this needs no block of its own.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: reserve value tree metadata when moving an xattr into the inode\n\nocfs2_calc_xattr_set_need() charges no metadata for the case where an\nxattr living in an xattr block or bucket moves back into the inode:\n\n        if (old_in_xb) {\n                if (ocfs2_xattr_can_be_in_inode(inode, xi, xis)) {\n                        clusters_add += new_clusters;\n                        credits += ...;\n                        if (!ocfs2_xattr_is_local(xe))\n                                credits += ocfs2_calc_extend_credits(...);\n                        goto out;\n                }\n        }\n\nThe credits for extending a value tree are there but the matching blocks\nare not, so meta_add stays 0, ocfs2_init_xattr_set_ctxt() skips\nocfs2_reserve_new_metadata_blocks() and ctxt->meta_ac is left NULL.\n\nThis is the shape commit 0cdc7dde00ec (\"ocfs2: fix missing metadata\nreservation for large xattrs\") fixed for the xattr block case, and it is\nreached the same way: namevalue_size() charges a value larger than\nOCFS2_XATTR_INLINE_SIZE as only OCFS2_XATTR_ROOT_SIZE, so\nocfs2_xattr_can_be_in_inode() accepts a new value that will be stored\noutside.  ocfs2_xa_prepare_entry() installs a value root from def_xv and\ngrows it, and once the cluster allocator is fragmented enough to need a\nsecond extent ocfs2_add_clusters_in_btree() finds the root full with no\nmeta_ac at all and answers RESTART_META.  ocfs2_xattr_extend_allocation()\nturns that into -ENOSPC, or into a BUG_ON() without that commit, and\nocfs2_xa_cleanup_value_truncate() takes its !orig_clusters arm, dropping\nthe entry and leaking the clusters already handed out until fsck.ocfs2\nreclaims them.\n\nReserve for the value tree here too.  The entry moves back into the inode\nrather than into a new xattr block, so unlike the create side of\nmeta_guess this needs no block of its own.","source":"cvelist"}],"published":"2026-11-30T13:18:42.439Z","modified":"2026-11-30T14:20:35.507Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"78f30c314a74b9dc5d7368d96fe4be883d9a3a04","fixed":"3a2119720cb9a2b784b1efca7df7546703a80dbe","status":"affected"},{"type":"git","introduced":"78f30c314a74b9dc5d7368d96fe4be883d9a3a04","fixed":"f6953aed116d546aeeb5119faeb5f40bcfc867f9","status":"affected"},{"type":"git","introduced":"78f30c314a74b9dc5d7368d96fe4be883d9a3a04","fixed":"2906b7db27d31c9f69bf94442a0c463a402455e5","status":"affected"},{"type":"git","introduced":"78f30c314a74b9dc5d7368d96fe4be883d9a3a04","fixed":"1e23c37bfc56ba3d89a944ec7ce2ce0c4f4054e3","status":"affected"},{"type":"git","introduced":"78f30c314a74b9dc5d7368d96fe4be883d9a3a04","fixed":"fa93db51c6b9de54770ed6715a0cb5d20934ffca","status":"affected"},{"type":"git","introduced":"78f30c314a74b9dc5d7368d96fe4be883d9a3a04","fixed":"aea3d821519b58c0ea4074734cb5cd1000a8cf65","status":"affected"},{"type":"git","introduced":"78f30c314a74b9dc5d7368d96fe4be883d9a3a04","fixed":"38c3894b287317b39decc4ff97288e0a1145464e","status":"affected"},{"type":"git","introduced":"78f30c314a74b9dc5d7368d96fe4be883d9a3a04","fixed":"f5aee8ae5f85f8dfa78160e5c4963494319cdd64","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.29","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.29","status":"unaffected"},{"type":"semver","introduced":"5.10.275","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/3a2119720cb9a2b784b1efca7df7546703a80dbe","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f6953aed116d546aeeb5119faeb5f40bcfc867f9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2906b7db27d31c9f69bf94442a0c463a402455e5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1e23c37bfc56ba3d89a944ec7ce2ce0c4f4054e3","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fa93db51c6b9de54770ed6715a0cb5d20934ffca","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/aea3d821519b58c0ea4074734cb5cd1000a8cf65","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/38c3894b287317b39decc4ff97288e0a1145464e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f5aee8ae5f85f8dfa78160e5c4963494319cdd64","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99965","url":"https://www.cve.org/CVERecord?id=CVE-2026-99965","licence":"CVE Terms of Use","modified":"2026-11-30T13:18:42.439Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99965","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99965","licence":"Public domain","modified":"2026-11-30T14:20:35.507Z"}],"updatedAt":"2026-11-30T14:33:34.024Z","epss":{"score":0.00326,"percentile":0.27687,"date":"2026-12-01T12:00:22.000Z"}}