linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] NFSD: Fix use-after-free warning when doing inter-server copy
@ 2020-10-29 19:07 Dai Ngo
  2020-10-29 19:07 ` [PATCH 1/2] " Dai Ngo
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Dai Ngo @ 2020-10-29 19:07 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

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(-)



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-03-01 18:19 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 19:07 [PATCH 0/2] NFSD: Fix use-after-free warning when doing inter-server copy Dai Ngo
2020-10-29 19:07 ` [PATCH 1/2] " Dai Ngo
2021-02-20  0:18   ` Olga Kornievskaia
2021-02-20  1:09     ` J. Bruce Fields
2021-02-20  1:15       ` dai.ngo
2021-02-20  1:31       ` dai.ngo
2021-02-20  3:20         ` J. Bruce Fields
2021-02-20  3:41           ` dai.ngo
2021-02-20 14:08           ` Olga Kornievskaia
2021-02-21  4:16             ` dai.ngo
2021-02-22 18:34               ` dai.ngo
2021-02-22 21:46                 ` dai.ngo
2021-02-22 22:01                   ` dai.ngo
2021-02-22 22:08                     ` dai.ngo
2021-02-24 22:35                       ` Olga Kornievskaia
2021-02-25  2:26                         ` dai.ngo
2021-02-25 18:58                           ` dai.ngo
2021-03-01 18:15                             ` Chuck Lever
2020-10-29 19:07 ` [PATCH 2/2] NFSD: fix missing refcount in nfsd4_copy by nfsd4_do_async_copy Dai Ngo
2020-11-05 22:25 ` [PATCH 0/2] NFSD: Fix use-after-free warning when doing inter-server copy J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).