CVE-2026-22980

Source
https://cve.org/CVERecord?id=CVE-2026-22980
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-22980.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-22980
Downstream
Published
2026-01-23T15:24:02.924Z
Modified
2026-03-20T12:47:16.802620Z
Summary
nfsd: provide locking for v4_end_grace
Details

In the Linux kernel, the following vulnerability has been resolved:

nfsd: provide locking for v4endgrace

Writing to v4endgrace can race with server shutdown and result in memory being accessed after it was freed - reclaimstrhashtbl in particularly.

We cannot hold nfsdmutex across the nfsd4endgrace() call as that is held while clienttrackingop->init() is called and that can wait for an upcall to nfsdcltrack which can write to v4end_grace, resulting in a deadlock.

nfsd4endgrace() is also called by the landromat work queue and this doesn't require locking as server shutdown will stop the work and wait for it before freeing anything that nfsd4endgrace() might access.

However, we must be sure that writing to v4endgrace doesn't restart the work item after shutdown has already waited for it. For this we add a new flag protected with nn->clientlock. It is set only while it is safe to make client tracking calls, and v4end_grace only schedules work while the flag is set with the spinlock held.

So this patch adds a nfsdnet field "clienttrackingactive" which is set as described. Another field "graceendforced", is set when v4endgrace is written. After this is set, and providing clienttrackingactive is set, the laundromat is scheduled. This "graceend_forced" field bypasses other checks for whether the grace period has finished.

This resolves a race which can result in use-after-free.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22980.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6
Fixed
ca97360860eb02e3ae4ba42c19b439a0fcecbf06
Fixed
e8bfa2401d4c51eca6e48e9b33c798828ca9df61
Fixed
34eb22836e0cdba093baac66599d68c4cd245a9d
Fixed
06600719d0f7a723811c45e4d51f5b742f345309
Fixed
ba4811c8b433bfa681729ca42cc62b6034f223b0
Fixed
53f07d095e7e680c5e4569a55a019f2c0348cdc6
Fixed
2857bd59feb63fcf40fe4baf55401baea6b4feb4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-22980.json"