CVE-2026-99131: xfs: fix capability check in xfs
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
xfs: fix capability check in xfs
An user reported a bug where he managed to evade group's quota by changing a file's gid to a different group id the same user belonged to, even though quotas were enforced on both gids and the file's size was big enough to exceed the quota's hardlimit.
Commit eba0549bc7d1 replaced a capable() call by a has_capability_noaudit() to prevent unnecessary selinux audit messages. Turns out that both calls have slightly different semantics even though their documentation seems similar. Where in a nutshell:
capable() - Tests the task's effective credentials has_ns_capability_noaudit() - Tests the task's real credentials
This most of the time has no practical difference but in some cases like changing attrs (specifically group id in this case) through a NFS client this will allow the quota code to use XFS_QMOPT_FORCE_RES, effectively bypassing quota accounting checks.
Using instead ns_capable_noaudit() should fix this issue and prevent selinux audit messages.
This also fix the remaining calls to has_capability_noaudit()
The Linux kernel CVE team has assigned CVE-2026-99131 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.18 with commit eba0549bc7d100691c13384b774346b8aa9cf9a9 and fixed in 6.18.59 with commit 19a1a22029ad3ae3604c763af6bd1195cb73648f Issue introduced in 5.18 with commit eba0549bc7d100691c13384b774346b8aa9cf9a9 and fixed in 7.2.13 with commit 7809ac0161c7c5f52ed348fb1ec683b2b454a83e Issue introduced in 5.18 with commit eba0549bc7d100691c13384b774346b8aa9cf9a9 and fixed in 7.3 with commit e2f62a9744ebad3bcb6347a648e615026e9efeff
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-99131
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/xfs_fsmap.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iops.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/19a1a22029ad3ae3604c763af6bd1195cb73648f https://git.kernel.org/stable/c/7809ac0161c7c5f52ed348fb1ec683b2b454a83e https://git.kernel.org/stable/c/e2f62a9744ebad3bcb6347a648e615026e9efeff