CVE-2026-139506: ocfs2: reject inconsistent xattr bucket during defrag
In the Linux kernel, the following vulnerability has been resolved:
ocfs2: reject inconsistent xattr bucket during defrag
ocfs2defragxattrbucket() has two mlogbugonmsg() checks that assume the name/value pairs in a bucket are disjoint and that xhfreestart is not below the compacted region.
ocfs2validatexattrbucket() only checks each entry in isolation, so a corrupt bucket holding overlapping entries, or one with an inflated xhfreestart, passes validation and then hits BUG() in defrag when a setxattr triggers it.
Defrag works on a linear copy of the bucket and does not touch the real blocks before the copy back, so the checks can return an error instead of calling BUG().
Affected Software
Event History
Frequently Asked Questions
What conditions are required to trigger the failure?
An OCFS2 extended-attribute bucket must already be corrupt, with overlapping name/value entries or an inflated xh_free_start value. A setxattr operation that causes xattr defragmentation can then reach the affected checks.
What is the impact of exploiting this issue?
The described behavior is a Linux kernel BUG() during OCFS2 xattr defragmentation, which can cause a system crash or denial of service. The provided information does not describe data disclosure or privilege escalation.
How can administrators reduce exposure before applying the fix?
Avoid performing setxattr operations on OCFS2 filesystems known or suspected to contain corrupt extended-attribute buckets. The fix changes the defragmentation path to return an error for inconsistent copied buckets rather than invoking BUG().
How can this condition be distinguished from ordinary xattr problems?
The triggering condition involves an inconsistent OCFS2 xattr bucket that passes existing per-entry validation but contains overlapping entries or an xh_free_start value below the compacted region. A kernel BUG reached during xattr defragmentation after setxattr is consistent with the described issue.