{"id":"CVE-2026-93221","aliases":["CVE-2026-93221"],"related":[],"kind":"vulnerability","state":"published","title":"nfsd: convert nfsd_net boolean flags to unsigned long flags word","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: convert nfsd_net boolean flags to unsigned long flags word\n\nnfsd_net contains several boolean fields that are accessed from\nconcurrent contexts without serialization.  In particular,\nnfsd4_end_grace() guards its drain path with a plain bool:\n\n    if (nn->grace_ended)\n            return;\n    nn->grace_ended = true;\n\nThe read and the write are independent, and nothing in struct\nnfsd_net serializes them.  At least two contexts can reach this\ncode with no lock held:\n\n    laundromat path\n      laundry_wq kworker\n        nfs4_laundromat()\n          nfsd4_end_grace()\n\n    RECLAIM_COMPLETE path\n      nfsd compound kthread\n        nfsd4_reclaim_complete()\n          inc_reclaim_complete()\n            nfsd4_end_grace()\n\nBoth callers can observe grace_ended == false on different CPUs,\nboth store true, and both proceed into nfsd4_record_grace_done(),\nwhich invokes the active client_tracking_ops->grace_done callback.\nFor tracking ops that drain reclaim_str_hashtbl (legacy_tracking_ops\nvia nfsd4_recdir_purge_old, and the cld v1+ ops via\nnfsd4_cld_grace_done), grace_done calls nfs4_release_reclaim(),\nwhich walks every bucket of reclaim_str_hashtbl with no lock and\ncalls nfs4_remove_reclaim_record() (list_del + kfree) on each\nentry.  Two concurrent walkers corrupt the list and double-free\nevery nfs4_client_reclaim.  A concurrent nfsd4_find_reclaim_client()\niterating the same bucket reads through freed memory.\n\nA third call site exists in nfs4_state_start_net() on the\nskip_grace startup path, but it runs under nfsd_mutex before any\nclient has connected and before the laundromat's first delayed\nwork fires, so it cannot race with the two callers above.\n\nReplace the scattered boolean fields in nfsd_net with a single\nunsigned long flags word and an enum nfsd_net_flag for the bit\npositions.  The grace_ended race is fixed by using\ntest_and_set_bit(), which is atomic on all architectures.  The\nremaining flags (grace_end_forced, in_grace, somebody_reclaimed,\ntrack_reclaim_completes, nfsd_net_up, lockd_up) are converted to\nuse test_bit/set_bit/clear_bit for consistency.  This avoids\nsub-word cmpxchg issues on architectures like Hexagon that only\nsupport word-sized atomic operations.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: convert nfsd_net boolean flags to unsigned long flags word\n\nnfsd_net contains several boolean fields that are accessed from\nconcurrent contexts without serialization.  In particular,\nnfsd4_end_grace() guards its drain path with a plain bool:\n\n    if (nn->grace_ended)\n            return;\n    nn->grace_ended = true;\n\nThe read and the write are independent, and nothing in struct\nnfsd_net serializes them.  At least two contexts can reach this\ncode with no lock held:\n\n    laundromat path\n      laundry_wq kworker\n        nfs4_laundromat()\n          nfsd4_end_grace()\n\n    RECLAIM_COMPLETE path\n      nfsd compound kthread\n        nfsd4_reclaim_complete()\n          inc_reclaim_complete()\n            nfsd4_end_grace()\n\nBoth callers can observe grace_ended == false on different CPUs,\nboth store true, and both proceed into nfsd4_record_grace_done(),\nwhich invokes the active client_tracking_ops->grace_done callback.\nFor tracking ops that drain reclaim_str_hashtbl (legacy_tracking_ops\nvia nfsd4_recdir_purge_old, and the cld v1+ ops via\nnfsd4_cld_grace_done), grace_done calls nfs4_release_reclaim(),\nwhich walks every bucket of reclaim_str_hashtbl with no lock and\ncalls nfs4_remove_reclaim_record() (list_del + kfree) on each\nentry.  Two concurrent walkers corrupt the list and double-free\nevery nfs4_client_reclaim.  A concurrent nfsd4_find_reclaim_client()\niterating the same bucket reads through freed memory.\n\nA third call site exists in nfs4_state_start_net() on the\nskip_grace startup path, but it runs under nfsd_mutex before any\nclient has connected and before the laundromat's first delayed\nwork fires, so it cannot race with the two callers above.\n\nReplace the scattered boolean fields in nfsd_net with a single\nunsigned long flags word and an enum nfsd_net_flag for the bit\npositions.  The grace_ended race is fixed by using\ntest_and_set_bit(), which is atomic on all architectures.  The\nremaining flags (grace_end_forced, in_grace, somebody_reclaimed,\ntrack_reclaim_completes, nfsd_net_up, lockd_up) are converted to\nuse test_bit/set_bit/clear_bit for consistency.  This avoids\nsub-word cmpxchg issues on architectures like Hexagon that only\nsupport word-sized atomic operations.","source":"cvelist"}],"published":"2026-09-24T15:10:44.598Z","modified":"2026-11-23T08:17:21.853Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"362063a595be959bc08f4163e6405a0266740091","fixed":"02f56a14d2dc17a687c3ee2d883a1c1c4878a9de","status":"affected"},{"type":"git","introduced":"362063a595be959bc08f4163e6405a0266740091","fixed":"94b450977c60261903c945419d2df4a464de60c4","status":"affected"},{"type":"git","introduced":"362063a595be959bc08f4163e6405a0266740091","fixed":"faac245ca739b66e96fb7bb43e21df537239a4e5","status":"affected"},{"type":"git","introduced":"362063a595be959bc08f4163e6405a0266740091","fixed":"40bab0da844c142431a6b1cc21b4cf53491dac44","status":"affected"},{"type":"git","introduced":"362063a595be959bc08f4163e6405a0266740091","fixed":"df5922fe09a8131c793ffa86adf204999b0470f8","status":"affected"},{"type":"git","introduced":"362063a595be959bc08f4163e6405a0266740091","fixed":"11a5fe42e1811f793e04ef885b639ea7668f439d","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.2","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.114","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.57","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.4","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/02f56a14d2dc17a687c3ee2d883a1c1c4878a9de","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/94b450977c60261903c945419d2df4a464de60c4","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/faac245ca739b66e96fb7bb43e21df537239a4e5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/40bab0da844c142431a6b1cc21b4cf53491dac44","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/df5922fe09a8131c793ffa86adf204999b0470f8","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/11a5fe42e1811f793e04ef885b639ea7668f439d","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-93221","url":"https://www.cve.org/CVERecord?id=CVE-2026-93221","licence":"CVE Terms of Use","modified":"2026-11-23T07:59:18.236Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-93221","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-93221","licence":"Public domain","modified":"2026-11-23T08:17:21.853Z"}],"updatedAt":"2026-11-25T22:59:40.783Z","epss":{"score":0.00547,"percentile":0.39463,"date":"2026-11-30T12:00:22.000Z"}}