Skip to content

NFSD: Fix use-after-free warning when doing inter-server copy

Dai Ngo linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2NFSD: Fix use-after-free warning when doing inter-server copyfs/nfsd/nfs4proc.c+1 -116 replies
2/2NFSD: fix missing refcount in nfsd4_copy by nfsd4_do_async_copyfs/nfsd/nfs4proc.c+1 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] NFSD: Fix use-after-free warning when doing inter-server copy

Observed use-after-free messages in /var/log/messages of destination server when doing inter-server copy. These come from 2 different places in the code, one from the nfsd4_cleanup_inter_ssc when nfsd_file_put is called for the source file and the other from nfs4_put_copy when it's called from nfsd4_cb_offload_release.

Fixed by removing the call to nfsd_file_put; the object is not allocated by nfsd_file_alloc, and by initializing refcount for nfsd4_copy in nfsd4_do_async_copy.

 fs/nfsd/nfs4proc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)