KernelScan.io

HIGH Introduced in 6.15

xfs MetafileResv Underflow

CVE-2026-98446

CVSS 7.2 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

01

In the Linux kernel, the following vulnerability has been resolved: xfs: don't let hidden_space go negative in xfs_metafile_resv_init LOLLM points out that if the amount of fdblocks that we can reserve for a metadata btree file goes below the space already used by that file, then the hidden_space subtraction can underflow, causing xfs_dec_fdblocks to subtract a huge amount of space. We never want the target to be less than the used sapce, so fix the logic that adjusts dblocks_avail downwards. Also fix an error in the adjacent comment.

02

Engine v0.9.0

Risk summary

A local attacker with access to an XFS filesystem can trigger an integer underflow in metadata btree space reservation calculations, causing the kernel to incorrectly account for free space. This leads to filesystem metadata corruption and potential kernel panic, resulting in data loss and denial of service.

Affectedfs/xfs/libxfs/xfs_metafile.c (xfs)

Vulnerability analysis

When calculating reserved space for metadata btrees on an XFS filesystem, the code can miscalculate if free space drops below the space already used by those trees. The reservation target gets set to the available free space without checking that it remains above the used space, causing a subtraction to wrap around to a very large number. This huge value is then subtracted from the filesystem's free block counter, corrupting space accounting. The fix clamps the reservation target to never be less than the used space, preventing the wraparound. Any local user with write access to a mounted XFS filesystem — including regular users, container workloads, or compromised services — can trigger this by filling the filesystem until free space falls below the metadata tree's used space.

03

BranchIntroducedFixed inPatch commit
6.186.156.18.55930a9c1c321e
7.26.157.2.9f0d8352a39f4
mainline6.157.3476582d754cd