Overview
CVE-2026-139507 tracks a two-patch series titled "ocfs2: xattr bucket validation fixes" (v2) merged into the Linux kernel. It addresses two distinct issues inside the OCFS2 (Oracle Cluster File System 2) extended attribute ("xattr") bucket validation path. The first patch repairs a validator bug that misclassifies valid bucket contents as corruption on 512-byte block-size volumes. The second patch hardens the bucket defrag flow so a corrupt xattr bucket cannot panic the host kernel.
Technical Background
OCFS2 organizes xattrs on disk inside bucket blocks. Each bucket has a fixed on-disk size, OCFS2_XATTR_BUCKET_SIZE, set to 4096 bytes in the upstream code. On a typical 4 KiB block-size volume, a single bucket occupies one block and the validator's per-block view lines up with the writer's per-bucket view. On a 512-byte block-size volume the same bucket spans eight blocks, and the per-block assumption no longer matches the writer's behaviour.
Defect 1: Validator vs. Writer Mismatch
ocfs2_validate_xattr_bucket() limits the entry array it inspects to the first bucket block. The write path, however, can legitimately place entries across the full 4096-byte OCFS2_XATTR_BUCKET_SIZE region. With a 512-byte block size, a bucket holding many small xattrs ends up with entries past the first 512-byte block.
When the bucket is reread, validation reports:
OCFS2: ERROR (device loop0): ocfs2_validate_xattr_bucket: Invalid xattr bucket 86072: entry count 32 exceeds maximum 31
On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted.
OCFS2: File system is now read-only.
The image is actually clean, as fsck.ocfs2 confirms, but the cluster filesystem has already been moved to read-only mode. A working reproducer is approximately 33 xattrs of 100-byte values on a file inside a blocksize-512 OCFS2 volume. The fix compares the entry count against the full bucket region instead of the first block, while keeping the per-block bounds checks for names and values because ocfs2_bucket_align_free_start() keeps each name+value pair inside one block.
The same patch adds a bucket-block alignment check. Because the entry array is one contiguous region, a bucket pointed at by a corrupted xattr tree whose first block is not aligned to OCFS2_XATTR_BUCKET_SIZE could straddle a page boundary and produce out-of-bounds reads in the validation loop. Cluster-allocated buckets are always aligned, so the validator now rejects non-aligned block numbers.
Defect 2: Panic-Prone Defrag Path
Two mlog_bug_on_msg() calls in the bucket defrag path react to overlapping bucket entries or an inflated xh_free_start by panicking the kernel. The series replaces them with ocfs2_error() returns, so the filesystem is marked read-only and the triggering setxattr fails cleanly instead of crashing the host.
Affected Systems
- Product: Linux kernel, OCFS2 filesystem driver.
- Affected configuration (Defect 1): OCFS2 volumes formatted with a 512-byte block size. On standard 4 KiB block-size volumes the validator/writer mismatch does not reproduce in practice.
- Affected configuration (Defect 2 and alignment check): Systems using the OCFS2 bucket defrag path against an already-corrupt on-disk image. Cluster-allocated buckets are always aligned; the alignment check rejects non-aligned candidates.
- Affected user base: Local operators of clustered OCFS2 mounts where 512-byte volumes are in use, including some embedded, virtualised, and legacy storage deployments.
The advisory published on 2026-11-30 does not list a specific kernel version range in the provided text. Verification used a QEMU blocksize-512 reproducer and the upstream ocfs2 testsuite, which passes 48/48 across blocksize combinations.
Threat Model and Real-World Impact
Neither defect requires network access. Both are reachable locally through normal filesystem operations on an OCFS2 mount. Defect 1 can be triggered by a regular user workload, transforming a legitimate write into an unnecessary read-only transition and forcing an fsck.ocfs2 run followed by a remount — effectively a denial-of-service against cluster operations. Defect 2 and the alignment check amplify that risk against already-corrupt images, with the unpatched kernel able to panic the host or read out of bounds during validation.
No public exploitation is referenced in the advisory, and CVE-2026-139507 is not listed on the CISA KEV catalog with no CVSS score attached. Real-world exposure is bounded by the unusual 512-byte-block configuration and by the need for an existing on-disk corruption to reach the panic-prone path, placing the practical impact in the low range.
Mitigation
- Patch: Apply the upstream Linux kernel patches from the "ocfs2: xattr bucket validation fixes" series, which retarget the validator against the full
OCFS2_XATTR_BUCKET_SIZEregion, add the bucket-block alignment check, and convert the twomlog_bug_on_msg()defrag paths toocfs2_error()returns.
- Configuration: Where operational constraints allow, prefer standard 4 KiB block-size OCFS2 volumes, which avoid the validator/writer mismatch entirely.
- Recovery: If a legitimate workload has already pushed a 512-byte-block OCFS2 volume into the read-only state, unmount cleanly, run
fsck.ocfs2, and remount. The image is fsck-clean in this scenario.
- Detection: Monitor kernel logs for
ocfs2_validate_xattr_bucketreports of the form "entry count N exceeds maximum M", watch for unexpected OCFS2 read-only transitions, and alert onmlog_bug_on_msgtriggered messages that under unpatched kernels would precede a host panic.
Bottom Line
CVE-2026-139507 is a local-only kernel fix that repairs a misclassification of valid OCFS2 xattr bucket data on 512-byte-block volumes and removes two panic-prone assertions from the defrag path. Real-world impact is limited to a niche filesystem configuration plus already-corrupt images, with no known exploitation, placing it in the low-severity band.