CVE-2026-68167: btrfs: do not try compression for data reloc inodes

Published Aug 10, 2026
·
Updated

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

btrfs: do not try compression for data reloc inodes

[BUG] There is a syzbot report that the check inside getnewlocation() triggered:

BTRFS info (device loop0): found 31 extents, stage: move data extents BTRFS info (device loop0): leaf 8908800 gen 16 total ptrs 28 free space 1676 owner 18446744073709551607 item 0 key (256 INODEITEM 0) itemoff 3835 itemsize 160 inode generation 5 transid 0 size 0 nbytes 0 block group 0 mode 40755 links 1 uid 0 gid 0 rdev 0 sequence 0 flags 0x0 atime 1669132761.0 ctime 1669132761.0 mtime 1669132761.0 otime 0.0 item 1 key (256 INODEREF 256) itemoff 3823 itemsize 12 index 0 namelen 2 item 2 key (258 INODEITEM 0) itemoff 3663 itemsize 160 inode generation 1 transid 16 size 733184 nbytes 106496 block group 0 mode 100600 links 0 uid 0 gid 0 rdev 0 sequence 24 flags 0x18 item 3 key (258 EXTENTDATA 0) itemoff 3595 itemsize 68 generation 16 type 0 inline extent data size 47 rambytes 4096 compression 1 [...] item 27 key (18446744073709551611 ORPHANITEM 258) itemoff 2376 itemsize 0 BTRFS error (device loop0): unexpected non-zero offset in file extent item for data reloc inode 258 key offset 0 offset 9277520992061368337 ------------[ cut here ]------------ btrfsabortshouldprintstack(error)

[CAUSE] The above dump tree shows the first file extent item is inlined, which should make no sense for data reloc inodes, as such inodes just represent where the data extents are in the relocation destination chunk.

However the relocation path preallocates space for each block, then dirties them, cluster by cluster. It's possible to have a single block at the beginning of the block group, and no other block in the same cluster.

So relocation will preallocate a file extent for that block and dirty the first block. Then memory pressure forces the data reloc inode to be written back, before any other blocks are dirtied/allocated.

Finally commit 3eaf5f082c4c ("btrfs: extract inlined creation into a dedicated delalloc helper") changed the sequence of delalloc. Before that commit we always tried NOCOW first, so that dirtied block would be written back into the preallocated space, and appear as a regular extent.

But with that commit, we always try inline first, and since compression is forced, we try compressing the first block, and then inline the compressed data, resulting in the above inlined file extent in the data reloc tree.

Then the check in getnewlocation() will check the file offset, without checking if the file extent is inlined or not, resulting in the above failure.

[FIX] Do not allow compression for data reloc inodes.

Since data reloc inode sizes are always block aligned, as long as we do not compress, @datalen will always be at least one block, and that will cause cancowfilerangeinline() to return false, thus no inlined extent will be created.

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch 3eaf5f082c4c
  2. Configuration

    Update the Btrfs compression behavior so that compression is not attempted for data reloc inodes (i.e., ensure the kernel behavior matches 'btrfs: do not try compression for data reloc inodes').

    Linux kernel Btrfs compression behavior for data reloc inodes = disable (do not try compression for data reloc inodes)

Event History

Aug 10, 2026
CVE Published
via MITRE·11:59 AM
Data Sourced
via MITRE·11:59 AM
Description
Data Sourced
via NVD·01:20 PM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-68167?

CVE-2026-68167 has a risk rating of 38, indicating a moderate level of severity.

2

What vulnerability does CVE-2026-68167 address?

CVE-2026-68167 addresses an issue in the Linux kernel related to compression attempts on data relocation inodes.

3

How do I fix CVE-2026-68167?

To mitigate CVE-2026-68167, update your Linux kernel to the latest stable version where the vulnerability is resolved.

4

What are the potential impacts of CVE-2026-68167?

The vulnerability could lead to complications during data relocation in the btrfs file system, potentially affecting system stability.

5

When was CVE-2026-68167 published?

CVE-2026-68167 was published on August 10, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203