CVE-2026-99741: tmpfs: keep the quota soft limits of an unused id
In the Linux kernel, the following vulnerability has been resolved:
tmpfs: keep the quota soft limits of an unused id
When the last reference to a dquot goes away, shmemreleasedquot() stores its limits in the rb tree of the mount, unless shmemisemptydquot() says that there is nothing worth storing. That function looks at the usage and at the two hard limits only.
So if the administrator sets nothing but soft limits for an id that owns no file yet, the entry is thrown away as soon as the dquot that QSETQUOTA used is released, and the id never gets to see a limit.
To fix it, compare the soft limits as well: an entry can be empty only if both soft limits are zero as well, which is exactly what shmemacquiredquot() sets for a new entry.
Fix generated by an LLM and sent by Josef Bacik in private.
[ david: slightly adjusted description ]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5
Frequently Asked Questions
Who is affected by this issue?
tmpfs mounts using quota controls are affected when an administrator configures only soft quota limits for an ID that does not yet own any files. IDs with usage or hard limits are not described as triggering the loss condition.
What action causes the configured soft limit to be lost?
The soft-limit-only quota entry can be discarded when the last reference to its dquot is released, because the prior empty-entry check ignored soft limits. As a result, that ID may never receive the configured limit.
How can administrators reduce exposure before applying the fix?
Avoid relying on soft limits alone for IDs that own no tmpfs files. The description indicates that configuring hard limits prevents the entry from being treated as empty.