# CVE-2026-139507: ocfs2: allow xattr bucket entries to span multiple blocks

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **Published:** 2026-11-30T13:35:23.485Z
- **Modified:** 2026-11-30T14:19:26.303Z

## Who should check

- Anyone running Linux \>= dc5778dbd0b6c411107a0e37e913a94b3c2f2728, \< 13745a6cc1f82f88365fb06a5590eba35e79cfab; \>= ee4ef26927e967ea699b3f0d7ecf97ce044fbc79, \< a0ab8943a115e5806d64fc81af0b939dbf2575e6; \>= 2cf82b46d5e43be0dfbaac7fa1073cec2fc1f5e6, \< 4b0adafbb676900ffa674306c4325ee7f4837f2f; \>= 2cf82b46d5e43be0dfbaac7fa1073cec2fc1f5e6, \< 78cce2082d22d3c56bd3a6146ef0dcf7cd661a33; 9f4129b6905b7d638bbc9eb8013c3989cbe30b7e; \>= 6.6.160, \< 6.6.163; \>= 6.12.114, \< 6.12.119; \>= 7.2.6, \< 7.3
- Anyone running Linux 7.3

## Description

In the Linux kernel, the following vulnerability has been resolved:

ocfs2: allow xattr bucket entries to span multiple blocks

Patch series "ocfs2: xattr bucket validation fixes", v2.

This series fixes two problems around xattr bucket validation.

Patch 1 fixes a false-corruption failure on blocksize-512 volumes: the
bucket validator limited the entry array to the first bucket block while
the write path stores entries across the whole 4096-byte bucket region, so
a legitimately written, fsck-clean bucket could be rejected and force the
filesystem read-only.  It also adds an alignment check on the bucket block
number, since the entry array is accessed as one contiguous region and a
corrupted xattr tree could otherwise point a bucket at blocks straddling a
page boundary.

Patch 2 converts two mlog\_bug\_on\_msg() checks in the bucket defrag path to
ocfs2\_error() returns, so that a corrupt bucket holding overlapping
entries or an inflated xh\_free\_start marks the filesystem read-only and
fails the setxattr instead of panicking the kernel.

Both patches have been tested in QEMU: the blocksize-512 reproducer (40
xattrs with 100-byte values, previously failing with "entry count 32
exceeds maximum 31") now passes with a clean fsck.ocfs2 result, and the
ocfs2 testsuite xattr tests pass 48/48 across blocksize combinations.


This patch (of 2):

ocfs2\_validate\_xattr\_bucket() limits the entry array to the first bucket
block, but the write path stores entries across the whole
OCFS2\_XATTR\_BUCKET\_SIZE region.  With 512-byte blocks a bucket spans eight
blocks, and a bucket filled with small xattrs places its last entries past
offset 512.  Reading such a bucket back errors out:

  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.

This is reproducible by setting ~33 xattrs with 100-byte values on a file
on a blocksize-512 volume; fsck.ocfs2 reports the resulting image clean.

Check the entry count against the full bucket region instead.  The
per-block bounds checks for names and values stay as they are, since
ocfs2\_bucket\_align\_free\_start() keeps each name+value pair within a single
block.

The entry array is one contiguous region, so a bucket from a corrupted
xattr tree whose first block is not aligned to OCFS2\_XATTR\_BUCKET\_SIZE
could straddle a page and make the validation loop read out of bounds. 
Buckets allocated within clusters are always aligned, so reject any other
block number while validating.

## Affected and fixed versions

- Linux: \>= dc5778dbd0b6c411107a0e37e913a94b3c2f2728, \< 13745a6cc1f82f88365fb06a5590eba35e79cfab; \>= ee4ef26927e967ea699b3f0d7ecf97ce044fbc79, \< a0ab8943a115e5806d64fc81af0b939dbf2575e6; \>= 2cf82b46d5e43be0dfbaac7fa1073cec2fc1f5e6, \< 4b0adafbb676900ffa674306c4325ee7f4837f2f; \>= 2cf82b46d5e43be0dfbaac7fa1073cec2fc1f5e6, \< 78cce2082d22d3c56bd3a6146ef0dcf7cd661a33; 9f4129b6905b7d638bbc9eb8013c3989cbe30b7e; \>= 6.6.160, \< 6.6.163; \>= 6.12.114, \< 6.12.119; \>= 7.2.6, \< 7.3 (cvelist)
- Linux: 7.3 (cvelist)

## Technologies

Linux kernel

## Mitigation

- Upgrade Linux to 7.3 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-139507. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-139507.md
Affected: Linux >= dc5778dbd0b6c411107a0e37e913a94b3c2f2728, < 13745a6cc1f82f88365fb06a5590eba35e79cfab; >= ee4ef26927e967ea699b3f0d7ecf97ce044fbc79, < a0ab8943a115e5806d64fc81af0b939dbf2575e6; >= 2cf82b46d5e43be0dfbaac7fa1073cec2fc1f5e6, < 4b0adafbb676900ffa674306c4325ee7f4837f2f; >= 2cf82b46d5e43be0dfbaac7…
Fixed in: Linux 13745a6cc1f82f88365fb06a5590eba35e79cfab, Linux 4b0adafbb676900ffa674306c4325ee7f4837f2f, Linux 78cce2082d22d3c56bd3a6146ef0dcf7cd661a33, Linux 6.6.163, Linux 6.12.119, Linux 7.3

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-139507 being exploited?

There is no confirmed exploitation: CVE-2026-139507 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-139507?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-139507?

Linux \>= dc5778dbd0b6c411107a0e37e913a94b3c2f2728, \< 13745a6cc1f82f88365fb06a5590eba35e79cfab; \>= ee4ef26927e967ea699b3f0d7ecf97ce044fbc79, \< a0ab8943a115e5806d64fc81af0b939dbf2575e6; \>= 2cf82b46d5e43be0dfbaac7fa1073cec2fc1f5e6, \< 4b0adafbb676900ffa674306c4325ee7f4837f2f; \>= 2cf82b46d5e43be0dfbaac7fa1073cec2fc1f5e6, \< 78cce2082d22d3c56bd3a6146ef0dcf7cd661a33; 9f4129b6905b7d638bbc9eb8013c3989cbe30b7e; \>= 6.6.160, \< 6.6.163; \>= 6.12.114, \< 6.12.119; \>= 7.2.6, \< 7.3; Linux 7.3.

### Is there a fix for CVE-2026-139507?

Yes. Fixed in Linux 13745a6cc1f82f88365fb06a5590eba35e79cfab, Linux 4b0adafbb676900ffa674306c4325ee7f4837f2f, Linux 78cce2082d22d3c56bd3a6146ef0dcf7cd661a33, Linux 6.6.163, Linux 6.12.119, Linux 7.3. Upgrade Linux to 7.3 or later.

### How do I check if I'm affected by CVE-2026-139507?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/13745a6cc1f82f88365fb06a5590eba35e79cfab>
- other: <https://git.kernel.org/stable/c/a0ab8943a115e5806d64fc81af0b939dbf2575e6>
- other: <https://git.kernel.org/stable/c/4b0adafbb676900ffa674306c4325ee7f4837f2f>
- other: <https://git.kernel.org/stable/c/78cce2082d22d3c56bd3a6146ef0dcf7cd661a33>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-139507>

HTML: <https://flawdb.com/CVE-2026-139507> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-139507>
