Skip to content

Commit 7d64bb9

Browse files
committed
NFSD: fix use-after-free in nfsd4_ssc_setup_dul()
jira VULN-8797 cve CVE-2023-1652 commit-author Xingyuan Mo <[email protected]> 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 <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]> (cherry picked from commit e6cf91b) Signed-off-by: Anmol Jain <[email protected]>
1 parent 0555c26 commit 7d64bb9

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)