CVE-2026-31556: xfs: scrub: unlock dquot before early return in quota scrub
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
xfs: scrub: unlock dquot before early return in quota scrub
xchk_quota_item can return early after calling xchk_fblock_process_error. When that helper returns false, the function returned immediately without dropping dq->q_qlock, which can leave the dquot lock held and risk lock leaks or deadlocks in later quota operations.
Fix this by unlocking dq->q_qlock before the early return.
The Linux kernel CVE team has assigned CVE-2026-31556 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.8 with commit 7d1f0e167a067ed741dec08b7614d76893422b04 and fixed in 6.12.80 with commit e822f535273af0e8968eab7acc0cea0b90dd25af Issue introduced in 6.8 with commit 7d1f0e167a067ed741dec08b7614d76893422b04 and fixed in 6.18.21 with commit 3b0c3414b308e6822cda90bf99f7eac94d4cca2b Issue introduced in 6.8 with commit 7d1f0e167a067ed741dec08b7614d76893422b04 and fixed in 6.19.11 with commit d128fc0c5c2b19224927d4fd2a46c2fe6a1f606f Issue introduced in 6.8 with commit 7d1f0e167a067ed741dec08b7614d76893422b04 and fixed in 7.0 with commit 268378b6ad20569af0d1957992de1c8b16c6e900
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-31556
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/quota.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/e822f535273af0e8968eab7acc0cea0b90dd25af https://git.kernel.org/stable/c/3b0c3414b308e6822cda90bf99f7eac94d4cca2b https://git.kernel.org/stable/c/d128fc0c5c2b19224927d4fd2a46c2fe6a1f606f https://git.kernel.org/stable/c/268378b6ad20569af0d1957992de1c8b16c6e900