{"id":"CVE-2026-22980","aliases":["CVE-2026-22980"],"related":[],"kind":"vulnerability","state":"published","title":"nfsd: provide locking for v4_end_grace","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nnfsd: proporcionar bloqueo para v4_end_grace\n\nEscribir en v4_end_grace puede competir con el apagado del servidor y resultar en que la memoria sea accedida después de haber sido liberada - reclaim_str_hashtbl en particular.\n\nNo podemos mantener nfsd_mutex durante la llamada a nfsd4_end_grace() ya que se mantiene mientras se llama a client_tracking_op-&gt;init() y eso puede esperar una llamada ascendente a nfsdcltrack que puede escribir en v4_end_grace, resultando en un interbloqueo.\n\nnfsd4_end_grace() también es llamada por la cola de trabajo 'landromat' y esto no requiere bloqueo ya que el apagado del servidor detendrá el trabajo y esperará por él antes de liberar cualquier cosa a la que nfsd4_end_grace() pudiera acceder.\n\nSin embargo, debemos asegurarnos de que escribir en v4_end_grace no reinicie el elemento de trabajo después de que el apagado ya lo haya esperado. Para esto añadimos una nueva bandera protegida con nn-&gt;client_lock. Se establece solo mientras es seguro realizar llamadas de seguimiento de cliente, y v4_end_grace solo programa trabajo mientras la bandera está establecida con el spinlock mantenido.\n\nAsí, este parche añade un campo nfsd_net 'client_tracking_active' que se establece como se describe. Otro campo 'grace_end_forced', se establece cuando se escribe en v4_end_grace. Después de que esto se establece, y siempre que client_tracking_active esté establecido, el 'laundromat' es programado. Este campo 'grace_end_forced' omite otras comprobaciones para determinar si el período de gracia ha terminado.\n\nEsto resuelve una condición de carrera que puede resultar en uso después de liberación.","source":"nvd"}],"published":"2026-01-23T15:24:02.924Z","modified":"2026-11-10T13:18:31.567Z","severity":{"scorer":"Linux","scheme":"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,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"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,"rating":"HIGH"},{"scorer":"NVD","scheme":"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,"rating":"HIGH"}],"cwes":["CWE-362","CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6","fixed":"ca97360860eb02e3ae4ba42c19b439a0fcecbf06","status":"affected"},{"type":"git","introduced":"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6","fixed":"e8bfa2401d4c51eca6e48e9b33c798828ca9df61","status":"affected"},{"type":"git","introduced":"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6","fixed":"34eb22836e0cdba093baac66599d68c4cd245a9d","status":"affected"},{"type":"git","introduced":"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6","fixed":"06600719d0f7a723811c45e4d51f5b742f345309","status":"affected"},{"type":"git","introduced":"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6","fixed":"ba4811c8b433bfa681729ca42cc62b6034f223b0","status":"affected"},{"type":"git","introduced":"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6","fixed":"53f07d095e7e680c5e4569a55a019f2c0348cdc6","status":"affected"},{"type":"git","introduced":"7f5ef2e900d9462bf9cffaf6bb246ed87a20a6d6","fixed":"2857bd59feb63fcf40fe4baf55401baea6b4feb4","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.18","status":"unaffected"},{"type":"semver","introduced":"5.10.248","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.198","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.161","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.121","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.66","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.6","lastAffected":"6.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.19","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.18","fixed":"5.10.248"},{"status":"affected","introduced":"5.11","fixed":"5.15.198"},{"status":"affected","introduced":"5.16","fixed":"6.1.161"},{"status":"affected","introduced":"6.2","fixed":"6.6.121"},{"status":"affected","introduced":"6.7","fixed":"6.12.66"},{"status":"affected","introduced":"6.13","fixed":"6.18.6"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"},{"status":"affected","version":"6.19"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ca97360860eb02e3ae4ba42c19b439a0fcecbf06","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e8bfa2401d4c51eca6e48e9b33c798828ca9df61","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/34eb22836e0cdba093baac66599d68c4cd245a9d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/06600719d0f7a723811c45e4d51f5b742f345309","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ba4811c8b433bfa681729ca42cc62b6034f223b0","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/53f07d095e7e680c5e4569a55a019f2c0348cdc6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2857bd59feb63fcf40fe4baf55401baea6b4feb4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-06-16T20:36:55.336Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-22980","url":"https://www.cve.org/CVERecord?id=CVE-2026-22980","licence":"CVE Terms of Use","modified":"2026-11-10T12:41:04.556Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-22980","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22980","licence":"Public domain","modified":"2026-11-10T13:18:31.567Z"}],"updatedAt":"2026-11-25T22:59:13.139Z","epss":{"score":0.00147,"percentile":0.04138,"date":"2026-12-02T12:00:21.000Z"}}