CVE-2026-80535: xfs: don't double-lock when deleting a self-referential directory
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
xfs: don't double-lock when deleting a self-referential directory
LOLLM notices that the dirtree scrubber can detect a directory that refers to itself. In this case, it's not correct for the directory tree repair code to try to iolock/ilock both sc->ip and dp, because they're the same inode. Fix this by detecting that corner case and handling it appropriately.
The Linux kernel CVE team has assigned CVE-2026-80535 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.10 with commit 3f31406aef493b3f19020909d29974e28253f91c and fixed in 6.12.105 with commit 17bc347cbdfb125eddac0a815b1f6c1f6eb56676 Issue introduced in 6.10 with commit 3f31406aef493b3f19020909d29974e28253f91c and fixed in 6.18.46 with commit ce2a7006ec5ed88db1b1669124ec85bc1714ccaa Issue introduced in 6.10 with commit 3f31406aef493b3f19020909d29974e28253f91c and fixed in 7.1.10 with commit c575904471570e69bce40fa638365c6c0403e2ff Issue introduced in 6.10 with commit 3f31406aef493b3f19020909d29974e28253f91c and fixed in 7.2 with commit 5fc643fb86599e29b38e7b2c2680b4b15bf8f772
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-80535
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/dirtree_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/17bc347cbdfb125eddac0a815b1f6c1f6eb56676 https://git.kernel.org/stable/c/ce2a7006ec5ed88db1b1669124ec85bc1714ccaa https://git.kernel.org/stable/c/c575904471570e69bce40fa638365c6c0403e2ff https://git.kernel.org/stable/c/5fc643fb86599e29b38e7b2c2680b4b15bf8f772