CVE-2026-99965: ocfs2: reserve value tree metadata when moving an xattr into the inode
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: reserve value tree metadata when moving an xattr into the inode
ocfs2calcxattrsetneed() charges no metadata for the case where an xattr living in an xattr block or bucket moves back into the inode:
if (oldinxb) { if (ocfs2xattrcanbeininode(inode, xi, xis)) { clustersadd += newclusters; credits += ...; if (!ocfs2xattrislocal(xe)) credits += ocfs2calcextendcredits(...); goto out; } }
The credits for extending a value tree are there but the matching blocks are not, so metaadd stays 0, ocfs2initxattrsetctxt() skips ocfs2reservenewmetadatablocks() and ctxt->metaac is left NULL.
This is the shape commit 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs") fixed for the xattr block case, and it is reached the same way: namevaluesize() charges a value larger than OCFS2XATTRINLINESIZE as only OCFS2XATTRROOTSIZE, so ocfs2xattrcanbeininode() accepts a new value that will be stored outside. ocfs2xaprepareentry() installs a value root from defxv and grows it, and once the cluster allocator is fragmented enough to need a second extent ocfs2addclustersinbtree() finds the root full with no metaac at all and answers RESTARTMETA. ocfs2xattrextendallocation() turns that into -ENOSPC, or into a BUGON() without that commit, and ocfs2xacleanupvaluetruncate() takes its !origclusters arm, dropping the entry and leaking the clusters already handed out until fsck.ocfs2 reclaims them.
Reserve for the value tree here too. The entry moves back into the inode rather than into a new xattr block, so unlike the create side of metaguess this needs no block of its own.