Skip to content

nfs: fix UAF in direct writes

Josef Bacik linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nfs: properly protect nfs_direct_req fieldsfs/nfs/direct.c+6 -11 reply
2/2nfs: fix UAF in direct writesfs/nfs/direct.c fs/nfs/write.c include/linux/nfs_fs.h+11 -32 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJeff Layton
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] nfs: fix UAF in direct writes

Hello,

Here are two patches to address a UAF we've been seeing in our stress testing with NFS internally. The first one is to clean up the accesses to the nfs_direct_req fields which is more a matter of correctness than an actual observed problem. The second patch is to address the problem itself. I've been running these patches on my stress test for a few hours now, I would appreciate feedback and review to see if this is the correct way to fix the problem. Thanks,

Josef

Josef Bacik (2):
nfs: properly protect nfs_direct_req fields
nfs: fix UAF in direct writes

 fs/nfs/direct.c        | 18 +++++++++++++++---
 fs/nfs/write.c         |  2 +-
 include/linux/nfs_fs.h |  1 +
 3 files changed, 17 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.0