CVE-2026-97546: xfs: don't spin forever on zero-length dirents when salvaging them
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
xfs: don't spin forever on zero-length dirents when salvaging them
LOLLM noticed that xrep_dir_recover_data can spin forever if it encounters an unused dirent that claims to have length zero. Fix that, and prevent the same thing from happening with a zero-length entry.
The Linux kernel CVE team has assigned CVE-2026-97546 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.10 with commit b1991ee3e7cf852e95a3498801303cfbb4468681 and fixed in 6.12.111 with commit 5442f0c56445618544a801fb4dae35aed87a1aaa Issue introduced in 6.10 with commit b1991ee3e7cf852e95a3498801303cfbb4468681 and fixed in 6.18.53 with commit 08754ebfa5c28e8d57316b1bd7a5a921a5e2e762 Issue introduced in 6.10 with commit b1991ee3e7cf852e95a3498801303cfbb4468681 and fixed in 7.2.7 with commit a455c83ce5dc1a2da33b1b84253d298372a8dfbd Issue introduced in 6.10 with commit b1991ee3e7cf852e95a3498801303cfbb4468681 and fixed in 7.3-rc3 with commit 9f84792b40d0c96833341602144574bf0bd14a6a
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-97546
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/xfs/scrub/dir_repair.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/5442f0c56445618544a801fb4dae35aed87a1aaa https://git.kernel.org/stable/c/08754ebfa5c28e8d57316b1bd7a5a921a5e2e762 https://git.kernel.org/stable/c/a455c83ce5dc1a2da33b1b84253d298372a8dfbd https://git.kernel.org/stable/c/9f84792b40d0c96833341602144574bf0bd14a6a