When processing a DELEGRETURN operation, the NFSv4 server did not verify that the supplied stateid referred to a delegation. A client could supply an open or lock stateid instead, causing the server to free that state while it was still referenced, resulting in a use-after-free. A remote NFSv4 client which is able to open a file on an exported file system can corrupt kernel memory on the server, causing a kernel panic or potentially executing arbitrary code in the kernel.