mbox series

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

Message ID cover.1709311699.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series nfs: fix UAF in direct writes | expand

Message

Josef Bacik March 1, 2024, 4:49 p.m. UTC
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(-)