{"id":"CVE-2026-22980","revision":"5d4f0c620b4f4dcf9b1e6aa6283d6b8d","records":[{"revision":"5d4f0c620b4f4dcf9b1e6aa6283d6b8d","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-22980","aliases":[],"title":"nfsd: provide locking for v4_end_grace","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: provide locking for v4_end_grace\n\nWriting to v4_end_grace can race with server shutdown and result in\nmemory being accessed after it was freed - reclaim_str_hashtbl in\nparticularly.\n\nWe cannot hold nfsd_mutex across the nfsd4_end_grace() call as that is\nheld while client_tracking_op->init() is called and that can wait for\nan upcall to nfsdcltrack which can write to v4_end_grace, resulting in a\ndeadlock.\n\nnfsd4_end_grace() is also called by the landromat work queue and this\ndoesn't require locking as server shutdown will stop the work and wait\nfor it before freeing anything that nfsd4_end_grace() might access.\n\nHowever, we must be sure that writing to v4_end_grace doesn't restart\nthe work item after shutdown has already waited for it.  For this we\nadd a new flag protected with nn->client_lock.  It is set only while it\nis safe to make client tracking calls, and v4_end_grace only schedules\nwork while the flag is set with the spinlock held.\n\nSo this patch adds a nfsd_net field \"client_tracking_active\" which is\nset as described.  Another field \"grace_end_forced\", is set when\nv4_end_grace is written.  After this is set, and providing\nclient_tracking_active is set, the laundromat is scheduled.\nThis \"grace_end_forced\" field bypasses other checks for whether the\ngrace period has finished.\n\nThis resolves a race which can result in use-after-free.","state":0,"publishedAt":"2026-01-23T15:24:02.924+00:00","modifiedAt":"2026-10-19T18:25:26.011+00:00","affected":[{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"unaffected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"fs/nfsd/netns.h\",\n                        \"fs/nfsd/nfs4state.c\",\n                        \"fs/nfsd/nfsctl.c\",\n                        \"fs/nfsd/state.h\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6\",\n                            \"lessThan\": \"ca97360860eb02e3ae4ba42c19b439a0fcecbf06\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6\",\n                            \"lessThan\": \"e8bfa2401d4c51eca6e48e9b33c798828ca9df61\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6\",\n                            \"lessThan\": \"34eb22836e0cdba093baac66599d68c4cd245a9d\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6\",\n                            \"lessThan\": \"06600719d0f7a723811c45e4d51f5b742f345309\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6\",\n                            \"lessThan\": \"ba4811c8b433bfa681729ca42cc62b6034f223b0\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6\",\n                            \"lessThan\": \"53f07d095e7e680c5e4569a55a019f2c0348cdc6\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        },\n                        {\n                            \"version\": \"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6\",\n                            \"lessThan\": \"2857bd59feb63fcf40fe4baf55401baea6b4feb4\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"git\"\n                        }\n                    ]\n                }"},{"ecosystem":"Vendor product","name":"Linux","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"product\": \"Linux\",\n                    \"vendor\": \"Linux\",\n                    \"defaultStatus\": \"affected\",\n                    \"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\n                    \"programFiles\": [\n                        \"fs/nfsd/netns.h\",\n                        \"fs/nfsd/nfs4state.c\",\n                        \"fs/nfsd/nfsctl.c\",\n                        \"fs/nfsd/state.h\"\n                    ],\n                    \"versions\": [\n                        {\n                            \"version\": \"3.18\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \"0\",\n                            \"lessThan\": \"3.18\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.10.248\",\n                            \"lessThanOrEqual\": \"5.10.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"5.15.198\",\n                            \"lessThanOrEqual\": \"5.15.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.1.161\",\n                            \"lessThanOrEqual\": \"6.1.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.6.121\",\n                            \"lessThanOrEqual\": \"6.6.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.12.66\",\n                            \"lessThanOrEqual\": \"6.12.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.18.6\",\n                            \"lessThanOrEqual\": \"6.18.*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"semver\"\n                        },\n                        {\n                            \"version\": \"6.19\",\n                            \"lessThanOrEqual\": \"*\",\n                            \"status\": \"unaffected\",\n                            \"versionType\": \"original_commit_for_fix\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"severity":"HIGH"}],"references":["https://git.kernel.org/stable/c/ca97360860eb02e3ae4ba42c19b439a0fcecbf06","https://git.kernel.org/stable/c/e8bfa2401d4c51eca6e48e9b33c798828ca9df61","https://git.kernel.org/stable/c/34eb22836e0cdba093baac66599d68c4cd245a9d","https://git.kernel.org/stable/c/06600719d0f7a723811c45e4d51f5b742f345309","https://git.kernel.org/stable/c/ba4811c8b433bfa681729ca42cc62b6034f223b0","https://git.kernel.org/stable/c/53f07d095e7e680c5e4569a55a019f2c0348cdc6","https://git.kernel.org/stable/c/2857bd59feb63fcf40fe4baf55401baea6b4feb4"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-22980","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-22980","identifiers":["CVE-2026-22980"]},"retained":false,"historicalAffected":[]}],"coverage":[]}