{"id":"CVE-2023-53606","summary":"nfsd: clean up potential nfsd_file refcount leaks in COPY codepath","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfsd: clean up potential nfsd_file refcount leaks in COPY codepath\n\nThere are two different flavors of the nfsd4_copy struct. One is\nembedded in the compound and is used directly in synchronous copies. The\nother is dynamically allocated, refcounted and tracked in the client\nstruture. For the embedded one, the cleanup just involves releasing any\nnfsd_files held on its behalf. For the async one, the cleanup is a bit\nmore involved, and we need to dequeue it from lists, unhash it, etc.\n\nThere is at least one potential refcount leak in this code now. If the\nkthread_create call fails, then both the src and dst nfsd_files in the\noriginal nfsd4_copy object are leaked.\n\nThe cleanup in this codepath is also sort of weird. In the async copy\ncase, we'll have up to four nfsd_file references (src and dst for both\nflavors of copy structure). They are both put at the end of\nnfsd4_do_async_copy, even though the ones held on behalf of the embedded\none outlive that structure.\n\nChange it so that we always clean up the nfsd_file refs held by the\nembedded copy structure before nfsd4_copy returns. Rework\ncleanup_async_copy to handle both inter and intra copies. Eliminate\nnfsd4_cleanup_intra_ssc since it now becomes a no-op.","modified":"2026-03-20T12:33:15.358706Z","published":"2025-10-04T15:44:15.908Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53606.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/6ba434cb1a8d403ea9aad1b667c3ea3ad8b3191f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/75b8c681c563ef7e85da6862354efc18d2a08b1b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8f565846fbe8182961498d4cbe618b15076a683b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b3169b6ffe036b549c296a9e71591d29a1fb3209"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fd63299db8090307eae66f2aef17c8f00aafa0a9"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53606.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53606"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"e0639dc5805a9d4faaa2c07ad98fa853b9529dd3"},{"fixed":"fd63299db8090307eae66f2aef17c8f00aafa0a9"},{"fixed":"b3169b6ffe036b549c296a9e71591d29a1fb3209"},{"fixed":"75b8c681c563ef7e85da6862354efc18d2a08b1b"},{"fixed":"8f565846fbe8182961498d4cbe618b15076a683b"},{"fixed":"6ba434cb1a8d403ea9aad1b667c3ea3ad8b3191f"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53606.json"}}],"schema_version":"1.7.5"}