{"id":"CVE-2026-89661","aliases":["CVE-2026-89661"],"related":[],"kind":"vulnerability","state":"published","title":"NFSD: Prevent post-shutdown use-after-free in unlock_filesystem","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nNFSD: Prevent post-shutdown use-after-free in unlock_filesystem\n\nWriting a filesystem path to /proc/fs/nfsd/unlock_filesystem runs\nnfsd4_cancel_copy_by_sb() before nfsd_mutex is held and before the\nhandler confirms that nn->nfsd_serv is set. Once nfsd has shut down,\nnfs4_state_destroy_net() has freed nn->conf_id_hashtbl but left the\npointer intact, so the cancel helper iterates freed slab memory as an\narray of struct list_head and then dereferences a bogus nfs4_client\nwhen it takes clp->async_lock. A local administrator holding\nCAP_SYS_ADMIN can reach this use-after-free by stopping the server and\nthen writing to unlock_filesystem; KASAN reports a slab-use-after-free\nread in nfsd4_cancel_copy_by_sb().\n\nnfsd4_revoke_states() walks the same state tables and for that reason\nalready runs only under nfsd_mutex with nn->nfsd_serv confirmed\npresent. Move the async COPY cancel into that protected section so\nevery NFSv4 state-table walker on this path observes a running server.\nAsync copies exist only while the server runs, so gating the cancel on\nnn->nfsd_serv loses nothing.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nNFSD: Prevent post-shutdown use-after-free in unlock_filesystem\n\nWriting a filesystem path to /proc/fs/nfsd/unlock_filesystem runs\nnfsd4_cancel_copy_by_sb() before nfsd_mutex is held and before the\nhandler confirms that nn->nfsd_serv is set. Once nfsd has shut down,\nnfs4_state_destroy_net() has freed nn->conf_id_hashtbl but left the\npointer intact, so the cancel helper iterates freed slab memory as an\narray of struct list_head and then dereferences a bogus nfs4_client\nwhen it takes clp->async_lock. A local administrator holding\nCAP_SYS_ADMIN can reach this use-after-free by stopping the server and\nthen writing to unlock_filesystem; KASAN reports a slab-use-after-free\nread in nfsd4_cancel_copy_by_sb().\n\nnfsd4_revoke_states() walks the same state tables and for that reason\nalready runs only under nfsd_mutex with nn->nfsd_serv confirmed\npresent. Move the async COPY cancel into that protected section so\nevery NFSv4 state-table walker on this path observes a running server.\nAsync copies exist only while the server runs, so gating the cancel on\nnn->nfsd_serv loses nothing.","source":"cvelist"}],"published":"2026-09-11T19:45:49.086Z","modified":"2026-10-19T09:18:03.997Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"3daab3112f039cf849f96764019b096bb0a39d04","fixed":"0c1a755b7212e0835398d4df5e782ea85ccd7476","status":"affected"},{"type":"git","introduced":"3daab3112f039cf849f96764019b096bb0a39d04","fixed":"292d915d3ba6fd15eeb88351fa10581683073109","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"7.0","status":"affected"},{"type":"semver","introduced":"0","fixed":"7.0","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/0c1a755b7212e0835398d4df5e782ea85ccd7476","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/292d915d3ba6fd15eeb88351fa10581683073109","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-89661","url":"https://www.cve.org/CVERecord?id=CVE-2026-89661","licence":"CVE Terms of Use","modified":"2026-10-19T08:50:32.806Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-89661","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89661","licence":"Public domain","modified":"2026-10-19T09:18:03.997Z"}],"updatedAt":"2026-11-25T22:59:38.103Z","epss":{"score":0.00189,"percentile":0.08992,"date":"2026-12-01T12:00:22.000Z"}}