All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: trond.myklebust@hammerspace.com, anna@kernel.org,
	linux-nfs@vger.kernel.org
Subject: [PATCH 0/2] nfs: fix UAF in direct writes
Date: Fri,  1 Mar 2024 11:49:55 -0500	[thread overview]
Message-ID: <cover.1709311699.git.josef@toxicpanda.com> (raw)

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

-- 
2.43.0


             reply	other threads:[~2024-03-01 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01 16:49 Josef Bacik [this message]
2024-03-01 16:49 ` [PATCH 1/2] nfs: properly protect nfs_direct_req fields Josef Bacik
2024-03-04 13:14   ` Jeff Layton
2024-03-01 16:49 ` [PATCH 2/2] nfs: fix UAF in direct writes Josef Bacik
2024-03-04 13:30   ` Jeff Layton
2024-03-04 17:57   ` Trond Myklebust

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1709311699.git.josef@toxicpanda.com \
    --to=josef@toxicpanda.com \
    --cc=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.