{"id":"CVE-2021-47506","aliases":["CVE-2021-47506"],"related":[],"kind":"vulnerability","state":"published","title":"nfsd: fix use-after-free due to delegation race","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: fix use-after-free due to delegation race\n\nA delegation break could arrive as soon as we've called vfs_setlease.  A\ndelegation break runs a callback which immediately (in\nnfsd4_cb_recall_prepare) adds the delegation to del_recall_lru.  If we\nthen exit nfs4_set_delegation without hashing the delegation, it will be\nfreed as soon as the callback is done with it, without ever being\nremoved from del_recall_lru.\n\nSymptoms show up later as use-after-free or list corruption warnings,\nusually in the laundromat thread.\n\nI suspect aba2072f4523 \"nfsd: grant read delegations to clients holding\nwrites\" made this bug easier to hit, but I looked as far back as v3.0\nand it looks to me it already had the same problem.  So I'm not sure\nwhere the bug was introduced; it may have been there from the beginning.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: fix use-after-free due to delegation race\n\nA delegation break could arrive as soon as we've called vfs_setlease.  A\ndelegation break runs a callback which immediately (in\nnfsd4_cb_recall_prepare) adds the delegation to del_recall_lru.  If we\nthen exit nfs4_set_delegation without hashing the delegation, it will be\nfreed as soon as the callback is done with it, without ever being\nremoved from del_recall_lru.\n\nSymptoms show up later as use-after-free or list corruption warnings,\nusually in the laundromat thread.\n\nI suspect aba2072f4523 \"nfsd: grant read delegations to clients holding\nwrites\" made this bug easier to hit, but I looked as far back as v3.0\nand it looks to me it already had the same problem.  So I'm not sure\nwhere the bug was introduced; it may have been there from the beginning.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: nfsd: corrige el use-after-free debido a la ejecución de delegación. Una interrupción de la delegación podría llegar tan pronto como hayamos llamado a vfs_setlease. Una interrupción de la delegación ejecuta una devolución de llamada que inmediatamente (en nfsd4_cb_recall_prepare) agrega la delegación a del_recall_lru. Si luego salimos de nfs4_set_delegation sin aplicar hash a la delegación, se liberará tan pronto como finalice la devolución de llamada, sin eliminarse nunca de del_recall_lru. Los síntomas aparecen más tarde como advertencias de use-after-free o de corrupción en la lista, generalmente en el hilo de la lavandería. Sospecho que aba2072f4523 \"nfsd: otorgar delegaciones de lectura a clientes que tienen escrituras\" hizo que este error fuera más fácil de corregir, pero miré hasta la versión 3.0 y me parece que ya tenía el mismo problema. Entonces no estoy seguro de dónde se introdujo el error; puede que haya estado ahí desde el principio.","source":"nvd"}],"published":"2024-05-24T15:01:52.746Z","modified":"2026-08-05T08:48:10.240Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"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-416"],"affected":[{"ranges":[{"type":"git","introduced":"dff1399f8addf7129c49bb2227469da79cc30b47","fixed":"04a8d07f3d58308b92630045560799a3faa3ebce","status":"affected"},{"type":"git","introduced":"dff1399f8addf7129c49bb2227469da79cc30b47","fixed":"348714018139c39533c55661a0c7c990671396b4","status":"affected"},{"type":"git","introduced":"dff1399f8addf7129c49bb2227469da79cc30b47","fixed":"33645d3e22720cac1e4548f8fef57bf0649536ee","status":"affected"},{"type":"git","introduced":"dff1399f8addf7129c49bb2227469da79cc30b47","fixed":"2becaa990b93cbd2928292c0b669d3abb6cf06d4","status":"affected"},{"type":"git","introduced":"dff1399f8addf7129c49bb2227469da79cc30b47","fixed":"e0759696de6851d7536efddfdd2dfed4c4df1f09","status":"affected"},{"type":"git","introduced":"dff1399f8addf7129c49bb2227469da79cc30b47","fixed":"eeb0711801f5e19ef654371b627682aed3b11373","status":"affected"},{"type":"git","introduced":"dff1399f8addf7129c49bb2227469da79cc30b47","fixed":"148c816f10fd11df27ca6a9b3238cdd42fa72cd3","status":"affected"},{"type":"git","introduced":"dff1399f8addf7129c49bb2227469da79cc30b47","fixed":"548ec0805c399c65ed66c6641be467f717833ab5","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.17","status":"unaffected"},{"type":"semver","introduced":"4.4.296","lastAffected":"4.4.*","status":"unaffected"},{"type":"semver","introduced":"4.9.294","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.259","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.222","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.168","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.85","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.8","lastAffected":"5.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.16","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","fixed":"4.4.296"},{"status":"affected","introduced":"4.5","fixed":"4.9.294"},{"status":"affected","introduced":"4.10","fixed":"4.14.259"},{"status":"affected","introduced":"4.15","fixed":"4.19.222"},{"status":"affected","introduced":"4.20","fixed":"5.4.168"},{"status":"affected","introduced":"5.5","fixed":"5.10.85"},{"status":"affected","introduced":"5.11","fixed":"5.15.8"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"},{"status":"affected","version":"5.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/04a8d07f3d58308b92630045560799a3faa3ebce","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/348714018139c39533c55661a0c7c990671396b4","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/33645d3e22720cac1e4548f8fef57bf0649536ee","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2becaa990b93cbd2928292c0b669d3abb6cf06d4","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e0759696de6851d7536efddfdd2dfed4c4df1f09","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/eeb0711801f5e19ef654371b627682aed3b11373","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/148c816f10fd11df27ca6a9b3238cdd42fa72cd3","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/548ec0805c399c65ed66c6641be467f717833ab5","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-05-29T17:04:47.932Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47506","url":"https://www.cve.org/CVERecord?id=CVE-2021-47506","licence":"CVE Terms of Use","modified":"2026-08-05T08:48:10.240Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47506","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47506","licence":"Public domain","modified":"2026-08-04T10:17:06.590Z"}],"updatedAt":"2026-11-25T22:58:08.891Z","epss":{"score":0.0079,"percentile":0.57447,"date":"2026-12-01T12:00:22.000Z"}}