Skip to content

Commit bd7c69d

Browse files
committed
NFSD: fix use-after-free in nfsd4_ssc_setup_dul()
jira VULN-8056 cve CVE-2023-1652 commit-author Xingyuan Mo <hdthky0@gmail.com> commit e6cf91b If signal_pending() returns true, schedule_timeout() will not be executed, causing the waiting task to remain in the wait queue. Fixed by adding a call to finish_wait(), which ensures that the waiting task will always be removed from the wait queue. Fixes: f4e44b3 ("NFSD: delay unmount source's export after inter-server copy completed.") Signed-off-by: Xingyuan Mo <hdthky0@gmail.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> (cherry picked from commit e6cf91b) Signed-off-by: Anmol Jain <ajain@ciq.com>
1 parent 3a5f59a commit bd7c69d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfsd/nfs4proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,7 @@ static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr,
13281328
/* allow 20secs for mount/unmount for now - revisit */
13291329
if (signal_pending(current) ||
13301330
(schedule_timeout(20*HZ) == 0)) {
1331+
finish_wait(&nn->nfsd_ssc_waitq, &wait);
13311332
kfree(work);
13321333
return nfserr_eagain;
13331334
}

0 commit comments

Comments
 (0)